Skip to content
This repository has been archived by the owner on Jan 24, 2024. It is now read-only.

Update to latest threads spectests #12

Update to latest threads spectests

Update to latest threads spectests #12

Workflow file for this run

name: WebAssembly Core Specification Test
on:
pull_request:
branches: [main]
paths-ignore: # ignore docs as they are built with Netlify.
- '**/*.md'
- 'site/**'
- 'netlify.toml'
push:
branches: [main]
paths-ignore: # ignore docs as they are built with Netlify.
- '**/*.md'
- 'site/**'
- 'netlify.toml'
defaults:
run: # use bash for all operating systems unless overridden
shell: bash
concurrency:
# https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#example-using-concurrency-to-cancel-any-in-progress-job-or-run
group: ${{ github.ref }}-${{ github.workflow }}-${{ github.actor }}
cancel-in-progress: true
jobs:
test_amd64:
name: ${{ matrix.spec-version }} - linux/amd64, Go-${{ matrix.go-version }}
runs-on: ubuntu-22.04
strategy:
fail-fast: false # don't fail fast as sometimes failures are arch/OS specific
matrix: # Use versions consistent with wazero's Go support policy.
go-version:
- "1.21" # Current Go version
- "1.19" # Floor Go version of wazero (current - 2)
spec-version:
- "v1"
- "v2"
- "threads"
steps:
- uses: actions/checkout@v3
- uses: actions/setup-go@v4
with:
go-version: ${{ matrix.go-version }}
- run: make spectest.${{ matrix.spec-version }}
test_scratch:
name: ${{ matrix.spec-version }} / ${{ matrix.arch }}, Go-${{ matrix.go-version }}
runs-on: ubuntu-22.04
strategy:
fail-fast: false # don't fail fast as sometimes failures are arch/OS specific
matrix: # Use versions consistent with wazero's Go support policy.
go-version:
- "1.21" # Current Go version
- "1.19" # Floor Go version of wazero (current - 2)
arch:
- "arm64"
- "riscv64"
spec-version:
- "v1"
- "v2"
- "threads"
steps:
- uses: actions/checkout@v3
- uses: actions/setup-go@v4
with:
go-version: ${{ matrix.go-version }}
- name: Build test binaries
run: go list -f '{{.Dir}}' ./... | grep 'spectest/${{ matrix.spec-version }}' | xargs -Ipkg go test pkg -c -o spectest.test
env:
GOARCH: ${{ matrix.arch }}
CGO_ENABLED: 0
- name: Set up QEMU
if: ${{ matrix.arch != 'amd64' }}
uses: docker/setup-qemu-action@v2
with: # Avoid docker.io rate-limits; built with internal-images.yml
image: ghcr.io/tetratelabs/wazero/internal-binfmt
platforms: ${{ matrix.arch }}
- name: Build scratch container
run: |
echo 'FROM scratch' >> Dockerfile
echo 'CMD ["/test"]' >> Dockerfile
docker buildx build -t wazero:test --platform linux/${{ matrix.arch }} .
- name: Run built test binaries
# Note: This mounts /tmp to allow t.TempDir() in tests.
run: docker run --platform linux/${{ matrix.arch }} -v $(pwd)/spectest.test:/test --tmpfs /tmp --rm -t wazero:test