ci: update Go versions and streamline build process #21
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: go tests | |
on: | |
push: | |
tags: | |
- v* | |
branches: | |
- master | |
- main | |
pull_request: | |
jobs: | |
# Note: TinyGo is not idempotent when generating wasm, so we don't check in | |
# %.wasm as a part of this job. | |
build: | |
runs-on: ubuntu-latest | |
strategy: | |
# To simplify setup, we use one Go version, even if it is out of the official version range. | |
# This version must be <= max version of earliest TinyGo supported and >= min version of latest. | |
matrix: | |
go-version: # Note: Go only supports 2 versions: https://go.dev/doc/devel/release#policy | |
- "1.22" | |
- "1.23" | |
tinygo-version: # Note: TinyGo only supports latest: https://github.com/tinygo-org/tinygo/releases | |
- "0.33.0" | |
- "0.34.0" | |
# - "0.35.0" // Currently Broken | |
steps: | |
- name: Set up Go | |
uses: actions/setup-go@v3 | |
with: | |
go-version: ${{ matrix.go-version }} | |
- name: Install TinyGo | |
run: | # Installing via curl so commands are similar on OS/x | |
tinygo_version=${{ matrix.tinygo-version }} | |
curl -sSL https://github.com/tinygo-org/tinygo/releases/download/v${tinygo_version}/tinygo${tinygo_version}.linux-amd64.tar.gz | sudo tar -C /usr/local -xzf - | |
echo "TINYGOROOT=/usr/local/tinygo" >> $GITHUB_ENV | |
echo "/usr/local/tinygo/bin" >> $GITHUB_PATH | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Build example | |
run: make build | |
- name: Build test wasm | |
run: cd internal/e2e; make | |
- name: Test | |
run: make tests |