upgrade rust-toolchain to 1.82.0; fix some CI issues
#1318
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 checks | |
| on: | |
| merge_group: | |
| pull_request: | |
| push: | |
| branches: | |
| - main | |
| jobs: | |
| fmt: | |
| name: Rustfmt | |
| timeout-minutes: 30 | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v3 | |
| - uses: actions-rs/toolchain@v1 | |
| with: | |
| override: false | |
| - run: rustup component add rustfmt | |
| - uses: actions-rs/cargo@v1 | |
| with: | |
| command: fmt | |
| args: --all -- --check | |
| typos-check: | |
| name: Spell Check with Typos | |
| timeout-minutes: 5 | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: crate-ci/typos@v1.33.1 | |
| with: | |
| config: ./typos.toml | |
| isolated: true | |
| test: | |
| name: Test on ${{ matrix.os }} with ${{ matrix.feature_set }} features | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| matrix: | |
| feature_set: [basic, all] | |
| os: [ubuntu-latest, windows-latest, macOS-latest] | |
| include: | |
| - feature_set: basic | |
| features: --features batch,dev-graph,gadget-traces | |
| - feature_set: all | |
| features: --all-features | |
| steps: | |
| - uses: actions/checkout@v3 | |
| - uses: actions-rs/toolchain@v1 | |
| with: | |
| override: false | |
| - name: Install fontconfig system dependency | |
| run: | | |
| if [[ "${{ matrix.os }}" == "ubuntu-latest" ]]; then | |
| sudo apt-get update && sudo apt-get install -y libfontconfig1-dev pkg-config | |
| elif [[ "${{ matrix.os }}" == "macOS-latest" ]]; then | |
| brew update && brew install fontconfig pkg-config | |
| elif [[ "${{ matrix.os }}" == "windows-latest" ]]; then | |
| choco install -y pkgconfiglite | |
| echo "PKG_CONFIG_PATH=\"C:/ProgramData/chocolatey/lib/pkgconfiglite/tools/$env:VCPKG_INSTANCE_NAME/lib/pkgconfig\"" >> "$GITHUB_ENV" | |
| fi | |
| shell: bash | |
| - name: Configure environment variables | |
| run: | | |
| echo "PKG_CONFIG_ALLOW_CROSS=1" >> "$GITHUB_ENV" | |
| echo "RUST_FONTCONFIG_DLOPEN=on" >> "$GITHUB_ENV" | |
| - name: Run tests | |
| uses: actions-rs/cargo@v1 | |
| with: | |
| command: test | |
| args: --verbose --release --workspace --no-default-features ${{ matrix.features }} | |
| examples: | |
| name: Run the examples | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v3 | |
| - uses: actions-rs/toolchain@v1 | |
| - name: Run examples | |
| run: | | |
| .github/scripts/run-examples.sh | |
| build: | |
| name: Build target ${{ matrix.target }} | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| target: | |
| - wasm32-unknown-unknown | |
| - wasm32-wasi | |
| steps: | |
| - uses: actions/checkout@v3 | |
| - uses: actions-rs/toolchain@v1 | |
| with: | |
| override: false | |
| default: true | |
| - name: Add target | |
| run: rustup target add ${{ matrix.target }} | |
| - name: Run script file | |
| run: | | |
| .github/scripts/wasm-target-test-build.sh | |
| bitrot: | |
| name: Bitrot check | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v3 | |
| - name: Install dependencies | |
| run: sudo apt-get update && sudo apt-get install -y libfontconfig1-dev pkg-config | |
| - name: Set up env | |
| run: | | |
| echo "PKG_CONFIG_PATH=/usr/lib/x86_64-linux-gnu/pkgconfig:$PKG_CONFIG_PATH" >> $GITHUB_ENV | |
| echo "RUST_FONTCONFIG_DLOPEN=on" >> $GITHUB_ENV | |
| - uses: actions-rs/toolchain@v1 | |
| with: | |
| override: false | |
| # Build benchmarks to prevent bitrot | |
| - name: Build benchmarks | |
| uses: actions-rs/cargo@v1 | |
| with: | |
| command: build | |
| args: --benches --examples --all-features | |
| doc-links: | |
| name: Intra-doc links | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v3 | |
| - uses: actions-rs/toolchain@v1 | |
| with: | |
| override: false | |
| - name: cargo fetch | |
| uses: actions-rs/cargo@v1 | |
| with: | |
| command: fetch | |
| # Ensure intra-documentation links all resolve correctly | |
| # Requires #![deny(intra_doc_link_resolution_failure)] in crates. | |
| - name: Check intra-doc links | |
| uses: actions-rs/cargo@v1 | |
| with: | |
| command: doc | |
| args: --all --document-private-items |