Rework parallelism in enumeration and scanning (#221) #32
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Release Artifacts | |
on: | |
push: | |
branches: [ "main" ] | |
# Run when release tags are created | |
tags: [ "v*.*.*" ] | |
# allow manual triggering | |
# https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#workflow_dispatch | |
workflow_dispatch: | |
jobs: | |
native: | |
name: ${{ matrix.build }} | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
include: | |
- build: ubuntu-20.04.x86_64 | |
os: ubuntu-20.04 | |
rust: stable | |
install_dependencies: | | |
sudo apt-get install zsh libboost-all-dev | |
- build: ubuntu-22.04.arm64 | |
os: ubuntu-22.04-arm64-8-core | |
rust: stable | |
install_dependencies: | | |
sudo apt-get install zsh libboost-all-dev | |
- build: macos-13.x86_64 | |
os: macos-13 | |
rust: stable | |
install_dependencies: | | |
brew install coreutils boost | |
- build: macos-13.arm64 | |
os: macos-13-xlarge | |
rust: stable | |
install_dependencies: | | |
brew install coreutils boost | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install dependencies | |
run: ${{ matrix.install_dependencies }} | |
- name: Install Rust toolchain | |
id: install-rust-toolchain | |
uses: dtolnay/rust-toolchain@master | |
with: | |
toolchain: ${{ matrix.rust }} | |
- name: Build release | |
run: | | |
./scripts/create-release.zsh | |
- name: Run integration tests on release | |
run: | | |
NP_TEST_PROGRAM="$PWD"/release/bin/noseyparker cargo test --test test_noseyparker | |
env: | |
# We use the GitHub Actions automatic token when running tests, to avoid | |
# spurious failures from rate limiting when testing Nosey Parker's github | |
# enumeration capabilities. | |
NP_GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
- name: Create release archive | |
id: release-archive | |
run: | | |
FILENAME="$(./release/bin/noseyparker -V | tr ' ' '-').tar.gz" | |
tar -C release -c -z -f "$FILENAME" . | |
echo "filename=$FILENAME" >> "$GITHUB_OUTPUT" | |
- name: Upload release files | |
uses: actions/upload-artifact@v4 | |
with: | |
name: ${{ steps.release-archive.outputs.filename }} | |
path: ${{ steps.release-archive.outputs.filename }} | |
compression-level: 0 | |
if-no-files-found: error |