feat: initial release of https_samp v1.0.0 #1
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: [ "master" ] | |
| pull_request: | |
| branches: [ "master" ] | |
| env: | |
| CARGO_TERM_COLOR: always | |
| # Default: read-only. Each job opts in to extra scopes when needed. | |
| permissions: | |
| contents: read | |
| jobs: | |
| build: | |
| name: Build, test, clippy | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: read | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: Install Rust (stable + clippy) | |
| uses: dtolnay/rust-toolchain@stable | |
| with: | |
| targets: i686-unknown-linux-gnu | |
| components: clippy | |
| - name: Install cross-compilation tools | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y gcc-multilib g++-multilib | |
| - uses: Swatinem/rust-cache@v2 | |
| - name: Build | |
| run: cargo build --target i686-unknown-linux-gnu --verbose | |
| - name: Test | |
| run: cargo test --target i686-unknown-linux-gnu --verbose | |
| - name: Clippy | |
| run: cargo clippy --target i686-unknown-linux-gnu --all-targets -- -D warnings | |
| fmt: | |
| name: Rustfmt | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: read | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: Install Rust (stable + rustfmt) | |
| uses: dtolnay/rust-toolchain@stable | |
| with: | |
| components: rustfmt | |
| - run: cargo fmt --all -- --check | |
| audit: | |
| name: Security audit | |
| runs-on: ubuntu-latest | |
| # rustsec/audit-check opens issues for new advisories and posts | |
| # review comments on PRs that introduce vulnerable dependencies. | |
| permissions: | |
| contents: read | |
| issues: write | |
| pull-requests: write | |
| checks: write | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: rustsec/audit-check@v2 | |
| with: | |
| token: ${{ secrets.GITHUB_TOKEN }} | |
| coverage: | |
| name: Coverage (llvm-cov) | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: read | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: Install Rust (stable + llvm-tools) | |
| uses: dtolnay/rust-toolchain@stable | |
| with: | |
| targets: i686-unknown-linux-gnu | |
| components: llvm-tools-preview | |
| - name: Install cross-compilation tools | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y gcc-multilib g++-multilib | |
| - uses: Swatinem/rust-cache@v2 | |
| - name: Install cargo-llvm-cov | |
| uses: taiki-e/install-action@cargo-llvm-cov | |
| - name: Generate LCOV report | |
| run: cargo llvm-cov --target i686-unknown-linux-gnu --lcov --output-path lcov.info | |
| - name: Upload coverage artifact | |
| uses: actions/upload-artifact@v7 | |
| with: | |
| name: coverage-lcov | |
| path: lcov.info | |
| if-no-files-found: error |