Remove builds from CI and change to just (#681)

* Remove builds from CI and change to `just`

Per discussion in Discord, we are:
* Removing all official distributions to focus solely on RustScan itself
* Moving to `just` so developers can run 1 command to run all of our test suites. In some PRs it has turned into a cat and mouse game where they are not running all of our testsl

* make CI run

* update readme

* update readme

* try to fix just

* typo

* fixing just

* install nextest

---------

Co-authored-by: bee <[email protected]>
This commit is contained in:
Autumn (Bee)andbee authored and GitHub committed 2024-11-04 14:29:33 +00:00
1 parent 66de4e7ee0
commit 640003f22c
5 files changed
+17 -345

No files matched your search

+4
View File
@@ -7,6 +7,10 @@ assignees: ''
---
IMPORTANT: If you do not fill this out, your issue will be automatically closed.
As of November 2024, RustScan no longer offiically supports any packages other than `cargo`. If you have an issue with Docker or a `.deb`, please bring it up with whoever created it :)
**Describe the bug**
A clear and concise description of what the bug is.
+6 -68
View File
@@ -1,38 +1,11 @@
name: Build
on:
pull_request:
paths-ignore:
- '.github/**'
branches: [master]
push:
branches:
- master
paths-ignore:
- '.github/**'
schedule:
- cron: '00 01 * * *'
jobs:
check:
name: Check
runs-on: ubuntu-latest
steps:
- name: Checkout sources
uses: actions/checkout@v4
- name: Install stable toolchain
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
override: true
- uses: Swatinem/rust-cache@v2
- name: Run cargo check
uses: actions-rs/cargo@v1
with:
command: check
test:
name: Test Suite
strategy:
@@ -51,46 +24,11 @@ jobs:
toolchain: ${{ matrix.rust }}
override: true
- uses: taiki-e/install-action@nextest
- uses: Swatinem/rust-cache@v2
- name: Run cargo test
uses: actions-rs/cargo@v1
with:
command: test
- name: Install Just
uses: extractions/setup-just@v1
lints:
name: Lints
runs-on: ubuntu-latest
steps:
- name: Checkout sources
uses: actions/checkout@v4
with:
submodules: true
- name: Install stable toolchain
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
override: true
components: rustfmt, clippy
- uses: Swatinem/rust-cache@v2
- name: Run cargo fmt
uses: actions-rs/cargo@v1
with:
command: fmt
args: --all -- --check
- name: Run cargo clippy
uses: actions-rs/cargo@v1
with:
command: clippy
args: -- -D warnings
- name: Run rustdoc lints
uses: actions-rs/cargo@v1
with:
command: doc
args: --workspace --all-features --no-deps --document-private-items
- name: Run just
run: just test
-42
View File
@@ -1,42 +0,0 @@
name: Release - Distribute Docker image
on:
push:
tags:
- '[0-9]+.[0-9]+.[0-9]+'
# release:
# types: [published]
jobs:
push_to_registry:
name: Push Docker image to Docker Hub
runs-on: ubuntu-latest
steps:
- name: Check out the repo
uses: actions/checkout@v4
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Log in to Docker Hub
if: github.event_name != 'pull_request'
uses: docker/login-action@v3
with:
password: ${{ secrets.DOCKERHUB_USERNAME }}
username: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@v5
with:
images: rustscan/rustscan
flavor: latest=true
- name: Build and push Docker image
uses: docker/build-push-action@v6
with:
context: .
push: ${{ contains(fromJson('["push", "release"]'), github.event_name) }} # Publish to docker registry only on push event or new release.
platforms: linux/amd64,linux/arm64
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
-209
View File
@@ -1,209 +0,0 @@
name: Release - Distribute binaries
on:
# If we want to make release using github interface.
# release:
# types: [published]
# If we want to make release by pushing new tag.
push:
tags:
- '[0-9]+.[0-9]+.[0-9]+'
env:
BIN_NAME: rustscan
PROJECT_NAME: rustscan
REPO_NAME: RustScan/RustScan
BREW_TAP: RustScan/homebrew-tap
jobs:
build:
name: Build
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false # don't fail other jobs if one fails
matrix:
# aarch64-linux is failing due to python3 missing issues during tests. I'm removing it for now.
# build: [x86_64-linux, aarch64-linux, x86_64-macos, aarch64-macos, x86_64-windows, x86_64-win-gnu]
build: [x86_64-linux, x86_64-macos, aarch64-macos, x86_64-windows, x86_64-win-gnu]
include:
- build: aarch64-macos
os: macos-latest
rust: stable
target: aarch64-apple-darwin
cross: true
# - build: aarch64-linux
# os: ubuntu-20.04
# rust: stable
# target: aarch64-unknown-linux-gnu
# cross: true
- build: x86_64-linux
os: ubuntu-20.04
rust: stable
target: x86_64-unknown-linux-gnu
cross: false
- build: x86_64-macos
os: macos-latest
rust: stable
target: x86_64-apple-darwin
cross: false
- build: x86_64-windows
os: windows-2019
rust: stable
target: x86_64-pc-windows-msvc
cross: false
- build: x86_64-win-gnu
os: windows-2019
rust: stable-x86_64-gnu
target: x86_64-pc-windows-gnu
cross: false
steps:
- name: Set Git config (windows only)
if: contains(matrix.os, 'windows') # Windows is missing some dependencies
run: |
git config --global pack.windowMemory "100m"
git config --global pack.packSizeLimit "100m"
git config --global pack.threads "1"
git config --global pack.deltaCacheSize "512m"
- name: Install dependencies
if: contains(matrix.build, 'aarch64-linux') # Windows is missing some dependencies
run: sudo apt-get update && sudo apt-get install -y gcc-aarch64-linux-gnu python3
- name: Install python 3.10
uses: actions/setup-python@v5
with:
python-version: '3.10'
- name: Checkout sources
uses: actions/checkout@v4
with:
submodules: true
- name: Install ${{ matrix.rust }} toolchain
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: ${{ matrix.rust }}
target: ${{ matrix.target }}
override: true
- name: Run cargo test
uses: actions-rs/cargo@v1
with:
use-cross: ${{ matrix.cross }}
command: test
args: --release --locked --target ${{ matrix.target }}
- name: Build release binary
uses: actions-rs/cargo@v1
with:
use-cross: ${{ matrix.cross }}
command: build
args: --release --locked --target ${{ matrix.target }}
- name: Calculate tag name
# if: contains(matrix.build, 'linux')
shell: bash
run: |
name=dev
if [[ ${GITHUB_REF} =~ refs/tags/[0-9]+.[0-9]+.[0-9]+ ]]; then
name=${GITHUB_REF#refs/tags/}
fi
echo "TAG=$name" >> $GITHUB_ENV
id: tagname
- name: Build and package artifacts
shell: bash
run: |
mkdir dist
if [[ "${{ matrix.build }}" =~ "windows" ]]; then
cp "target/${{ matrix.target }}/release/$BIN_NAME.exe" "dist/"
else
cp "target/${{ matrix.target }}/release/$BIN_NAME" "dist/"
fi
if [[ "${{ matrix.build }}" =~ "linux" ]]; then
cargo install cargo-deb
cargo deb --target ${{ matrix.target }} --deb-version ${TAG}
cp "target/${{ matrix.target }}/debian/rustscan_${TAG}_amd64.deb" "dist/" || true
fi
- uses: actions/[email protected]
with:
name: bins-${{ matrix.build }}
path: dist
package:
name: Package
needs: [build]
runs-on: ubuntu-latest
steps:
- name: Checkout sources
uses: actions/checkout@v4
with:
submodules: false
- uses: actions/download-artifact@v4
with:
path: dist
- name: Calculate tag name
# if: contains(matrix.build, 'linux')
shell: bash
run: |
name=dev
if [[ ${GITHUB_REF} =~ refs/tags/[0-9]+.[0-9]+.[0-9]+ ]]; then
name=${GITHUB_REF#refs/tags/}
fi
echo "TAG=$name" >> $GITHUB_ENV
id: tagname
- name: Build archive
shell: bash
run: |
set -ex
rm -rf tmp
mkdir tmp
for dir in dist/bins-* ; do
platform=${dir#"dist/bins-"}
unset exe
if [[ $platform =~ "win" ]]; then
exe=".exe"
fi
pkgname=$PROJECT_NAME-$TAG-$platform
mkdir tmp/$pkgname
cp $dir/$BIN_NAME$exe dist/ || true
mv $dir/$BIN_NAME$exe tmp/$pkgname
chmod +x tmp/$pkgname/$BIN_NAME$exe
if [[ $platform =~ "linux" ]]; then
mv "$dir/rustscan_${TAG}_amd64.deb" dist/ || true
fi
tar cJf dist/$pkgname.tar.xz -C tmp $pkgname
7z a dist/$pkgname.zip tmp/$pkgname
done
- name: Upload binaries to release
if: (github.event_name == 'push' && startsWith(github.ref, 'refs/tags/')) || github.event_name == 'release'
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: dist/*
file_glob: true
tag: ${{ github.ref }}
overwrite: true
# - uses: mislav/bump-homebrew-formula-action@v3
# with:
# formula-path: ${{env.PROJECT_NAME}}.rb
# homebrew-tap: ${{ env.BREW_TAP }}
# download-url: 'https://github.com/${{ env.REPO_NAME }}/releases/download/${{ github.ref }}/${{env.PROJECT_NAME}}-${{ github.ref }}-x86_64-macos.tar.xz'
# commit-message: updating formula for ${{ env.PROJECT_NAME }}
# env:
# COMMITTER_TOKEN: ${{ secrets.COMMITTER_TOKEN }}
- run: cargo publish --token ${CRATES_TOKEN}
if: (github.event_name == 'push' && startsWith(github.ref, 'refs/tags/')) || github.event_name == 'release'
env:
CRATES_TOKEN: ${{ secrets.CRATES_TOKEN }}
+7 -26
View File
@@ -9,16 +9,6 @@
![Arch Linux package][badge-1] ![Built with Rust][badge-2] ![GitHub All Releases][badge-3] ![Crates.io][badge-4] ![Discord][badge-5] ![Actions][badge-6]
---
| 🐋 `(Recommended)` | 👩‍💻 | 🏗️ | 🔧 |
| :---------------------------------------------------------: | :---------------------------: | :-------------------------: | :-------------------------: |
| [![Docker][DockerPic]][Docker] | [![Kali][Kali1]][Kali/Debian] | [![Arch][Arch]][Arch-Linux] | [![apple][apple]][Homebrew] |
| `docker pull rustscan/rustscan:latest`</br>[Docker][usage-0] | [Link to Documentation][kali] | `yay -S rustscan` | `brew install rustscan` |
---
</div>
# 🤔 What is this?
@@ -27,6 +17,13 @@
The Modern Port Scanner. **Find ports quickly (3 seconds at its fastest)**. Run scripts through our scripting engine (Python, Lua, Shell supported).
# 🛠️ Installation
RustScan is in many repositories already. Install it with whatever tools you wish:
[![Packaging status](https://repology.org/badge/vertical-allrepos/rustscan.svg)](https://repology.org/project/rustscan/versions)
RustScan only officially supports Cargo installations, if you want to use that please install Rust and then `cargo install rustscan`
# ✨ Features
- Scans all 65k ports in **3 seconds**.
@@ -47,7 +44,6 @@ The Modern Port Scanner. **Find ports quickly (3 seconds at its fastest)**. Run
- 🐋 [Docker Usage][toc-docker-usage]
- 🦜 [Discord][discord]
- 🤸 [Usage][usage-1]
- 🎪 [Community][toc-community]
# 🔭 Why RustScan?
@@ -105,21 +101,6 @@ RustScan is one of the first penetration testing tools that aims to be entirely
RustScan has continuous integration testing that aims to ensure it is accessible, and we are constantly working on ways to improve our accessibility and ensure _everyone_ can use RustScan.
# 📖 Full Installation Guide
You can find our guide [here][install-1].
## 🦊 Community Distributions
Here are all of RustScan's community distributions.
If you maintain a community distribution and want it listed here, leave an issue / pull request / Discord message or however, you want to let us know.
- [Open Suse][distributions-1]
- [Fedora/CentOS][distributions-2]
[![Packaging status][rustscan-svg]][repology-1]
# 🤸 Usage
We have 2 usage guides. [Basic Usage][usage-1] and [Things you may want to do][usage-2].