diff --git a/.github/workflows/west.yml b/.github/workflows/west.yml index 0843b78..ea99ade 100644 --- a/.github/workflows/west.yml +++ b/.github/workflows/west.yml @@ -125,11 +125,13 @@ jobs: - uses: msys2/setup-msys2@v2 if: matrix.config.os == 'windows-latest' with: - path-type: inherit + update: true install: mingw-w64-x86_64-toolchain - + msystem: MINGW64 + path-type: inherit - run: git config --global core.autocrlf input if: matrix.config.os == 'windows-latest' + - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 - uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8 with: @@ -142,12 +144,15 @@ jobs: - uses: actions/setup-go@v5 with: go-version-file: go.mod + if: matrix.config.os != 'windows-latest' - run: rustup show + if: matrix.config.os != 'windows-latest' - uses: Swatinem/rust-cache@v2.7.3 + if: matrix.config.os != 'windows-latest' - uses: cargo-bins/cargo-binstall@v1.10.5 - run: cargo binstall -y wasm-tools@1.217 - run: go generate ./tests/go/... - - run: go test ./... + - run: go test -failfast ./... env: GOGC: 1 WEST_LOG: trace @@ -178,8 +183,10 @@ jobs: - uses: msys2/setup-msys2@v2 if: matrix.config.os == 'windows-latest' with: - path-type: inherit + update: true install: mingw-w64-x86_64-toolchain + msystem: MINGW64 + path-type: inherit - run: git config --global core.autocrlf input if: matrix.config.os == 'windows-latest' @@ -187,13 +194,18 @@ jobs: - uses: actions/setup-go@v5 with: go-version-file: go.mod + + - run: rustup set default-host x86_64-pc-windows-gnu + if: matrix.config.os == 'windows-latest' - run: rustup show + - uses: Swatinem/rust-cache@v2.7.3 - uses: cargo-bins/cargo-binstall@v1.10.5 - run: cargo binstall -y wasm-tools@1.217 - run: cargo test --workspace --all-targets + if: matrix.config.os != 'windows-latest' - run: go generate -tags=dev ./... - - run: go test -tags=dev ./... + - run: go test -failfast -tags=dev ./... env: GOGC: 1 WEST_LOG: trace diff --git a/west.go b/west.go index 48967a7..34e37e8 100644 --- a/west.go +++ b/west.go @@ -2,9 +2,8 @@ package west -// #cgo windows CFLAGS: -DWASM_API_EXTERN= -DWASI_API_EXTERN= // #cgo !windows LDFLAGS: -lm -ldl -pthread -// #cgo windows LDFLAGS: -luserenv -lole32 -lntdll -lws2_32 -lkernel32 -lbcrypt +// #cgo windows LDFLAGS: -lws2_32 -lole32 -lntdll -lbcrypt -luserenv // #include "./include/west.h" // #include import "C"