General refactor: backend/frontend separation and API integration for ELF analysis #75
Workflow file for this run
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: manifest-producer | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
branches: | |
- main | |
env: | |
GRCOV_VERSION: "0.8.20" | |
jobs: | |
################################## FORMAT LAYER ######################################### | |
clippy-rustfmt: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install Rust stable | |
uses: dtolnay/rust-toolchain@stable | |
with: | |
toolchain: stable | |
components: clippy, rustfmt | |
- name: Run rustfmt | |
run: cargo fmt --all -- --check --verbose | |
- name: Run cargo clippy | |
run: cargo clippy --tests -- -Dclippy::all -Dclippy::pedantic | |
################################## BACKEND LIGHT TESTS ################################## | |
backend-tests: | |
needs: [clippy-rustfmt] | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install Rust stable | |
uses: dtolnay/rust-toolchain@stable | |
with: | |
components: llvm-tools-preview | |
- name: Install grcov | |
env: | |
GRCOV_LINK: https://github.com/mozilla/grcov/releases/download | |
GRCOV_BINARY: grcov-x86_64-unknown-linux-musl.tar.bz2 | |
run: | | |
curl -L "$GRCOV_LINK/v$GRCOV_VERSION/$GRCOV_BINARY" | | |
tar xj -C $HOME/.cargo/bin | |
- name: Run Backend Tests | |
env: | |
RUSTFLAGS: "-Cinstrument-coverage" | |
LLVM_PROFILE_FILE: "backend-%p-%m.profraw" | |
run: | | |
cargo test --test light_tests -- --nocapture | |
cargo test --lib --features "progress_bar" -- --nocapture | |
- name: Get coverage data for codecov | |
run: | | |
grcov . --binary-path ./target/debug/ -s . -t lcov --branch \ | |
--ignore-not-existing --ignore "/*" --ignore "../*" \ | |
--ignore "example/*" -o backend.info | |
- name: Upload Backend Coverage | |
uses: codecov/codecov-action@v4 | |
with: | |
files: backend.info | |
token: ${{ secrets.CODECOV_TOKEN }} | |
################################## MULTI-PLATFORM TESTING JOB ########################### | |
multi-platform-build-test: | |
name: Build and Test on Multiple Platforms (Ubuntu, macOS, Windows) | |
strategy: | |
matrix: | |
platform: [ubuntu-latest, macos-latest, windows-latest] | |
needs: [backend-tests] | |
runs-on: ${{ matrix.platform }} | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install Rust stable | |
uses: dtolnay/rust-toolchain@stable | |
with: | |
toolchain: stable | |
- name: Build the project | |
run: cargo build --workspace --all-features | |
- name: Generate docs | |
run: cargo doc --all-features --no-deps | |
- name: Run Docs Tests | |
run: cargo test --doc -- --nocapture |