Skip to content

Commit 85d6afe

Browse files
committed
try build with zig
1 parent 57f509b commit 85d6afe

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

.github/workflows/build.yml

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -44,10 +44,12 @@ jobs:
4444
if: startsWith(matrix.os, 'ubuntu')
4545
run: |
4646
if [[ "${{ matrix.zig_build }}" == "true" ]]; then
47-
snap install zig --classic --beta
48-
cmake -B build -G Ninja --toolchain aarch64-linux-gnu.cmake -DCMAKE_BUILD_TYPE=Release -DEMMY_CORE_VERSION=${{env.TAG}}
49-
cmake --build . --config Release
50-
cmake --install . --config Release --prefix ${{ github.workspace }}/artifact/
47+
sudo snap install zig --classic --beta
48+
mkdir -p build
49+
# 使用Zig作为工具链编译C++项目
50+
cmake -B build -G Ninja -DCMAKE_C_COMPILER=zig-cc -DCMAKE_CXX_COMPILER=zig-c++ -DCMAKE_BUILD_TYPE=Release -DEMMY_CORE_VERSION=${{env.TAG}}
51+
cmake --build build --config Release
52+
cmake --install build --config Release --prefix ${{ github.workspace }}/artifact/
5153
else
5254
mkdir build
5355
cd build

0 commit comments

Comments
 (0)