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 - name: launch xvfb
run: Xvfb :99 -screen 0 1680x720x24 > /dev/null 2>&1 & run: Xvfb :99 -screen 0 1680x720x24 > /dev/null 2>&1 &
- name: test - name: test
if: matrix.project == '.'
run: | run: |
sudo add-apt-repository -y ppa:kisak/kisak-mesa sudo add-apt-repository -y ppa:kisak/kisak-mesa
sudo apt-get update sudo apt-get update
@ -49,9 +50,6 @@ jobs:
cd ${{ matrix.project }} && zig build test cd ${{ matrix.project }} && zig build test
x86_64-windows: x86_64-windows:
runs-on: windows-latest 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 # 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. # to the branch.
if: github.event_name == 'push' || github.event.pull_request.head.repo.full_name != github.repository if: github.event_name == 'push' || github.event.pull_request.head.repo.full_name != github.repository
@ -68,15 +66,11 @@ jobs:
7z x zig.zip 7z x zig.zip
Add-Content $env:GITHUB_PATH 'C:\zig-windows-x86_64-0.10.0-dev.3027+0e26c6149\' Add-Content $env:GITHUB_PATH 'C:\zig-windows-x86_64-0.10.0-dev.3027+0e26c6149\'
- name: compile all examples - name: compile all examples
if: matrix.project == '.' run: zig build compile-all
run: cd ${{ matrix.project }} && zig build compile-all
- name: test - name: test
run: cd ${{ matrix.project }} && zig build test run: zig build test
x86_64-macos: x86_64-macos:
runs-on: macos-latest 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 # 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. # to the branch.
if: github.event_name == 'push' || github.event.pull_request.head.repo.full_name != github.repository if: github.event_name == 'push' || github.event.pull_request.head.repo.full_name != github.repository
@ -89,6 +83,6 @@ jobs:
brew install xz 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' 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 - name: test
run: cd ${{ matrix.project }} && zig build test run: zig build test
env: env:
AGREE: true AGREE: true

View file

@ -11,12 +11,9 @@ jobs:
aarch64-macos: aarch64-macos:
if: ${{ github.repository == 'hexops/mach' }} if: ${{ github.repository == 'hexops/mach' }}
runs-on: [self-hosted, macOS, ARM64] runs-on: [self-hosted, macOS, ARM64]
strategy:
matrix:
project: [".", "glfw", "freetype"]
defaults: defaults:
run: 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: steps:
- name: Clean repository submodules - name: Clean repository submodules
# See https://github.com/actions/checkout/issues/385 # See https://github.com/actions/checkout/issues/385
@ -33,10 +30,8 @@ jobs:
env: env:
AGREE: true AGREE: true
- name: compile all examples - name: compile all examples
if: matrix.project == '.' run: zig build compile-all
run: cd ${{ matrix.project }} && zig build compile-all
env: env:
AGREE: true AGREE: true
- name: compile all examples (WASM) - name: compile all examples (WASM)
if: matrix.project == '.' run: zig build compile-all -Dtarget=wasm32-freestanding-none
run: cd ${{ matrix.project }} && zig build compile-all -Dtarget=wasm32-freestanding-none