From b5d8c669a267ed11c49a97a507bfc8eefa18992e Mon Sep 17 00:00:00 2001 From: Ali Chraghi Date: Sat, 6 Aug 2022 14:39:54 +0430 Subject: [PATCH] CI: remove unneeded builds on sub-projects --- .github/workflows/ci.yml | 14 ++++---------- .github/workflows/m1_ci.yml | 11 +++-------- 2 files changed, 7 insertions(+), 18 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 02be02c9..32d45aa7 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -42,6 +42,7 @@ jobs: - name: launch xvfb run: Xvfb :99 -screen 0 1680x720x24 > /dev/null 2>&1 & - name: test + if: matrix.project == '.' run: | sudo add-apt-repository -y ppa:kisak/kisak-mesa sudo apt-get update @@ -49,9 +50,6 @@ jobs: cd ${{ matrix.project }} && zig build test x86_64-windows: runs-on: windows-latest - strategy: - matrix: - project: ['.', 'glfw', 'freetype'] # We want to run on external PRs, but not on our own internal PRs as they'll be run by the push # to the branch. if: github.event_name == 'push' || github.event.pull_request.head.repo.full_name != github.repository @@ -68,15 +66,11 @@ jobs: 7z x zig.zip Add-Content $env:GITHUB_PATH 'C:\zig-windows-x86_64-0.10.0-dev.3027+0e26c6149\' - name: compile all examples - if: matrix.project == '.' - run: cd ${{ matrix.project }} && zig build compile-all + run: zig build compile-all - name: test - run: cd ${{ matrix.project }} && zig build test + run: zig build test x86_64-macos: runs-on: macos-latest - strategy: - matrix: - project: ['.', 'glfw', 'freetype'] # We want to run on external PRs, but not on our own internal PRs as they'll be run by the push # to the branch. if: github.event_name == 'push' || github.event.pull_request.head.repo.full_name != github.repository @@ -89,6 +83,6 @@ jobs: 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' - name: test - run: cd ${{ matrix.project }} && zig build test + run: zig build test env: AGREE: true diff --git a/.github/workflows/m1_ci.yml b/.github/workflows/m1_ci.yml index 7ab38dd9..cb0eb570 100644 --- a/.github/workflows/m1_ci.yml +++ b/.github/workflows/m1_ci.yml @@ -11,12 +11,9 @@ jobs: aarch64-macos: if: ${{ github.repository == 'hexops/mach' }} runs-on: [self-hosted, macOS, ARM64] - strategy: - matrix: - project: [".", "glfw", "freetype"] defaults: run: - shell: "/usr/bin/arch -arch arm64e /bin/bash --noprofile --norc -eo pipefail {0}" + shell: '/usr/bin/arch -arch arm64e /bin/bash --noprofile --norc -eo pipefail {0}' steps: - name: Clean repository submodules # See https://github.com/actions/checkout/issues/385 @@ -33,10 +30,8 @@ jobs: env: AGREE: true - name: compile all examples - if: matrix.project == '.' - run: cd ${{ matrix.project }} && zig build compile-all + run: zig build compile-all env: AGREE: true - name: compile all examples (WASM) - if: matrix.project == '.' - run: cd ${{ matrix.project }} && zig build compile-all -Dtarget=wasm32-freestanding-none + run: zig build compile-all -Dtarget=wasm32-freestanding-none