-
Notifications
You must be signed in to change notification settings - Fork 1
61 lines (57 loc) · 1.92 KB
/
watm.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
name: "watm"
on:
push:
branches: [ "master" ]
paths:
- '**'
- '!tinygo/snippets/**' # ignore changes to snippets since they are not impacting the module
- '!**.md' # ignore changes to markdown files since they are not part of the code
- '!**/LICENSE*'
pull_request:
branches: [ "master" ]
paths:
- '**'
- '!tinygo/snippets/**' # ignore changes to snippets since they are not impacting the module
- '!**.md' # ignore changes to markdown files since they are not part of the code
- '!**/LICENSE*'
env:
CGO_ENABLED: 0
jobs:
watm_build_and_test:
name: "go${{ matrix.go }} test"
runs-on: ubuntu-latest
strategy:
matrix:
go: [ "1.21.x", "1.22.x" ] # we support the latest 2 stable versions of Go
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: ${{ matrix.go }}
- run: go version
- name: Build and Test
run: |
go build -v ./...
go test -v ./...
watm_build_tinygo_v0_examples:
name: "build ${{ matrix.examples }}.v0.tinygo.wasm w/ tinygo ${{ matrix.tinygo }} (go${{ matrix.go }})"
runs-on: ubuntu-latest
strategy:
fail-fast: true
matrix:
tinygo: [ "0.31.1" ] # latest tinygo version ONLY (1)
go: [ "1.21.x", "1.22.x" ] # latest 2 stable versions of Go. TODO: bump to 1.22.x once tinygo support added.
examples: [ "plain", "reverse", "utls" ] # Add examples here per ones under tinygo/v0/examples
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: ${{ matrix.go }}
- uses: acifani/setup-tinygo@v2
with:
tinygo-version: ${{ matrix.tinygo }}
- name: Build
run: |
mkdir -p tmp
tinygo build -o tmp/${{ matrix.examples }}.wasm -target=wasi -tags=purego ./${{ matrix.examples }}/
working-directory: ./tinygo/v0/examples/