Skip to content

Commit

Permalink
Switch from mage.go file to folder (#93)
Browse files Browse the repository at this point in the history
  • Loading branch information
anuraaga authored May 1, 2024
1 parent c5353a8 commit c57a578
Show file tree
Hide file tree
Showing 7 changed files with 15 additions and 9 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/bench.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@ jobs:
- name: setup re2 for cgo
run: sudo apt-get update && sudo apt-get install -y libre2-dev

- run: go run mage.go benchall
- run: go run mage benchall

- run: go run mage.go wafbenchall
- run: go run mage wafbenchall

- uses: actions/upload-artifact@v3
with:
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ jobs:
run: go install github.com/wasilibs/tools/cmd/wasmtime@875fe73f677c58d467ee373a9e00e6cb66b268f3

- name: run checks
run: go run mage.go check
run: go run mage check
if: ${{ !startsWith(matrix.os, 'windows-') || matrix.mode != 'cgo' }}
env:
RE2_TEST_MODE: ${{ matrix.mode }}
Expand All @@ -73,7 +73,7 @@ jobs:
TEST_NORACE: ${{ startsWith(matrix.os, 'windows-') && matrix.mode == 'wazero' && 'true' || '' }}

- name: run checks (windows cgo)
run: go run mage.go check
run: go run mage check
if: ${{ startsWith(matrix.os, 'windows-') && matrix.mode == 'cgo' }}
# Shell does not support conditional expressions using matrix, so for now we duplicate the steps
shell: 'msys2 {0}'
Expand All @@ -98,6 +98,6 @@ jobs:

- run: if command -v gcc &> /dev/null; then echo "GCC found but not expected"; exit 321; fi

- run: go run mage.go test
- run: go run mage test
env:
TEST_NORACE: "true"
3 changes: 2 additions & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@ module github.com/wasilibs/go-re2
go 1.20

require (
github.com/magefile/mage v1.14.0
github.com/tetratelabs/wazero v1.7.1
github.com/wasilibs/nottinygc v0.4.0
)

require github.com/magefile/mage v1.14.0 // indirect
1 change: 1 addition & 0 deletions go.work
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ go 1.20
use (
.
./internal/e2e
./mage
./magefiles
./wafbench
)
5 changes: 5 additions & 0 deletions mage/go.mod
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
module mage

go 1.20

require github.com/magefile/mage v1.15.1-0.20230912152418-9f54e0f83e2a
2 changes: 2 additions & 0 deletions mage/go.sum
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
github.com/magefile/mage v1.15.1-0.20230912152418-9f54e0f83e2a h1:tdPcGgyiH0K+SbsJBBm2oPyEIOTAvLBwD9TuUwVtZho=
github.com/magefile/mage v1.15.1-0.20230912152418-9f54e0f83e2a/go.mod h1:z5UZb/iS3GoOSn0JgWuiw7dxlurVYTu+/jHXqQg881A=
3 changes: 0 additions & 3 deletions mage.go → mage/main.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
//go:build tools
// +build tools

// Entrypoint to mage for running without needing to install the command.
// https://magefile.org/zeroinstall/
package main
Expand Down

0 comments on commit c57a578

Please sign in to comment.