Bump the rust-major group across 1 directory with 9 updates #402
Workflow file for this run
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: CI | |
| on: | |
| push: | |
| branches: [main] | |
| pull_request: | |
| workflow_dispatch: | |
| concurrency: | |
| group: ci-${{ github.ref }} | |
| cancel-in-progress: true | |
| env: | |
| CARGO_TERM_COLOR: always | |
| RUST_BACKTRACE: 1 | |
| # Pin the vendored MiniUPnP C source the native miniupnpc-sys build links against. | |
| MINIUPNP_REF: bced81fb0b73ae78c9b911c89e881fbc6d4a5c7c | |
| jobs: | |
| build-test: | |
| name: build+test (${{ matrix.os }}) | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: [ubuntu-latest, macos-latest, windows-latest] | |
| steps: | |
| - name: Checkout emulebb-rust | |
| uses: actions/checkout@v4 | |
| - name: Checkout emulebb-miniupnp (native C source) | |
| uses: actions/checkout@v4 | |
| with: | |
| repository: emulebb/emulebb-miniupnp | |
| ref: ${{ env.MINIUPNP_REF }} | |
| path: .ci/emulebb-miniupnp | |
| - name: Install pinned Rust | |
| uses: dtolnay/rust-toolchain@1.97.0 | |
| - name: Set up Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.12" | |
| - name: Cache cargo build | |
| uses: Swatinem/rust-cache@v2 | |
| # The local Kad swarm harness refuses loopback by design (node.rs | |
| # lan_bind_ip): bind through the runner's real primary IPv4 so the | |
| # multi-node tests exercise a genuine interface, exactly like the | |
| # operator split-tunnel machines do via X_LOCAL_IP. | |
| - name: Resolve runner LAN IP (X_LOCAL_IP) | |
| shell: bash | |
| run: | | |
| ip=$(python -c "import socket; s=socket.socket(socket.AF_INET, socket.SOCK_DGRAM); s.connect(('203.0.113.1', 9)); print(s.getsockname()[0])") | |
| echo "resolved X_LOCAL_IP=$ip" | |
| echo "X_LOCAL_IP=$ip" >> "$GITHUB_ENV" | |
| - name: Rust build/test gate | |
| env: | |
| MINIUPNP_ROOT: ${{ github.workspace }}/.ci/emulebb-miniupnp | |
| run: python tools/rust_quality_gate.py ci-test | |
| quality: | |
| name: policy + format + clippy | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout emulebb-rust | |
| uses: actions/checkout@v4 | |
| # clippy --workspace builds emulebb-miniupnpc-sys, whose build.rs compiles | |
| # the vendored MiniUPnP C source; provide it exactly as the build-test job | |
| # does so the clippy step is not blocked on a native build failure. | |
| - name: Checkout emulebb-miniupnp (native C source) | |
| uses: actions/checkout@v4 | |
| with: | |
| repository: emulebb/emulebb-miniupnp | |
| ref: ${{ env.MINIUPNP_REF }} | |
| path: .ci/emulebb-miniupnp | |
| - name: Install pinned Rust with rustfmt and Clippy | |
| uses: dtolnay/rust-toolchain@1.97.0 | |
| with: | |
| components: rustfmt, clippy | |
| - name: Set up Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.12" | |
| - name: Rust quality gate | |
| env: | |
| MINIUPNP_ROOT: ${{ github.workspace }}/.ci/emulebb-miniupnp | |
| run: python tools/rust_quality_gate.py quick | |
| supply-chain: | |
| name: cargo-deny (advisories, licenses, sources) | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout emulebb-rust | |
| uses: actions/checkout@v4 | |
| - name: cargo-deny — advisories, licenses, and sources | |
| uses: EmbarkStudios/cargo-deny-action@8f84122a46a358a27cb0625d85ad60ab436a1b87 # v2 | |
| with: | |
| command: check advisories licenses sources |