Skip to content

Commit

Permalink
DRAFT 624 - test GH Actions for Zig build
Browse files Browse the repository at this point in the history
  • Loading branch information
ivmai committed Dec 24, 2023
1 parent abb43bb commit bbb0c83
Show file tree
Hide file tree
Showing 6 changed files with 544 additions and 1,102 deletions.
179 changes: 0 additions & 179 deletions .appveyor.yml

This file was deleted.

113 changes: 0 additions & 113 deletions .github/workflows/cmake-build.yml

This file was deleted.

34 changes: 34 additions & 0 deletions .github/workflows/zig-xbuild.yml
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 }}
Loading

0 comments on commit bbb0c83

Please sign in to comment.