aboutsummaryrefslogtreecommitdiffhomepage
path: root/.github
diff options
context:
space:
mode:
authorAyke van Laethem <[email protected]>2024-02-05 15:12:58 +0100
committerRon Evans <[email protected]>2024-02-05 20:43:43 +0100
commit0db1a4bec13205e60652ba8fd2c0460e3170cdbf (patch)
tree8837143e2f5608ff5bb7d409a7bd77e7e5e169c4 /.github
parent2867da164dc6352ce1165d5a9e87103a4d8b74aa (diff)
downloadtinygo-0db1a4bec13205e60652ba8fd2c0460e3170cdbf.tar.gz
tinygo-0db1a4bec13205e60652ba8fd2c0460e3170cdbf.zip
gi: add macOS ARM64 builder
This means we can finally release native arm64 builds of TinyGo on macOS! Also update from macOS 11 to macOS 12, because macOS 11 is not supported anymore.
Diffstat (limited to '.github')
-rw-r--r--.github/workflows/build-macos.yml24
1 files changed, 17 insertions, 7 deletions
diff --git a/.github/workflows/build-macos.yml b/.github/workflows/build-macos.yml
index e6f169bd3..578fe706d 100644
--- a/.github/workflows/build-macos.yml
+++ b/.github/workflows/build-macos.yml
@@ -14,7 +14,17 @@ concurrency:
jobs:
build-macos:
name: build-macos
- runs-on: macos-11
+ strategy:
+ matrix:
+ # macos-12: amd64 (oldest supported version as of 05-02-2024)
+ # macos-14: arm64 (oldest arm64 version)
+ os: [macos-12, macos-14]
+ include:
+ - os: macos-12
+ goarch: amd64
+ - os: macos-14
+ goarch: arm64
+ runs-on: ${{ matrix.os }}
steps:
- name: Install Dependencies
shell: bash
@@ -33,7 +43,7 @@ jobs:
uses: actions/cache/restore@v3
id: cache-llvm-source
with:
- key: llvm-source-17-macos-v1
+ key: llvm-source-17-${{ matrix.os }}-v1
path: |
llvm-project/clang/lib/Headers
llvm-project/clang/include
@@ -58,7 +68,7 @@ jobs:
uses: actions/cache/restore@v3
id: cache-llvm-build
with:
- key: llvm-build-17-macos-v1
+ key: llvm-build-17-${{ matrix.os }}-v1
path: llvm-build
- name: Build LLVM
if: steps.cache-llvm-build.outputs.cache-hit != 'true'
@@ -82,7 +92,7 @@ jobs:
uses: actions/cache@v3
id: cache-wasi-libc
with:
- key: wasi-libc-sysroot-v5
+ key: wasi-libc-sysroot-${{ matrix.os }}-v1
path: lib/wasi-libc/sysroot
- name: Build wasi-libc
if: steps.cache-wasi-libc.outputs.cache-hit != 'true'
@@ -98,7 +108,7 @@ jobs:
run: make tinygo-test
- name: Make release artifact
shell: bash
- run: cp -p build/release.tar.gz build/tinygo.darwin-amd64.tar.gz
+ run: cp -p build/release.tar.gz build/tinygo.darwin-${{ matrix.goarch }}.tar.gz
- name: Publish release artifact
# Note: this release artifact is double-zipped, see:
# https://github.com/actions/upload-artifact/issues/39
@@ -108,8 +118,8 @@ jobs:
# We're doing the former here, to keep artifact uploads fast.
uses: actions/upload-artifact@v3
with:
- name: darwin-amd64-double-zipped
- path: build/tinygo.darwin-amd64.tar.gz
+ name: darwin-${{ matrix.goarch }}-double-zipped
+ path: build/tinygo.darwin-${{ matrix.goarch }}.tar.gz
- name: Smoke tests
shell: bash
run: make smoketest TINYGO=$(PWD)/build/tinygo