nix: replace deprecated pkgs.system with stdenv.hostPlatform.system
#6509
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: Cargo Native | |
| on: | |
| push: | |
| branches: [main] | |
| paths-ignore: | |
| - '.github/styles/**' | |
| - 'web/**' | |
| pull_request: | |
| branches: [main] | |
| paths-ignore: | |
| - '.github/styles/**' | |
| - 'web/**' | |
| permissions: read-all | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: ${{ github.ref != 'refs/heads/main' }} | |
| env: | |
| RUSTFLAGS: -Dwarnings | |
| jobs: | |
| cargo-native: | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: [ubuntu-24.04, windows-2022] | |
| toolchain: [stable] | |
| name: ${{ matrix.os }} / ${{ matrix.toolchain }} | |
| runs-on: ${{ matrix.os }} | |
| timeout-minutes: 30 | |
| steps: | |
| - name: Checkout | |
| uses: >- # v6.0.2 | |
| actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd | |
| # Ubuntu 24.04 restricts unprivileged user namespaces by default, which breaks | |
| # the worker tests that use namespaces (e.g. for sandboxing). | |
| - name: Disable AppArmor namespace restrictions | |
| run: sudo sysctl -w kernel.apparmor_restrict_unprivileged_userns=0 | |
| if: matrix.os == 'ubuntu-24.04' | |
| - name: Set up Rust toolchain | |
| run: rustup update && rustup default ${{ matrix.toolchain }} | |
| shell: bash | |
| - name: Rust cache | |
| # https://github.com/Swatinem/rust-cache/releases/tag/v2.9.1 | |
| uses: Swatinem/rust-cache@c19371144df3bb44fab255c43d04cbc2ab54d1c4 | |
| - name: Build on ${{ runner.os }} | |
| run: cargo build --all --profile=smol | |
| - name: Test on ${{ runner.os }} | |
| run: cargo test --all --profile=smol | |
| - name: Check schema export | |
| run: cargo run --bin build-schema --features dev-schema --package nativelink-config |