Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
123 changes: 75 additions & 48 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ jobs:
env:
IN_PIPELINE: true
runs-on: ${{ matrix.os }}
if: github.ref == 'refs/heads/master'
if: github.ref == 'refs/heads/master' || github.ref_type == 'tag'
strategy:
matrix:
type: [ubuntu-x64, ubuntu-x86, armv7, aarch64]
Expand Down Expand Up @@ -37,37 +37,39 @@ jobs:
path: target/aarch64-unknown-linux-gnu/release/rustscan
pkg_config_path: /usr/lib/x86_64-linux-gnu/pkgconfig
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v6
- name: Cache cargo & target directories
uses: Swatinem/rust-cache@v2
- name: Build binary
uses: houseabsolute/actions-rust-cross@v0
uses: houseabsolute/actions-rust-cross@v1
with:
command: build
target: ${{ matrix.target }}
args: "--locked --release"
strip: true
toolchain: stable
- name: Build tar.gz for homebrew installs
if: matrix.type == 'ubuntu-x64'
run: |
tar czf ${{ matrix.name }}.tar.gz -C target/x86_64-unknown-linux-musl/release rustscan
- uses: actions/upload-artifact@v4
- name: Upload artifacts
uses: houseabsolute/actions-rust-release@v0
with:
name: ${{ matrix.name }}
path: ${{ matrix.path }}
- uses: actions/upload-artifact@v4
if: matrix.type == 'ubuntu-x64'
executable-name: rustscan
target: ${{ matrix.target }}
archive-name: ${{ matrix.name }}
changes-file: ""
release-tag-prefix: "disabled"
- name: Publish artifacts to GitHub release
if: github.ref_type == 'tag'
uses: softprops/action-gh-release@v2
with:
name: ${{ matrix.name }}.tar.gz
path: ${{ matrix.name }}.tar.gz
files: |
*.tar.gz
*.zip
build-deb:
needs: [build-nix]
runs-on: ubuntu-latest
env:
IN_PIPELINE: true
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v6
- name: Install cargo-deb
run: cargo install -f cargo-deb
- uses: awalsh128/cache-apt-pkgs-action@v1
Expand All @@ -79,74 +81,88 @@ jobs:
- name: Deb Build
run: cargo deb --target=x86_64-unknown-linux-musl
- name: Upload Deb Artifact
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@v6
with:
name: rustscan.deb
path: ./target/x86_64-unknown-linux-musl/debian/*
- name: Publish artifacts to GitHub release
if: github.ref_type == 'tag'
uses: softprops/action-gh-release@v2
with:
files: |
./target/x86_64-unknown-linux-musl/debian/*.deb

build-macos:
env:
IN_PIPELINE: true
runs-on: macos-latest
if: github.ref == 'refs/heads/master'
if: github.ref == 'refs/heads/master' || github.ref_type == 'tag'
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v6
- name: Cache cargo & target directories
uses: Swatinem/rust-cache@v2
- name: Build binary
uses: houseabsolute/actions-rust-cross@v0
uses: houseabsolute/actions-rust-cross@v1
with:
command: build
target: x86_64-apple-darwin
args: "--locked --release"
strip: true
toolchain: stable
- name: Build tar.gz for homebrew installs
run: |
tar czf x86_64-macos-rustscan.tar.gz -C target/x86_64-apple-darwin/release rustscan
- uses: actions/upload-artifact@v4
- name: Upload artifacts
uses: houseabsolute/actions-rust-release@v0
with:
name: x86_64-macos-rustscan
path: target/x86_64-apple-darwin/release/rustscan
- uses: actions/upload-artifact@v4
executable-name: rustscan
target: x86_64-apple-darwin
archive-name: x86_64-macos-rustscan
changes-file: ""
release-tag-prefix: "disabled"
- name: Publish artifacts to GitHub release
if: github.ref_type == 'tag'
uses: softprops/action-gh-release@v2
with:
name: x86_64-macos-rustscan.tar.gz
path: x86_64-macos-rustscan.tar.gz

files: |
*.tar.gz
*.zip

build-macos-aarch64:
env:
IN_PIPELINE: true
runs-on: macos-latest
if: github.ref == 'refs/heads/master'
if: github.ref == 'refs/heads/master' || github.ref_type == 'tag'
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v6
- name: Cache cargo & target directories
uses: Swatinem/rust-cache@v2
- name: Build binary
uses: houseabsolute/actions-rust-cross@v0
uses: houseabsolute/actions-rust-cross@v1
with:
command: build
target: aarch64-apple-darwin
args: "--locked --release"
strip: true
toolchain: stable
- name: Build tar.gz for homebrew installs
run: |
tar czf aarch64-macos-rustscan.tar.gz -C target/aarch64-apple-darwin/release rustscan
- uses: actions/upload-artifact@v4
- name: Upload artifacts
uses: houseabsolute/actions-rust-release@v0
with:
name: aarch64-macos-rustscan
path: target/aarch64-apple-darwin/release/rustscan
- uses: actions/upload-artifact@v4
executable-name: rustscan
target: aarch64-apple-darwin
archive-name: aarch64-macos-rustscan
changes-file: ""
release-tag-prefix: "disabled"
- name: Publish artifacts to GitHub release
if: github.ref_type == 'tag'
uses: softprops/action-gh-release@v2
with:
name: aarch64-macos-rustscan.tar.gz
path: aarch64-macos-rustscan.tar.gz
files: |
*.tar.gz
*.zip

build-windows:
env:
IN_PIPELINE: true
runs-on: ${{ matrix.os }}
if: github.ref == 'refs/heads/master'
if: github.ref == 'refs/heads/master' || github.ref_type == 'tag'
strategy:
matrix:
type: [windows-x64, windows-x86]
Expand All @@ -162,18 +178,29 @@ jobs:
name: x86-windows-rustscan.exe
path: target\i686-pc-windows-msvc\release\rustscan.exe
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v6
- name: Cache cargo & target directories
uses: Swatinem/rust-cache@v2
- name: Build binary
uses: houseabsolute/actions-rust-cross@v0
uses: houseabsolute/actions-rust-cross@v1
with:
command: build
target: ${{ matrix.target }}
target: ${{ matrix.target }}
args: "--locked --release"
strip: true
toolchain: stable
- uses: actions/upload-artifact@v4
- name: Upload artifacts
uses: houseabsolute/actions-rust-release@v0
with:
executable-name: rustscan
target: ${{ matrix.target }}
archive-name: ${{ matrix.name }}
changes-file: ""
release-tag-prefix: "disabled"
- name: Publish artifacts to GitHub release
if: github.ref_type == 'tag'
uses: softprops/action-gh-release@v2
with:
name: ${{ matrix.name }}
path: ${{ matrix.path }}
files: |
*.tar.gz
*.zip
7 changes: 6 additions & 1 deletion .github/workflows/dependabot.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,14 @@
name: Dependabot Auto-Merge
on: pull_request

permissions:
contents: write
pull-requests: write

jobs:
dependabot:
runs-on: ubuntu-latest
if: ${{ github.actor == 'dependabot[bot]' }}
if: github.event.pull_request.user.login == 'dependabot[bot]' && github.repository == 'bee-san/RustScan'
steps:
- name: Enable auto-merge for Dependabot PRs
run: |
Expand Down
10 changes: 3 additions & 7 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,20 +15,16 @@ jobs:
runs-on: ${{ matrix.os }}
steps:
- name: Checkout sources
uses: actions/checkout@v4
uses: actions/checkout@v6

- name: Install stable toolchain
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: ${{ matrix.rust }}
override: true
run: rustup toolchain install stable --profile minimal

- uses: taiki-e/install-action@nextest
- uses: Swatinem/rust-cache@v2

- name: Install Just
uses: extractions/setup-just@v2
uses: extractions/setup-just@v3

- name: Run just
run: just test