1111 - " xmake.lua"
1212
1313 pull_request :
14- branches : [main-test ]
14+ branches : [main]
1515 paths :
1616 - " .github/workflows/xmake.yml"
1717 - " include/**"
@@ -34,68 +34,38 @@ jobs:
3434 runs-on : ${{ matrix.os }}
3535
3636 steps :
37- - name : Setup dependencies (Linux)
38- if : runner.os == 'Linux'
39- run : |
40- sudo apt update
41- sudo apt install -y gcc-14 g++-14 libstdc++-14-dev
42- sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-14 100
43- sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-14 100
44- sudo update-alternatives --set gcc /usr/bin/gcc-14
45- sudo update-alternatives --set g++ /usr/bin/g++-14
46- wget https://apt.llvm.org/llvm.sh
47- chmod +x llvm.sh
48- sudo ./llvm.sh 20 all
49- sudo apt install -y cmake ninja-build
50-
51- - name : Setup dependencies (MacOS)
52- if : runner.os == 'macOS'
53- env :
54- HOMEBREW_NO_AUTO_UPDATE : 1
55- run : |
56- brew install llvm@20 lld@20
57-
5837 - name : Checkout repository
5938 uses : actions/checkout@v4
6039
6140 - name : Setup xmake
6241 uses : xmake-io/github-action-setup-xmake@v1
6342 with :
64- xmake-version : 3.0.4
43+ xmake-version : 3.0.5
6544 actions-cache-folder : " .xmake-cache"
6645 actions-cache-key : ${{ matrix.os }}
6746 package-cache : true
68- package-cache-key : ${{ matrix.os }}
47+ package-cache-key : ${{ matrix.os }}-pixi
6948 build-cache : true
7049 build-cache-key : ${{ matrix.os }}-${{ matrix.build_type }}
7150
72- - name : Build clice
73- shell : bash
74- run : |
75- if [[ "${{ runner.os }}" == "Windows" ]]; then
76- xmake config --yes --ci=y --mode=${{ matrix.build_type }} --toolchain=clang -p windows
77- elif [[ "${{ runner.os }}" == "Linux" ]]; then
78- xmake config --yes --ci=y --mode=${{ matrix.build_type }} --toolchain=clang-20
79- elif [[ "${{ runner.os }}" == "macOS" ]]; then
80- export PATH="/opt/homebrew/opt/llvm@20/bin:/opt/homebrew/opt/lld@20/bin:$PATH"
81- xmake config --yes --ci=y --mode=${{ matrix.build_type }} --toolchain=clang --sdk=/opt/homebrew/opt/llvm@20
82- fi
83-
84- xmake build --verbose --diagnosis --all
85-
86- - name : Install uv for integration tests
87- uses : astral-sh/setup-uv@v6
51+ - name : Setup Pixi
52+ uses : prefix-dev/setup-pixi@v0.9.3
53+ with :
54+ pixi-version : v0.61.0
55+ environments : develop
56+ activate-environment : true
57+ cache : true
58+ locked : true
8859
89- - name : Run tests
90- shell : bash
60+ - name : Build
9161 run : |
92- # Workaround for macOS
93- if [[ "${{ runner.os }}" == "macOS" ]]; then
94- export PATH="/opt/homebrew/opt/llvm@20/bin:/opt/homebrew/opt/lld@20/bin:$PATH"
95- fi
62+ pixi run ci-xmake-build ${{ matrix.build_type }}
9663
97- xmake test --verbose
64+ - name : Test
65+ run : |
66+ pixi run xmake-test
9867
68+ # Clean up llvm package to reduce cache size
9969 - name : Remove llvm package (Linux)
10070 if : runner.os == 'Linux'
101- run : rm -rf /home/runner/.xmake/packages/c/ clice-llvm
71+ run : xmake require --uninstall clice-llvm
0 commit comments