Return upstream parse tree type for compatibility (#14) #42
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: CI | |
on: | |
push: | |
branches: | |
- main | |
tags: | |
- "*" | |
pull_request: | |
workflow_dispatch: | |
jobs: | |
build: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
mode: | |
- cgo | |
- wazero | |
os: | |
- macos-12 | |
- ubuntu-22.04 | |
- windows-2022 | |
exclude: | |
- os: windows-2022 | |
mode: cgo | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- uses: actions/setup-go@v4 | |
with: | |
go-version: '^1.21' | |
- name: run checks | |
run: go run mage check | |
env: | |
WASI_TEST_MODE: ${{ matrix.mode }} | |
CGO_ENABLED: ${{ startsWith(matrix.os, 'windows-') && '0' || '1' }} | |
# Runs tests using wazero inside a minimal golang docker image. This makes sure the code builds | |
# even when there is no C toolchain available. It is possible for code to work fine with CGO_ENABLED=0 | |
# but not build without a C toolchain available, e.g. if C source files are checked into the repo | |
# without a build tag to exclude them from pure-Go builds. | |
docker-build: | |
runs-on: ubuntu-22.04 | |
container: | |
image: golang:alpine | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- run: if command -v gcc &> /dev/null; then echo "GCC found but not expected"; exit 321; fi | |
- run: go run mage test |