fix: Fix wasp-cli building on Apple Silicon #5868
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Test | |
on: | |
pull_request: | |
branches: [develop] | |
paths-ignore: | |
- "**/README.md" | |
jobs: | |
build: | |
name: Test | |
runs-on: ubuntu-latest | |
steps: | |
- name: Set up Go 1.x | |
uses: actions/setup-go@v4 | |
with: | |
go-version: "1.21" | |
id: go | |
- name: Check out code into the Go module directory | |
uses: actions/checkout@v4 | |
- name: Get dependencies | |
run: | | |
make wasm | |
go get -v -t -d ./... | |
- name: Build | |
run: make build | |
- name: Test | |
run: make test-short | |
contract-test: | |
name: Wasm contract tests | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
TEST_LANG: [go, rswasm] | |
steps: | |
- name: checkout to the directory | |
uses: actions/checkout@v4 | |
- name: install golang | |
uses: actions/setup-go@v4 | |
with: | |
go-version: "1.21" | |
- name: install rust-toolchain | |
uses: actions-rs/[email protected] | |
with: | |
toolchain: stable | |
- name: install wasm-pack | |
run: | | |
curl https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf | sh | |
- name: install schema | |
run: | | |
root_path=$(git rev-parse --show-toplevel) | |
go install $root_path/tools/schema | |
schema -go | |
- name: run builds | |
env: | |
TEST_LANG: ${{matrix.TEST_LANG}} | |
run: | | |
cd contracts/wasm/scripts | |
bash core_build.sh | |
if [ $TEST_LANG == "rswasm" ]; then | |
bash rust_all.sh ci | |
fi | |
- name: run tests | |
env: | |
TEST_LANG: ${{matrix.TEST_LANG}} | |
run: | | |
cd contracts/wasm | |
if [ $TEST_LANG == "go" ]; then | |
go test ./... | |
elif [ $TEST_LANG == "rswasm" ]; then | |
go test ./... -rswasm | |
fi | |
golangci: | |
name: Lint | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/setup-go@v4 | |
with: | |
go-version: "1.21" | |
id: go | |
- name: Check out code into the Go module directory | |
uses: actions/checkout@v4 | |
- name: Run global scope golangci-lint | |
uses: golangci/golangci-lint-action@v3 | |
with: | |
version: v1.54.2 | |
args: --timeout 15m0s | |
skip-pkg-cache: true | |
- name: Run golangci-lint on wasp-cli | |
uses: golangci/golangci-lint-action@v3 | |
with: | |
working-directory: tools/wasp-cli | |
version: v1.54.2 | |
args: --timeout 15m0s | |
skip-pkg-cache: true | |
build-wasp-cli: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
arch: [amd64 arm64 386] | |
os: [linux windows darwin] | |
steps: | |
- name: Set up Go 1.x | |
uses: actions/setup-go@v4 | |
with: | |
go-version: "1.21" | |
id: go | |
- name: Check out code into the Go module directory | |
uses: actions/checkout@v4 | |
- name: Get dependencies | |
run: | | |
make wasm | |
go get -v -t -d ./... | |
- name: macos arm64 | |
run: GOOS=darwin GOARCH=arm64 make build-cli | |
- name: macos amd64 | |
run: GOOS=darwin GOARCH=amd64 make build-cli | |
- name: linux arm64 | |
run: GOOS=linux GOARCH=arm64 make build-cli | |
- name: linux amd64 | |
run: GOOS=linux GOARCH=amd64 make build-cli | |
- name: linux 386 | |
run: GOOS=linux GOARCH=386 make build-cli | |
- name: windows amd64 | |
run: GOOS=windows GOARCH=amd64 make build-cli |