mirror of
https://github.com/tinygo-org/tinygo.git
synced 2026-09-01 10:19:01 +00:00
ci: run the full smoke test once, on Linux only
The smoke test ran six times for each push: twice on Linux, twice on macOS, once on Windows, and once in the compatibility test. Together that was about 97 minutes of the CI time. The smoke test checks that TinyGo can build a binary for each board. That does not depend on the host OS. The only part that does is one build behind a Windows check. Add a smoketest-linux job that runs the full set, split across four runners that use the tarball from the build-linux job. The groups are balanced with the measured build time of each group. Remove the full smoke test from test-linux-build, which the new job replaces, and use smoketest-quick for the other four jobs. Expected result: about 55 to 39 minutes for the slowest workflow, and about 97 to 35 minutes of total smoke test time.
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user