diff --git a/.github/workflows/build-macos.yml b/.github/workflows/build-macos.yml index 19bb64014..c1a263c47 100644 --- a/.github/workflows/build-macos.yml +++ b/.github/workflows/build-macos.yml @@ -107,7 +107,7 @@ jobs: path: build/tinygo${{ steps.version.outputs.version }}.darwin-${{ matrix.goarch }}.tar.gz archive: false - name: Smoke tests - run: make smoketest TINYGO=$(PWD)/build/tinygo + run: make smoketest-quick TINYGO=$(PWD)/build/tinygo test-macos-homebrew: name: homebrew-install runs-on: macos-latest diff --git a/.github/workflows/compat.yml b/.github/workflows/compat.yml index 2d01dd47d..2c658c45b 100644 --- a/.github/workflows/compat.yml +++ b/.github/workflows/compat.yml @@ -69,4 +69,4 @@ jobs: - run: tinygo version - run: make gen-device -j4 - run: go test -tags=llvm${{ env.LLVM }} -short -skip=TestErrors - - run: make smoketest XTENSA=0 + - run: make smoketest-quick XTENSA=0 diff --git a/.github/workflows/linux.yml b/.github/workflows/linux.yml index 10e080763..ce3f0acb4 100644 --- a/.github/workflows/linux.yml +++ b/.github/workflows/linux.yml @@ -180,7 +180,43 @@ jobs: - run: make tinygo-test-wasip1-fast - run: make tinygo-test-wasip2-fast - run: make tinygo-test-wasm - - run: make smoketest + smoketest-linux: + # Build a binary for every supported board, using the binaries built in the + # build-linux job. This is the only job that runs the full smoke test. The + # result does not depend on the host OS, so the other jobs build a + # representative board for each architecture with smoketest-quick. + runs-on: ubuntu-latest + needs: build-linux + strategy: + fail-fast: false + matrix: + # Balanced with the measured build time of each group, so that the + # shards finish at about the same time. + group: + - smoketest-rp2xxx smoketest-selftest smoketest-wasm-sim + - smoketest-esp smoketest-riscv smoketest-flags + - smoketest-examples smoketest-nxp smoketest-pwm-usb smoketest-avr + - smoketest-samd smoketest-stm32 smoketest-nrf smoketest-wasm + steps: + - name: Checkout + uses: actions/checkout@v6 + with: + submodules: true + - name: Install Go + uses: actions/setup-go@v6 + with: + go-version: '1.27.0' + cache: true + - name: Download release artifact + uses: actions/download-artifact@v8 + with: + name: tinygo${{ needs.build-linux.outputs.version }}.linux-amd64.tar.gz + - name: Extract release tarball + run: | + mkdir -p ~/lib + tar -C ~/lib -xf tinygo${{ needs.build-linux.outputs.version }}.linux-amd64.tar.gz + ln -s ~/lib/tinygo/bin/tinygo ~/go/bin/tinygo + - run: make testchdir ${{ matrix.group }} assert-test-linux: # Run all tests that can run on Linux, with LLVM assertions enabled to catch # potential bugs. @@ -293,7 +329,7 @@ jobs: echo "$(pwd)/build" >> $GITHUB_PATH - name: Test stdlib packages run: make tinygo-test - - run: make smoketest + - run: make smoketest-quick - run: make wasmtest - run: make tinygo-test-baremetal - name: Check Go code formatting diff --git a/.github/workflows/windows.yml b/.github/workflows/windows.yml index 8d86f7c43..62f518b37 100644 --- a/.github/workflows/windows.yml +++ b/.github/workflows/windows.yml @@ -139,7 +139,7 @@ jobs: # This build is already unzipped. - name: Smoke tests shell: bash - run: make smoketest TINYGO=$(PWD)/build/tinygo/bin/tinygo + run: make smoketest-quick TINYGO=$(PWD)/build/tinygo/bin/tinygo stdlib-test-windows: runs-on: windows-2022