Skip to content

Commit

Permalink
Add Windows Zig example programs build
Browse files Browse the repository at this point in the history
  • Loading branch information
fwsGonzo committed Dec 12, 2024
1 parent bcfa1bc commit 5d732ab
Showing 1 changed file with 35 additions and 0 deletions.
35 changes: 35 additions & 0 deletions .github/workflows/zig-windows.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: Zig C++ Windows AMD64
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]

env:
BUILD_TYPE: Release

jobs:
build:
runs-on: windows-latest
env:
CC: zig cc -target riscv64-linux-musl
CXX: zig c++ -target riscv64-linux-musl

steps:
- uses: actions/checkout@v2

- name: Install dependencies
run: |
git submodule update --init --recursive --depth=1
# Install Zig
curl -L https://ziglang.org/builds/zig-windows-x86_64-0.14.0-dev.2441+3670910f2.zip -o zig.zip
7z.exe x -y zig.zip
shell: bash

- name: Build all examples
working-directory: ${{github.workspace}}
run: |
export PATH=$PWD/zig-windows-x86_64-0.14.0-dev.2441+3670910f2:$PATH
cmake -B build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DSTRIPPED=ON -DCMAKE_TOOLCHAIN_FILE=cmake/zig-toolchain.cmake -DCMAKE_C_COMPILER="${{env.CC}}" -DCMAKE_CXX_COMPILER="${{env.CXX}}"
cmake --build build --parallel 8
shell: bash

0 comments on commit 5d732ab

Please sign in to comment.