From 18ad648e68bd8557229b7c79f5aac0f06ae0293c Mon Sep 17 00:00:00 2001 From: Ali Chraghi Date: Tue, 20 Sep 2022 10:32:09 +0430 Subject: [PATCH] ci: only run at base directory we don't have to build almost the same thing twice --- .github/workflows/ci.yml | 20 +++++++------------- 1 file changed, 7 insertions(+), 13 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 02d22a8f..b1b8e4b3 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -5,9 +5,6 @@ on: jobs: x86_64-linux: runs-on: ubuntu-latest - strategy: - matrix: - project: ['.', 'libs/glfw', 'libs/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 @@ -22,32 +19,29 @@ jobs: sudo sh -c 'wget -c https://ziglang.org/builds/zig-linux-x86_64-0.10.0-dev.4060+61aaef0b0.tar.xz -O - | tar -xJ --strip-components=1 -C /usr/local/bin' # - name: x86_64-linux -> x86_64-linux-musl # if: matrix.project == 'libs/freetype' || matrix.project == 'libs/glfw' - # run: cd ${{ matrix.project }} && zig build -Dtarget=x86_64-linux-musl + # run: zig build -Dtarget=x86_64-linux-musl - name: x86_64-linux -> x86_64-macos - run: cd ${{ matrix.project }} && zig build -Dtarget=x86_64-macos.12-none + run: zig build -Dtarget=x86_64-macos.12-none env: AGREE: true - name: x86_64-linux -> aarch64-macos - run: cd ${{ matrix.project }} && zig build -Dtarget=aarch64-macos.12-none + run: zig build -Dtarget=aarch64-macos.12-none env: AGREE: true - name: x86_64-linux -> x86_64-windows - run: cd ${{ matrix.project }} && zig build -Dtarget=x86_64-windows-gnu + run: zig build -Dtarget=x86_64-windows-gnu - name: compile all examples - if: matrix.project == '.' - run: cd ${{ matrix.project }} && zig build compile-all -Dtarget=x86_64-linux-gnu + run: 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 + run: zig build compile-all -Dtarget=wasm32-freestanding-none - 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 sudo apt-get install mesa-utils mesa-utils-extra mesa-va-drivers mesa-vdpau-drivers mesa-vulkan-drivers xvfb - cd ${{ matrix.project }} && zig build test + zig build test x86_64-windows: runs-on: windows-latest # We want to run on external PRs, but not on our own internal PRs as they'll be run by the push