Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
Signed-off-by: Edoardo Vacchi <[email protected]>
  • Loading branch information
evacchi committed Dec 14, 2023
1 parent 656d872 commit 6ecca83
Showing 1 changed file with 109 additions and 0 deletions.
109 changes: 109 additions & 0 deletions .github/workflows/integration.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,59 @@ jobs:
- name: Run the test binary with wazero CLI
run: wazero run -mount=:/ ./zigbin/test.wasm

zig-opt:
needs: build_zig_test_binary
name: Zig / Optimizing Compiler
runs-on: ubuntu-22.04
strategy:
fail-fast: false # don't fail fast as sometimes failures are arch/OS specific
matrix:
arch:
- "arm64"

steps:
- name: Checkout wazero
uses: actions/checkout@v3

- uses: actions/cache@v3
id: binary-cache
with:
# Use share the cache containing archives across OSes.
enableCrossOsArchive: true
# We need this cache to run tests.
fail-on-cache-miss: true
key: zig-stdlib-test-binary-${{ env.ZIG_VERSION }}
path:
./zigbin/

- uses: actions/setup-go@v4
with:
go-version: ${{ env.GO_VERSION }}

- name: Build wazero
run: go build -o ./wazerocli ./cmd/wazero
env:
GOARCH: ${{ matrix.arch }}

- 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
# This runs all tests compiled above in sequence. Note: This mounts /tmp to allow t.TempDir() in tests.
run: |
docker run --platform linux/${{ matrix.arch }} -v $(pwd)/zigbin:/test -v $(pwd)/wazerocli:/wazero -e WAZEROCLI=/wazero --tmpfs /tmp --rm -t wazero:test \
/wazero run -optimizing-compiler -mount=:/ ./test/test.wasm
build_tinygo_test_binary:
name: Build TinyGo test binary
runs-on: ubuntu-22.04
Expand Down Expand Up @@ -235,6 +288,62 @@ jobs:
wazero run -mount=:/ -mount=:/tmp $bin -- -test.v
done
tinygo-opt:
needs: build_tinygo_test_binary
name: TinyGo / Optimizing Compiler
runs-on: ubuntu-22.04
strategy:
fail-fast: false # don't fail fast as sometimes failures are arch/OS specific
matrix:
arch:
- "arm64"

steps:
- name: Checkout wazero
uses: actions/checkout@v3

- uses: actions/cache@v3
id: binary-cache
with:
# Use share the cache containing archives across OSes.
enableCrossOsArchive: true
# We need this cache to run tests.
fail-on-cache-miss: true
key: tinygo-test-binaries-${{ env.TINYGO_VERSION }}
path:
./tinygobin/

- uses: actions/setup-go@v4
with:
go-version: ${{ env.GO_VERSION }}

- name: Build wazero
run: go build -o ./wazerocli ./cmd/wazero
env:
GOARCH: ${{ matrix.arch }}

- 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
# This runs all tests compiled above in sequence. Note: This mounts /tmp to allow t.TempDir() in tests.
run: |
cd ./tinygobin
for bin in *.test; do
echo $bin
wazero run -optimizing-compiler -mount=:/ -mount=:/tmp $bin -- -test.v
done
wasi-testsuite:
name: wasi-testsuite
runs-on: ${{ matrix.os }}
Expand Down

0 comments on commit 6ecca83

Please sign in to comment.