More changes to CI and subsequent fixes #558
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: [master] } | |
| pull_request: { branches: ["**"] } | |
| jobs: | |
| check: | |
| name: Check (${{ matrix.rust }}) | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: { rust: ["stable", "nightly"] } # "1.67.0", | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: dtolnay/rust-toolchain@master | |
| with: { toolchain: "${{ matrix.rust }}" } | |
| - name: Run cargo check for codespan | |
| run: cargo check | |
| - name: Run cargo check for codespan-reporting | |
| run: cargo check -p codespan-reporting | |
| - name: Run cargo check for codespan-lsp | |
| run: cargo check -p codespan-lsp | |
| test: | |
| needs: check | |
| name: Test Suite (${{ matrix.rust }}) | |
| runs-on: ubuntu-latest | |
| strategy: | |
| fail-fast: false | |
| matrix: { rust: ["stable", "nightly"] } | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: dtolnay/rust-toolchain@master | |
| with: { toolchain: '${{ matrix.rust }}' } | |
| - name: Run cargo test for codespan | |
| run: cargo test -p codespan | |
| - name: Run cargo test for codespan-reporting (no features) | |
| run: cargo test -p codespan-reporting --no-default-features | |
| - name: Run cargo test for codespan-reporting (only std feature) | |
| run: cargo test -p codespan-reporting --no-default-features --features std | |
| - name: Run cargo test for codespan-reporting (all default features) | |
| run: cargo test -p codespan-reporting | |
| - name: Run cargo test for codespan-lsp | |
| run: cargo test -p codespan-lsp | |
| format: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| fail-fast: false | |
| matrix: { rust: ["stable"] } | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: dtolnay/rust-toolchain@stable | |
| with: { toolchain: '${{ matrix.rust }}', components: 'rustfmt' } | |
| - name: Run cargo fmt | |
| run: cargo fmt --all -- --check | |
| - uses: kaleidawave/release-downloader@improvements | |
| with: { items: 'kaleidawave/simple-toml-parser@canary[format]' } | |
| - name: Check 'Cargo.toml' formatting | |
| run: format cargo --check | |
| lint: | |
| needs: check | |
| name: clippy (${{ matrix.rust }}) | |
| runs-on: ubuntu-latest | |
| strategy: | |
| fail-fast: false | |
| matrix: { rust: ["stable"] } | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: dtolnay/rust-toolchain@master | |
| with: { toolchain: "${{ matrix.rust }}", components: 'clippy' } | |
| - name: Run cargo clippy | |
| run: cargo clippy --all | |
| dependants: | |
| runs-on: ubuntu-latest | |
| if: contains(github.event.pull_request.labels.*.name, 'api') | |
| # Just a warning for now | |
| continue-on-error: true | |
| timeout-minutes: 5 | |
| strategy: | |
| matrix: | |
| # Test dependenents of the codespan project that | |
| repository: | |
| - dtolnay/cxx | |
| - gfx-rs/wgpu | |
| - bevyengine/bevy | |
| - EmbarkStudios/toml-span | |
| - bevyengine/naga_oil | |
| include: | |
| - repository: gfx-rs/wgpu | |
| path: naga | |
| - repository: bevyengine/bevy | |
| path: crates/bevy_render | |
| - repository: EmbarkStudios/toml-span | |
| path: toml-span | |
| fail-fast: false | |
| steps: | |
| - uses: dtolnay/rust-toolchain@stable | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| with: { repository: "${{ matrix.repository }}" } | |
| - name: Run check that it works | |
| run: cargo locate-project | |
| working-directory: ${{ matrix.path }} | |
| - name: Update dependency to ${{ github.repository }} on ${{ github.head_ref }} | |
| run: cargo add codespan-reporting --git https://github.com/${{ github.repository }} --branch ${{ github.head_ref }} | |
| working-directory: ${{ matrix.path }} | |
| - name: Run cargo tree | |
| run: cargo tree | |
| working-directory: ${{ matrix.path }} | |
| - name: Run check | |
| run: cargo check; cargo check --examples | |
| working-directory: ${{ matrix.path }} | |
| publish-ability: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: dtolnay/rust-toolchain@stable | |
| - uses: dorny/paths-filter@v3 | |
| id: changes | |
| with: { filters: "{ 'manifests': ['**/*.toml'] }" } | |
| - uses: kaleidawave/release-downloader@improvements | |
| if: steps.changes.outputs.manifests == 'true' | |
| with: { items: 'kaleidawave/crates-release-gh-action@assets[crates-release]' } | |
| - name: Check that it will publish to crates.io | |
| if: steps.changes.outputs.manifests == 'true' | |
| run: crates-release verify |