|
67 | 67 | if: ${{ matrix.target != 'aarch64-linux-android' }}
|
68 | 68 | run: cargo test -p rustc_codegen_spirv --release --no-default-features --features "use-installed-tools"
|
69 | 69 |
|
70 |
| - - name: compiletest |
71 |
| - if: ${{ matrix.target != 'aarch64-linux-android' }} |
72 |
| - run: cargo run -p compiletests --release --no-default-features --features "use-installed-tools" -- --target-env vulkan1.1,vulkan1.2,spv1.3 |
73 |
| - |
74 |
| - - name: difftest |
75 |
| - if: ${{ matrix.target != 'aarch64-linux-android' }} |
76 |
| - run: cargo run -p difftests --release --no-default-features --features "use-installed-tools" |
77 |
| - |
78 | 70 | - name: workspace test
|
79 | 71 | if: ${{ matrix.target != 'aarch64-linux-android' }}
|
80 | 72 | run: cargo test --release
|
@@ -125,11 +117,71 @@ jobs:
|
125 | 117 | cargo apk build -p example-runner-wgpu --lib --features use-installed-tools --no-default-features
|
126 | 118 | echo "::endgroup::"
|
127 | 119 |
|
128 |
| - # This just allows us to branch protect on this one job rather needing to change |
129 |
| - # it if the test matrix changes |
| 120 | + compiletest: |
| 121 | + name: Compiletest |
| 122 | + strategy: |
| 123 | + matrix: |
| 124 | + include: |
| 125 | + - os: ubuntu-24.04 |
| 126 | + target: x86_64-unknown-linux-gnu |
| 127 | + - os: windows-2022 |
| 128 | + target: x86_64-pc-windows-msvc |
| 129 | + - os: macOS-latest |
| 130 | + target: x86_64-apple-darwin |
| 131 | + runs-on: ${{ matrix.os }} |
| 132 | + steps: |
| 133 | + - uses: actions/checkout@v4 |
| 134 | + - name: Install spirv-tools binaries |
| 135 | + shell: bash |
| 136 | + run: cargo run --manifest-path .github/install-spirv-tools/Cargo.toml -- ${{matrix.target}} 0.10.0 "${{github.workspace}}/bin" |
| 137 | + # cargo version is a random command that forces the installation of rust-toolchain |
| 138 | + - name: install rust-toolchain |
| 139 | + run: cargo version |
| 140 | + - name: cargo fetch --locked |
| 141 | + run: cargo fetch --locked --target ${{ matrix.target }} |
| 142 | + - name: compiletest |
| 143 | + run: cargo run -p compiletests --release --no-default-features --features "use-installed-tools" -- --target-env vulkan1.1,vulkan1.2,spv1.3 |
| 144 | + |
| 145 | + difftest: |
| 146 | + name: Difftest |
| 147 | + strategy: |
| 148 | + matrix: |
| 149 | + include: |
| 150 | + - os: ubuntu-24.04 |
| 151 | + target: x86_64-unknown-linux-gnu |
| 152 | + - os: windows-2022 |
| 153 | + target: x86_64-pc-windows-msvc |
| 154 | + - os: macOS-latest |
| 155 | + target: x86_64-apple-darwin |
| 156 | + runs-on: ${{ matrix.os }} |
| 157 | + steps: |
| 158 | + - uses: actions/checkout@v4 |
| 159 | + - name: Install spirv-tools binaries |
| 160 | + shell: bash |
| 161 | + run: cargo run --manifest-path .github/install-spirv-tools/Cargo.toml -- ${{matrix.target}} 0.10.0 "${{github.workspace}}/bin" |
| 162 | + - if: ${{ runner.os == 'Linux' }} |
| 163 | + name: Linux - Install native dependencies |
| 164 | + run: sudo apt install libwayland-cursor0 libxkbcommon-dev libwayland-dev |
| 165 | + - if: ${{ runner.os == 'Linux' }} |
| 166 | + name: Install xvfb, llvmpipe and lavapipe |
| 167 | + run: | |
| 168 | + sudo apt-get update -y -qq |
| 169 | + sudo add-apt-repository ppa:kisak/turtle -y |
| 170 | + sudo apt-get update |
| 171 | + sudo apt install -y xvfb libgl1-mesa-dri libxcb-xfixes0-dev mesa-vulkan-drivers |
| 172 | + # cargo version is a random command that forces the installation of rust-toolchain |
| 173 | + - name: install rust-toolchain |
| 174 | + run: cargo version |
| 175 | + - name: cargo fetch --locked |
| 176 | + run: cargo fetch --locked --target ${{ matrix.target }} |
| 177 | + - name: difftest |
| 178 | + run: cargo run -p difftests --release --no-default-features --features "use-installed-tools" |
| 179 | + |
| 180 | + # This allows us to have a single job we can branch protect on, rather than needing |
| 181 | + # to update the branch protection rules when the test matrix changes |
130 | 182 | test_success:
|
131 | 183 | runs-on: ubuntu-24.04
|
132 |
| - needs: test |
| 184 | + needs: [test, compiletest, difftest] |
133 | 185 | steps:
|
134 | 186 | - run: echo "All test jobs passed"
|
135 | 187 |
|
|
0 commit comments