try with and without features #20
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 | |
| permissions: | |
| pages: write | |
| id-token: write | |
| on: | |
| push: | |
| branches: [ master ] | |
| pull_request: | |
| branches: [ master ] | |
| jobs: | |
| build: | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: [ ubuntu-latest, windows-latest, macos-latest ] | |
| rust: [ stable, beta, nightly ] | |
| runs-on: ${{ matrix.os }} | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| with: | |
| submodules: true | |
| - name: Set up Rust | |
| uses: actions-rs/toolchain@v1 | |
| with: | |
| toolchain: ${{ matrix.rust }} | |
| override: true | |
| components: rustfmt, clippy | |
| - name: Cache Cargo registry | |
| if: runner.os != 'Windows' | |
| uses: actions/cache@v4 | |
| with: | |
| path: | | |
| ~/.cargo/registry | |
| ~/.cargo/git | |
| key: ${{ runner.os }}-cargo-registry-${{ hashFiles('**/Cargo.lock') }} | |
| restore-keys: | | |
| ${{ runner.os }}-cargo-registry- | |
| - name: Dependencies | |
| if: runner.os == 'Linux' | |
| run: | | |
| SDK_VERSION=$(curl -s https://vulkan.lunarg.com/sdk/latest/linux.txt) | |
| curl -O https://sdk.lunarg.com/sdk/download/${SDK_VERSION}/linux/vulkan_sdk.tar.xz | |
| tar -xf vulkan_sdk.tar.xz | |
| ./vulkan_sdk/install.sh | |
| - name: Dependencies | |
| if: runner.os == 'macOS' | |
| run: | | |
| SDK_VERSION=$(curl -s https://vulkan.lunarg.com/sdk/latest/mac.txt) | |
| curl -O https://sdk.lunarg.com/sdk/download/${SDK_VERSION}/mac/vulkan_sdk.zip | |
| unzip vulkan_sdk.zip | |
| ./vulkan_sdk/install.sh | |
| - name: Dependencies | |
| if: runner.os == 'Windows' | |
| run: | | |
| $SDK_VERSION = Invoke-RestMethod -Uri https://vulkan.lunarg.com/sdk/latest/windows.txt | |
| Invoke-WebRequest -Uri https://sdk.lunarg.com/sdk/download/$SDK_VERSION/windows/vulkan_sdk.exe -OutFile vulkan_sdk.exe | |
| Start-Process -FilePath vulkan_sdk.exe -ArgumentList "/S" -Wait | |
| - run: cargo build --verbose --workspace --all-targets | |
| - run: cargo check --verbose --workspace --all-targets | |
| - run: cargo clippy --verbose --workspace --all-targets -- -D warnings | |
| - run: cargo fmt --all -- --check | |
| - run: cargo test --verbose --workspace --all-targets --no-fail-fast --lib --bins --examples --tests --benches | |
| - run: cargo build --verbose --workspace --all-targets --all-features | |
| - run: cargo check --verbose --workspace --all-targets --all-features | |
| - run: cargo clippy --verbose --workspace --all-targets --all-features -- -D warnings | |
| - run: cargo fmt --all -- --check | |
| - run: cargo test --verbose --workspace --all-targets --all-features --no-fail-fast --lib --bins --examples --tests --benches | |
| - run: git diff --exit-code | |
| - name: Generate cargo docs | |
| if: ${{ github.event_name == 'push' && matrix.rust == 'stable' }} | |
| run: cargo doc --workspace --no-deps | |
| - name: Upload artifact | |
| if: ${{ github.event_name == 'push' && matrix.rust == 'stable' }} | |
| uses: actions/upload-pages-artifact@v3 | |
| with: | |
| path: "./target/doc" | |
| - name: Deploy to GitHub Pages | |
| if: ${{ github.event_name == 'push' && matrix.rust == 'stable' }} | |
| id: deployment | |
| uses: actions/deploy-pages@v4 |