ci: only run at base directory
we don't have to build almost the same thing twice
This commit is contained in:
parent
1a6a82e11b
commit
18ad648e68
1 changed files with 7 additions and 13 deletions
20
.github/workflows/ci.yml
vendored
20
.github/workflows/ci.yml
vendored
|
|
@ -5,9 +5,6 @@ on:
|
||||||
jobs:
|
jobs:
|
||||||
x86_64-linux:
|
x86_64-linux:
|
||||||
runs-on: ubuntu-latest
|
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
|
# 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
|
||||||
|
|
@ -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'
|
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
|
# - name: x86_64-linux -> x86_64-linux-musl
|
||||||
# if: matrix.project == 'libs/freetype' || matrix.project == 'libs/glfw'
|
# 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
|
- 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:
|
env:
|
||||||
AGREE: true
|
AGREE: true
|
||||||
- name: x86_64-linux -> aarch64-macos
|
- 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:
|
env:
|
||||||
AGREE: true
|
AGREE: true
|
||||||
- name: x86_64-linux -> x86_64-windows
|
- 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
|
- name: compile all examples
|
||||||
if: matrix.project == '.'
|
run: zig build compile-all -Dtarget=x86_64-linux-gnu
|
||||||
run: cd ${{ matrix.project }} && zig build compile-all -Dtarget=x86_64-linux-gnu
|
|
||||||
- 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
|
|
||||||
- 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
|
||||||
sudo apt-get install mesa-utils mesa-utils-extra mesa-va-drivers mesa-vdpau-drivers mesa-vulkan-drivers xvfb
|
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:
|
x86_64-windows:
|
||||||
runs-on: windows-latest
|
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
|
# We want to run on external PRs, but not on our own internal PRs as they'll be run by the push
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue