From 741b4d9eb768ee6d7214d625175666186f1d8623 Mon Sep 17 00:00:00 2001 From: alichraghi Date: Thu, 21 Jul 2022 17:30:46 +0430 Subject: [PATCH] ci: improve jobs --- .github/workflows/ci.yml | 43 +++++++++++-------------------------- .github/workflows/m1_ci.yml | 8 ------- 2 files changed, 12 insertions(+), 39 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 054fa605..1cae6e9f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -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 - 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 + - name: test + run: cd ${{ matrix.project }} && zig build test + env: + AGREE: true + diff --git a/.github/workflows/m1_ci.yml b/.github/workflows/m1_ci.yml index 6b52a632..89ae4e9f 100644 --- a/.github/workflows/m1_ci.yml +++ b/.github/workflows/m1_ci.yml @@ -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