Merge all artifacts into a single zip file #97
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 DXC | |
| on: [push] | |
| jobs: | |
| build-dxc-macos: | |
| runs-on: macos-15-xlarge | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - run: git clone https://github.com/microsoft/DirectXShaderCompiler.git dxc --revision=$(cat commit-hash) --recurse-submodules | |
| - run: cmake -Bbuild -GNinja -C cmake/caches/PredefinedParams.cmake -DSPIRV_BUILD_TESTS=OFF -DCMAKE_BUILD_TYPE=Release -DLLVM_ENABLE_WERROR=OFF | |
| working-directory: dxc | |
| - run: cmake --build dxc/build -t dxcompiler | |
| - uses: actions/upload-artifact@v6 | |
| with: | |
| name: MacOS aarch64 libdxcompiler.dylib | |
| path: dxc/build/lib/libdxcompiler.dylib | |
| build-dxc-linux: | |
| # runs-on: linux-hosted-runner | |
| runs-on: ubuntu-22.04 # For older GLIBC, the "hosted runner" above has Ubuntu 24.04 whose compiled binaries require glibc 2.38. | |
| steps: | |
| - run: sudo apt-get install -y ninja-build | |
| - uses: actions/checkout@v6 | |
| - run: git clone https://github.com/microsoft/DirectXShaderCompiler.git dxc --revision=$(cat commit-hash) --recurse-submodules | |
| - run: cmake -Bbuild -GNinja -C cmake/caches/PredefinedParams.cmake -DSPIRV_BUILD_TESTS=OFF -DCMAKE_BUILD_TYPE=Release -DLLVM_ENABLE_WERROR=OFF | |
| working-directory: dxc | |
| - run: cmake --build dxc/build -t dxcompiler | |
| - uses: actions/upload-artifact@v6 | |
| with: | |
| name: Linux x64 libdxcompiler.so | |
| path: dxc/build/lib/libdxcompiler.so | |
| build-dxc-windows: | |
| # runs-on: windows-large-runner | |
| runs-on: windows-2022 | |
| # According to https://learn.microsoft.com/en-us/windows/release-health/release-information | |
| # 19045.6691 is the latest/last Windows 10 release, which we need to target in order | |
| # to load dxcompiler.dll on our older GPU-runner CI machines. | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - run: git clone https://github.com/microsoft/DirectXShaderCompiler.git dxc --revision=$(cat commit-hash) --recurse-submodules | |
| - run: cmake -Bbuild -G "Visual Studio 17 2022" -C cmake/caches/PredefinedParams.cmake -DSPIRV_BUILD_TESTS=OFF -DLLVM_ENABLE_WERROR=OFF -DCMAKE_SYSTEM_VERSION="10.0.19045.6691" | |
| working-directory: dxc | |
| - run: cmake --build dxc/build --config Release -t dxcompiler | |
| - uses: actions/upload-artifact@v6 | |
| with: | |
| name: Windows x64 dxcompiler.dll | |
| path: dxc/build/Release/bin/dxcompiler.* | |
| # Cross-compile to ARM64 with workaround from https://github.com/microsoft/DirectXShaderCompiler/issues/7000#issuecomment-2460490566 (also in hctbuild.cmd) | |
| - run: > | |
| cmake -Bbuild-aarch64 -G "Visual Studio 17 2022" -C cmake/caches/PredefinedParams.cmake -DSPIRV_BUILD_TESTS=OFF -DLLVM_ENABLE_WERROR=OFF -DCMAKE_SYSTEM_VERSION="10.0.19045.6691" | |
| -DHLSL_INCLUDE_TESTS=OFF | |
| -DLLVM_INCLUDE_TESTS=OFF | |
| -DCLANG_INCLUDE_TESTS=OFF | |
| -A ARM64 | |
| -DLLVM_TABLEGEN="$(Resolve-Path build\Release\bin\llvm-tblgen.exe)" | |
| -DCLANG_TABLEGEN="$(Resolve-Path build\Release\bin\clang-tblgen.exe)" | |
| working-directory: dxc | |
| - run: cmake --build dxc/build-aarch64 --config Release -t dxcompiler | |
| - uses: actions/upload-artifact@v6 | |
| with: | |
| name: Windows aarch64 dxcompiler.dll | |
| path: dxc/build-aarch64/Release/bin/dxcompiler.* | |
| merge: | |
| runs-on: ubuntu-latest | |
| needs: | |
| - build-dxc-macos | |
| - build-dxc-linux | |
| - build-dxc-windows | |
| steps: | |
| - name: Merge Artifacts | |
| uses: actions/upload-artifact/merge@v6 | |
| with: | |
| name: dxcompiler | |
| pattern: "*dxcompiler*" |