Download latest Slang release in CI instead of building Slang TOT #67
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: Continuous Integration for PR | |
| on: | |
| pull_request: | |
| branches: | |
| - main | |
| jobs: | |
| # Build job | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Build and cache WASM dependencies | |
| uses: ./.github/actions/build-wasm-deps | |
| with: | |
| build-artifacts-dir: ./src | |
| - name: Copy types to compilation engine | |
| run: | | |
| cp ./src/slang-wasm.d.ts ./engine/slang-compilation-engine/media/slang-wasm.d.ts | |
| cp ./src/spirv-tools.d.ts ./engine/slang-compilation-engine/media/spirv-tools.d.ts | |
| - name: Build | |
| run: | | |
| npm install | |
| npm run build | |
| - name: Upload export artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: site-artifact | |
| path: ./dist/ | |
| compression-level: 1 | |
| - name: Smoke test | |
| run: | | |
| cp ./src/slang-wasm.wasm.gz ./src/slang-wasm.js ./src/slang-wasm.d.ts ./ | |
| pushd emsdk | |
| /bin/sh ./emsdk install latest | |
| /bin/sh ./emsdk activate latest | |
| source ./emsdk_env.sh | |
| popd | |
| gzip -d src/slang-wasm.wasm.gz | |
| cp src/slang-wasm.wasm ./ | |
| cp slang-repo/tests/wasm/smoke/smoke-test.js slang-repo/ | |
| node slang-repo/smoke-test.js engine/slang-compilation-engine/src/slang/rand_float.slang computeMain |