name: CI on: push: branches: [main] pull_request: jobs: macos: runs-on: macos-latest steps: - uses: actions/checkout@v7 - run: | echo "PATH=$PATH" ls -l /opt/homebrew/bin/fish /opt/homebrew/bin/pwsh /usr/local/bin/fish /usr/local/bin/pwsh || true /bin/zsh -lc 'echo "login PATH=$PATH"; command -v brew fish pwsh' || true - uses: dtolnay/rust-toolchain@master with: toolchain: "1.95" components: clippy, rustfmt - uses: Swatinem/rust-cache@v2 - run: scripts/check.sh - run: cargo build --locked platforms: strategy: fail-fast: false matrix: os: [ubuntu-24.04, windows-latest] runs-on: ${{ matrix.os }} steps: - uses: actions/checkout@v7 - if: runner.os == 'Windows' shell: powershell run: | $env:PATH -split ';' "CARGO_HOME=$env:CARGO_HOME RUSTUP_HOME=$env:RUSTUP_HOME USERPROFILE=$env:USERPROFILE" Get-Command rustup, rustc, cargo, pwsh, bash -All -ErrorAction SilentlyContinue | Format-Table -AutoSize Name, Source Get-ChildItem "$env:USERPROFILE\.cargo\bin" -ErrorAction SilentlyContinue | Select-Object -ExpandProperty Name - if: runner.os == 'Windows' shell: bash run: | echo "PATH=$PATH" command -v rustup rustc cargo || true - uses: dtolnay/rust-toolchain@master with: toolchain: "1.95" - uses: Swatinem/rust-cache@v2 - if: runner.os != 'Linux' run: cargo test --locked --quiet # The Linux job container runs as root, which ignores the file permissions the tests check. - if: runner.os == 'Linux' run: | apt-get update && apt-get install -y zsh fish xvfb useradd --create-home ci chmod o+x "$HOME" chown -R ci "$GITHUB_WORKSPACE" "$HOME/.cargo" "$HOME/.rustup" runuser -u ci -- env HOME=/home/ci CARGO_HOME="$HOME/.cargo" RUSTUP_HOME="$HOME/.rustup" PATH="$PATH" cargo test --locked --quiet - run: cargo build --locked