Fix yml #11
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: Build and Test | |
| on: | |
| push: | |
| tags: | |
| - 'v*' | |
| pull_request: | |
| branches: | |
| - main | |
| jobs: | |
| build: | |
| name: Build and Test | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| matrix: | |
| os: [ubuntu-latest, windows-latest, macos-latest] | |
| features: | |
| - "" | |
| - "cuda" | |
| - "vulkan" | |
| - "metal" | |
| include: | |
| - os: macos-latest | |
| features: "metal" | |
| - os: windows-latest | |
| features: "cuda" | |
| - os: windows-latest | |
| features: "vulkan" | |
| - os: ubuntu-latest | |
| features: "cuda" | |
| - os: ubuntu-latest | |
| features: "vulkan" | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v3 | |
| with: | |
| submodules: true | |
| - name: Set up Rust | |
| uses: actions-rs/toolchain@v1 | |
| with: | |
| toolchain: stable | |
| override: true | |
| - name: Build | |
| run: | | |
| cargo build --release${{ matrix.features && format(' --features {0}', matrix.features) || '' }} | |
| - name: Run Tests | |
| run: | | |
| cargo test ${{ matrix.features && format(' --features {0}', matrix.features) || '' }} | |
| - name: Create Zip Archive | |
| if: startsWith(github.ref, 'refs/tags/') | |
| run: | | |
| zip -j target/release/${{ matrix.os }}-${{ matrix.features }}.zip target/release/ltengine* | |
| - name: Upload Artifact | |
| if: startsWith(github.ref, 'refs/tags/') | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: ${{ matrix.os }}-${{ matrix.features }} | |
| path: target/release/${{ matrix.os }}-${{ matrix.features }}.zip |