Phase 2: Security Hardening & Policy Binding Verification (#18) #129
This file contains hidden or 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: Rust | |
| on: | |
| push: | |
| branches: [ "main" ] | |
| pull_request: | |
| branches: [ "main" ] | |
| env: | |
| CARGO_TERM_COLOR: always | |
| jobs: | |
| check: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: moonrepo/setup-rust@v1 | |
| with: | |
| components: clippy, rustfmt | |
| - name: test | |
| run: cargo test --verbose | |
| - name: lint | |
| run: cargo clippy --lib --bin arkavo --all-features -- -D warnings -A mismatched-lifetime-syntaxes | |
| - name: format | |
| run: cargo fmt --all --check | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: moonrepo/setup-rust@v1 | |
| with: | |
| targets: x86_64-unknown-linux-gnu | |
| - name: Build | |
| run: | | |
| cargo build --release --target x86_64-unknown-linux-gnu | |
| strip target/x86_64-unknown-linux-gnu/release/arkavo | |
| - name: Upload artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: x86_64-unknown-linux-gnu-build | |
| path: target/x86_64-unknown-linux-gnu/release/arkavo | |
| bench: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: moonrepo/setup-rust@v1 | |
| with: | |
| targets: x86_64-unknown-linux-gnu | |
| - name: Run benchmark | |
| run: cargo bench --bench benchmarks | tee output.txt | |