Skip to content

Commit

Permalink
cm: extract into separate module
Browse files Browse the repository at this point in the history
  • Loading branch information
ydnar committed Dec 8, 2024
1 parent 3619c3f commit 8b84c10
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 9 deletions.
6 changes: 6 additions & 0 deletions .github/dependabot.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,12 @@ updates:
interval: weekly
open-pull-requests-limit: 10

- package-ecosystem: gomod
directory: "/cm"
schedule:
interval: weekly
open-pull-requests-limit: 10

- package-ecosystem: gomod
directory: "/tests"
schedule:
Expand Down
18 changes: 9 additions & 9 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ jobs:
go-version-file: go.mod

- name: Vet Go code
run: go vet ./...
run: go vet ./... ./cm/... ./tests/...

# Test with Go
test-go:
Expand All @@ -61,15 +61,15 @@ jobs:
version: ${{ env.wasm-tools-version }}

- name: Run Go tests
run: go test -v ./...
run: go test -v ./... ./cm/...

- name: Run Go tests with race detector
run: go test -v -race ./...
run: go test -v -race ./... ./cm/...

- name: Test Go without cgo
env:
CGO_ENABLED: 0
run: go test -v ./...
run: go test -v ./... ./cm/...

- name: Verify repo is unchanged
run: git diff --exit-code HEAD
Expand Down Expand Up @@ -108,7 +108,7 @@ jobs:
version: ${{ env.wasm-tools-version }}

- name: Test with TinyGo
run: tinygo test -v ./...
run: tinygo test -v ./... ./cm/...

- name: Verify repo is unchanged
run: git diff --exit-code HEAD
Expand Down Expand Up @@ -164,19 +164,19 @@ jobs:
env:
GOARCH: wasm
GOOS: wasip1
run: go test -v ./...
run: go test -v ./... ./cm/...

- name: Test wasm/wasip1 with TinyGo 0.32.0
if: ${{ matrix.tinygo-version == '0.32.0' }}
run: tinygo test -v -target=wasi ./...
run: tinygo test -v -target=wasi ./... ./cm/...

- name: Test wasm/wasip1 with TinyGo >= 0.33.0
if: ${{ matrix.tinygo-version != '0.32.0' }}
run: tinygo test -v -target=wasip1 ./...
run: tinygo test -v -target=wasip1 ./... ./cm/...

- name: Test wasm/wasip2 with TinyGo >= 0.33.0
if: ${{ matrix.tinygo-version != '0.32.0' }}
run: tinygo test -v -target=wasip2 ./...
run: tinygo test -v -target=wasip2 ./... ./cm/...

- name: Test generated Go with TinyGo >= 0.34.0
if: ${{ matrix.tinygo-version != '0.32.0' && matrix.tinygo-version != '0.33.0' }}
Expand Down
3 changes: 3 additions & 0 deletions cm/go.mod
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
module go.bytecodealliance.org/cm

go 1.22.0
1 change: 1 addition & 0 deletions go.work
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,6 @@ go 1.22.0

use (
.
./cm
./tests
)

0 comments on commit 8b84c10

Please sign in to comment.