-
Notifications
You must be signed in to change notification settings - Fork 408
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
DRAFT 624 - test GH Actions for Zig build
- Loading branch information
Showing
6 changed files
with
544 additions
and
1,102 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
# This workflow uses Zig and its excellent cross-compilation support to test | ||
# compiling for multiple platforms. No tests are actually run since it would | ||
# require emulation. | ||
name: zig cross-compile | ||
|
||
on: [push, pull_request] | ||
|
||
jobs: | ||
build: | ||
name: ${{ matrix.ttriple }} thr:${{ matrix.enable_threads }} dll:${{ matrix.shared_libs }} | ||
runs-on: ubuntu-latest | ||
|
||
strategy: | ||
fail-fast: false | ||
matrix: | ||
ttriple: [ armv7-unknown-linux-musleabihf, aarch64-linux-musl, riscv64-linux-musl, x86_64-linux-musl, wasm32-wasi, aarch64-macos-gnu, x86_64-macos-gnu, i686-pc-windows-gnu ] | ||
#x86_64-linux-gnu.2.27, x86_64-windows-gnu ] | ||
shared_libs: [ false, true ] | ||
enable_threads: [ false, true ] | ||
exclude: | ||
- ttriple: wasm32-wasi | ||
enable_threads: true | ||
|
||
# TODO: move from nightly to zig 0.12 when released. | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: "Install zig" | ||
run: | | ||
mkdir zig && curl https://ziglang.org/builds/zig-linux-x86_64-0.12.0-dev.1814+5c0d58b71.tar.xz | tar Jx --directory=zig --strip-components=1 | ||
- name: Build | ||
run: > | ||
zig/zig build -Dtarget=${{ matrix.ttriple }} | ||
-DBUILD_SHARED_LIBS=${{ matrix.shared_libs }} | ||
-Denable_threads=${{ matrix.enable_threads }} |
Oops, something went wrong.