fix zlib conflicts #3213
This file contains 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-xmake | |
on: [ push, pull_request ] | |
jobs: | |
# build-linux: | |
# strategy: | |
# fail-fast: false | |
# matrix: | |
# toolchain: [gcc, clang] | |
# config: [ release, debug ] | |
# name: Ubuntu / ${{ matrix.config }} / ${{ matrix.toolchain }} | |
# runs-on: ubuntu-24.04 | |
# steps: | |
# - uses: actions/checkout@v4 | |
# with: | |
# submodules: recursive | |
# - name: "Install Dependencies" | |
# run: | | |
# sudo apt-get update | |
# wget https://apt.llvm.org/llvm.sh | |
# chmod +x llvm.sh | |
# sudo ./llvm.sh 18 all | |
# sudo apt-get -y install build-essential wget xmake cmake ninja-build uuid-dev libxinerama-dev libxcursor-dev libxi-dev libvulkan-dev | |
# curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y | |
# - name: "Setup CUDA" | |
# run: | | |
# wget https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2404/x86_64/cuda-keyring_1.1-1_all.deb | |
# sudo dpkg -i cuda-keyring_1.1-1_all.deb | |
# sudo apt-get update | |
# sudo apt-get -y install cuda-toolkit | |
# - name: "Setup Vulkan" | |
# uses: humbletim/[email protected] | |
# with: | |
# vulkan-query-version: 1.3.204.0 | |
# vulkan-components: Vulkan-Headers, Vulkan-Loader | |
# vulkan-use-cache: true | |
# - name: "Configure and Build" | |
# run: | | |
# xmake lua setup.lua | |
# xmake f -p linux -a x86_64 --toolchain=${{ matrix.toolchain }} -m ${{ matrix.config }} --cuda_backend=true --enable_dsl=true --enable_gui=true --enable_unity_build=false --enable_tests=true --enable_mimalloc=false --check -c -y | |
# xmake --jobs=16 | |
build-macos: | |
strategy: | |
fail-fast: false | |
matrix: | |
compiler: [ homebrew-clang, system-clang ] | |
config: [ release, debug ] | |
name: macOS / ${{ matrix.config }} / ${{ matrix.compiler }} | |
runs-on: macos-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
submodules: recursive | |
- name: "Install Dependencies" | |
run: | | |
if [ "${{ matrix.compiler }}" = "homebrew-clang" ]; then | |
brew install llvm | |
fi | |
brew install molten-vk ninja cmake xmake | |
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y | |
- name: "Configure and Build" | |
run: | | |
xmake lua setup.lua | |
if [ "${{ matrix.compiler }}" = "homebrew-clang" ]; then | |
export PATH=/usr/local/opt/llvm/bin:$PATH | |
xmake f -p macosx --toolchain=llvm -m ${{ matrix.config }} --mm=clang --mxx=clang++ --metal_backend=true --enable_dsl=true --enable_gui=true --enable_unity_build=false --enable_tests=true --enable_mimalloc=false --check -c -y | |
else | |
xmake f -p macosx --toolchain=clang -m ${{ matrix.config }} --mm=clang --mxx=clang++ --metal_backend=true --enable_dsl=true --enable_gui=true --enable_unity_build=false --enable_tests=true --enable_mimalloc=false --check -c -y | |
fi | |
xmake -v | |
build-windows: | |
strategy: | |
fail-fast: false | |
matrix: | |
config: [ release, debug ] | |
compiler: [ msvc, clang-cl, llvm ] | |
name: Windows / ${{ matrix.config }} / ${{ matrix.compiler }} | |
runs-on: windows-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
submodules: recursive | |
- name: "Setup Ninja" | |
uses: ashutoshvarma/setup-ninja@master | |
with: | |
version: 1.11.1 | |
- name: "Setup CUDA" | |
uses: Jimver/[email protected] | |
- name: "Setup Rust" | |
uses: actions-rust-lang/[email protected] | |
- name: "Setup Vulkan" | |
uses: humbletim/[email protected] | |
with: | |
vulkan-query-version: 1.3.204.0 | |
vulkan-components: Vulkan-Headers, Vulkan-Loader | |
vulkan-use-cache: true | |
- name: "Setup LLVM" | |
uses: ZhongRuoyu/setup-llvm@v0 | |
with: | |
llvm-version: 18 | |
- name: "Setup XMake" | |
uses: xmake-io/github-action-setup-xmake@v1 | |
- name: "Configure and Build" | |
shell: cmd | |
run: | | |
xmake lua setup.lua ../luisa_compute_sdks | |
if "${{ matrix.compiler }}" == "llvm" ( | |
xmake f -p windows -a x64 --toolchain=llvm --sdk="C:/Program Files/LLVM" -m ${{ matrix.config }} --dx_backend=true --cuda_backend=true --enable_dsl=true --enable_gui=true --enable_unity_build=false --enable_tests=true --sdk_dir=../luisa_compute_sdks --check -c -y | |
) else ( | |
xmake f -p windows -a x64 --toolchain=${{ matrix.compiler }} -m ${{ matrix.config }} --dx_backend=true --cuda_backend=true --enable_dsl=true --enable_gui=true --enable_unity_build=false --enable_tests=true --sdk_dir=../luisa_compute_sdks --check -c -y | |
) | |
xmake |