Skip to content

Commit

Permalink
Run tests on M1 runner.
Browse files Browse the repository at this point in the history
  • Loading branch information
fubark committed Feb 12, 2024
1 parent 77a402d commit 0d5eec5
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 9 deletions.
16 changes: 11 additions & 5 deletions .github/workflows/latest-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ jobs:
target: x86_64-macos-none
mode: release
cmd: cli
- host: macos-12
- host: macos-14
target: aarch64-macos-none
mode: release
cmd: cli
Expand Down Expand Up @@ -69,7 +69,7 @@ jobs:
target: x86_64-macos-none
mode: release
cmd: lib
- host: macos-12
- host: macos-14
target: aarch64-macos-none
mode: release
cmd: lib
Expand Down Expand Up @@ -138,6 +138,12 @@ jobs:
wget -c https://ziglang.org/builds/zig-macos-x86_64-${{ env.ZIG_VERSION }}.tar.xz -O - | tar -xJ --strip-components=1 -C /usr/local/bin
xcode-select --print-path
- name: Install zig.
if: env.BUILD_HOST == 'macos-14'
run: |
wget -c https://ziglang.org/builds/zig-macos-aarch64-${{ env.ZIG_VERSION }}.tar.xz -O - | tar -xJ --strip-components=1 -C /usr/local/bin
xcode-select --print-path
- name: Install zig.
if: env.BUILD_HOST == 'windows-2022'
run: |
Expand Down Expand Up @@ -189,11 +195,11 @@ jobs:
build-${{ env.BUILD_TARGET }}-${{ env.BUILD_MODE }}-1

- name: Run tests.
if: env.BUILD_TARGET != 'aarch64-macos-none' && env.BUILD_TARGET != 'wasm32-wasi' && env.BUILD_CMD == 'cli'
if: env.BUILD_TARGET != 'wasm32-wasi' && env.BUILD_CMD == 'cli'
run: zig build test ${{ env.ZIG_TARGET_FLAG }}

- name: Run tests.
if: env.BUILD_TARGET != 'aarch64-macos-none' && env.BUILD_TARGET != 'wasm32-freestanding' && env.BUILD_CMD == 'lib'
if: env.BUILD_TARGET != 'wasm32-freestanding' && env.BUILD_CMD == 'lib'
run: zig build test-lib ${{ env.ZIG_TARGET_FLAG }}

- name: Run tests.
Expand Down Expand Up @@ -232,7 +238,7 @@ jobs:
# zig-out/${{ env.BUILD_TARGET }}/main/cosmic${{ env.BIN_EXT }}

- name: Zip. (linux/macos)
if: (env.BUILD_HOST == 'ubuntu-22.04' || env.BUILD_HOST == 'macos-12') && env.BUILD_TARGET != 'wasm32-wasi' && env.BUILD_CMD == 'cli'
if: (env.BUILD_HOST == 'ubuntu-22.04' || env.BUILD_HOST == 'macos-12' || env.BUILD_HOST == 'macos-14') && env.BUILD_TARGET != 'wasm32-wasi' && env.BUILD_CMD == 'cli'
run: |
tar -C zig-out/bin -czvf ${{ env.BIN_ZIP }} cyber
Expand Down
14 changes: 10 additions & 4 deletions .github/workflows/pr-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ jobs:
target: x86_64-macos-none
mode: release
cmd: cli
- host: macos-12
- host: macos-14
target: aarch64-macos-none
mode: release
cmd: cli
Expand Down Expand Up @@ -63,7 +63,7 @@ jobs:
target: x86_64-macos-none
mode: release
cmd: lib
- host: macos-12
- host: macos-14
target: aarch64-macos-none
mode: release
cmd: lib
Expand Down Expand Up @@ -120,6 +120,12 @@ jobs:
wget -c https://ziglang.org/builds/zig-macos-x86_64-${{ env.ZIG_VERSION }}.tar.xz -O - | tar -xJ --strip-components=1 -C /usr/local/bin
xcode-select --print-path
- name: Install zig.
if: env.BUILD_HOST == 'macos-14'
run: |
wget -c https://ziglang.org/builds/zig-macos-aarch64-${{ env.ZIG_VERSION }}.tar.xz -O - | tar -xJ --strip-components=1 -C /usr/local/bin
xcode-select --print-path
- name: Install zig.
if: env.BUILD_HOST == 'windows-2022'
run: |
Expand All @@ -141,11 +147,11 @@ jobs:
pr-build-${{ env.BUILD_TARGET }}-${{ env.BUILD_MODE }}-1

- name: Run tests.
if: env.BUILD_TARGET != 'aarch64-macos-none' && env.BUILD_TARGET != 'wasm32-wasi' && env.BUILD_CMD == 'cli'
if: env.BUILD_TARGET != 'wasm32-wasi' && env.BUILD_CMD == 'cli'
run: zig build test ${{ env.ZIG_TARGET_FLAG }}

- name: Run tests.
if: env.BUILD_TARGET != 'aarch64-macos-none' && env.BUILD_TARGET != 'wasm32-freestanding' && env.BUILD_CMD == 'lib'
if: env.BUILD_TARGET != 'wasm32-freestanding' && env.BUILD_CMD == 'lib'
run: zig build test-lib ${{ env.ZIG_TARGET_FLAG }}

- name: Run tests.
Expand Down

0 comments on commit 0d5eec5

Please sign in to comment.