CI: remove unneeded builds on sub-projects

This commit is contained in:
Ali Chraghi 2022-08-06 14:39:54 +04:30 committed by Stephen Gutekanst
parent 4bf9fc5821
commit b5d8c669a2
2 changed files with 7 additions and 18 deletions

View file

@ -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

View file

@ -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