ci: improve jobs

This commit is contained in:
alichraghi 2022-07-21 17:30:46 +04:30 committed by Stephen Gutekanst
parent fc90fa6689
commit 741b4d9eb7
2 changed files with 12 additions and 39 deletions

View file

@ -20,19 +20,22 @@ jobs:
run: |
sudo apt install xz-utils
sudo sh -c 'wget -c https://ziglang.org/builds/zig-linux-x86_64-0.10.0-dev.3027+0e26c6149.tar.xz -O - | tar -xJ --strip-components=1 -C /usr/local/bin'
- name: x86_64-linux -> x86_64-linux-musl
if: matrix.project == 'freetype' || matrix.project == 'glfw'
run: cd ${{ matrix.project }} && zig build -Dtarget=x86_64-linux-mul
- name: x86_64-linux -> x86_64-macos
run: cd ${{ matrix.project }} && zig build test -Dtarget=x86_64-macos.12-none
run: cd ${{ matrix.project }} && zig build -Dtarget=x86_64-macos.12-none
env:
AGREE: true
- name: x86_64-linux -> aarch64-macos
run: cd ${{ matrix.project }} && zig build test -Dtarget=aarch64-macos.12-none
run: cd ${{ matrix.project }} && zig build -Dtarget=aarch64-macos.12-none
env:
AGREE: true
- name: x86_64-linux -> x86_64-windows
run: cd ${{ matrix.project }} && zig build test -Dtarget=x86_64-windows-gnu
run: cd ${{ matrix.project }} && zig build -Dtarget=x86_64-windows-gnu
- name: compile all examples
if: matrix.project == '.'
run: cd ${{ matrix.project }} && zig build compile-all
run: cd ${{ matrix.project }} && zig build compile-all -Dtarget=x86_64-linux-gnu
- name: compile all examples (WASM)
if: matrix.project == '.'
run: cd ${{ matrix.project }} && zig build compile-all -Dtarget=wasm32-freestanding-none
@ -64,22 +67,9 @@ jobs:
cd C:\
7z x zig.zip
Add-Content $env:GITHUB_PATH "C:\zig-windows-x86_64-0.10.0-dev.3027+0e26c6149\"
- name: x86_64-windows -> x86_64-macos
run: cd ${{ matrix.project }} && zig build test -Dtarget='x86_64-macos.12-none'
env:
AGREE: true
- name: x86_64-windows -> aarch64-macos
run: cd ${{ matrix.project }} && zig build test -Dtarget='aarch64-macos.12-none'
env:
AGREE: true
- name: x86_64-windows -> x86_64-linux
run: cd ${{ matrix.project }} && zig build test -Dtarget=x86_64-linux-gnu
- name: compile all examples
if: matrix.project == '.'
run: cd ${{ matrix.project }} && zig build compile-all
- name: compile all examples (WASM)
if: matrix.project == '.'
run: cd ${{ matrix.project }} && zig build compile-all -Dtarget=wasm32-freestanding-none
- name: test
run: cd ${{ matrix.project }} && zig build test
x86_64-macos:
@ -98,17 +88,8 @@ jobs:
brew uninstall --ignore-dependencies libx11 # https://github.com/ziglang/zig/issues/11066
brew install xz
sudo sh -c 'wget -c https://ziglang.org/builds/zig-macos-x86_64-0.10.0-dev.3027+0e26c6149.tar.xz -O - | tar -xJ --strip-components=1 -C /usr/local/bin'
# TODO: re-enable once we can use macos-12 reliably on GitHub actions (currently works, but
# takes a very long time to acquire macos-12 runners.)
# - name: test
# run: cd ${{ matrix.project }} && zig build test
# env:
# AGREE: true
- name: x86_64-macos -> aarch64-macos
run: cd ${{ matrix.project }} && zig build test -Dtarget=aarch64-macos.12-none
- name: test
run: cd ${{ matrix.project }} && zig build test
env:
AGREE: true
- name: x86_64-macos -> x86_64-windows
run: cd ${{ matrix.project }} && zig build test -Dtarget=x86_64-windows-gnu
- name: x86_64-macos -> x86_64-linux
run: cd ${{ matrix.project }} && zig build test -Dtarget=x86_64-linux-gnu

View file

@ -32,14 +32,6 @@ jobs:
run: zig build test
env:
AGREE: true
- name: aarch64-macos -> x86_64-macos
run: zig build test -Dtarget=x86_64-macos.12-none
env:
AGREE: true
- name: aarch64-macos -> x86_64-windows
run: zig build test -Dtarget=x86_64-windows-gnu
- name: aarch64-macos -> x86_64-linux
run: zig build test -Dtarget=x86_64-linux-gnu
- name: compile all examples
if: matrix.project == '.'
run: cd ${{ matrix.project }} && zig build compile-all