From 370a86014f2230f5dcd0d42063bdd6ea7ba762ee Mon Sep 17 00:00:00 2001 From: Ayke van Laethem Date: Mon, 31 Mar 2025 17:58:19 +0200 Subject: [PATCH 1/2] ci: rename build-macos.yml to macos.yml This is consistent with the other files, and IMHO is better since we don't just build for MacOS (but also run a bunch of tests). --- .github/workflows/{build-macos.yml => macos.yml} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename .github/workflows/{build-macos.yml => macos.yml} (100%) diff --git a/.github/workflows/build-macos.yml b/.github/workflows/macos.yml similarity index 100% rename from .github/workflows/build-macos.yml rename to .github/workflows/macos.yml From da19b12d5d1c03dba6cb540b915c7a2b9698ccde Mon Sep 17 00:00:00 2001 From: Ayke van Laethem Date: Mon, 31 Mar 2025 18:07:53 +0200 Subject: [PATCH 2/2] ci: split smoke test step on MacOS This makes sure the release binary is properly tested. --- .github/workflows/macos.yml | 31 ++++++++++++++++++++++++++++++- 1 file changed, 30 insertions(+), 1 deletion(-) diff --git a/.github/workflows/macos.yml b/.github/workflows/macos.yml index 25b5971783..cca8604c26 100644 --- a/.github/workflows/macos.yml +++ b/.github/workflows/macos.yml @@ -25,6 +25,8 @@ jobs: - os: macos-14 goarch: arm64 runs-on: ${{ matrix.os }} + outputs: + version: ${{ steps.version.outputs.version }} steps: - name: Install Dependencies run: | @@ -119,8 +121,35 @@ jobs: with: name: darwin-${{ matrix.goarch }}-double-zipped-${{ steps.version.outputs.version }} path: build/tinygo${{ steps.version.outputs.version }}.darwin-${{ matrix.goarch }}.tar.gz + smoke-test-macos: + runs-on: macos-latest # this is arm64 + needs: build-macos + steps: + - name: Checkout + uses: actions/checkout@v4 + - name: Install Go + uses: actions/setup-go@v5 + with: + go-version: '1.24' + cache: true + - name: Download release artifact + uses: actions/download-artifact@v4 + with: + name: darwin-arm64-double-zipped-${{ needs.build-macos.outputs.version }} + - name: Extract release tarball + run: | + mkdir -p ~/lib + tar -C ~/lib -xf tinygo${{ needs.build-macos.outputs.version }}.darwin-arm64.tar.gz + ln -s ~/lib/tinygo/bin/tinygo ~/go/bin/tinygo - name: Smoke tests - run: make smoketest TINYGO=$(PWD)/build/tinygo + run: | + tinygo version + tinygo env + echo -n "PWD: " + pwd + ls -l ~/lib/tinygo + TINYGOROOT=/Users/runner/work/tinygo/tinygo make smoketest + exit 1 # this is a test test-macos-homebrew: name: homebrew-install runs-on: macos-latest