diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index ada8615..ba3c73c 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -32,7 +32,7 @@ jobs: env: NAME: clash BINDIR: bin - run: make -j releases + run: make -j $(go run ./test/main.go) releases - name: Upload Release uses: softprops/action-gh-release@v1 diff --git a/go.mod b/go.mod index 16be599..6e2dbee 100644 --- a/go.mod +++ b/go.mod @@ -17,7 +17,7 @@ require ( github.com/stretchr/testify v1.8.2 go.etcd.io/bbolt v1.3.7 go.uber.org/atomic v1.10.0 - go.uber.org/automaxprocs v1.5.1 + go.uber.org/automaxprocs v1.5.2 golang.org/x/crypto v0.7.0 golang.org/x/net v0.8.0 golang.org/x/sync v0.1.0 diff --git a/go.sum b/go.sum index db3eacf..793b3c3 100644 --- a/go.sum +++ b/go.sum @@ -57,8 +57,8 @@ go.etcd.io/bbolt v1.3.7 h1:j+zJOnnEjF/kyHlDDgGnVL/AIqIJPq8UoB2GSNfkUfQ= go.etcd.io/bbolt v1.3.7/go.mod h1:N9Mkw9X8x5fupy0IKsmuqVtoGDyxsaDlbk4Rd05IAQw= go.uber.org/atomic v1.10.0 h1:9qC72Qh0+3MqyJbAn8YU5xVq1frD8bn3JtD2oXtafVQ= go.uber.org/atomic v1.10.0/go.mod h1:LUxbIzbOniOlMKjJjyPfpl4v+PKK2cNJn91OQbhoJI0= -go.uber.org/automaxprocs v1.5.1 h1:e1YG66Lrk73dn4qhg8WFSvhF0JuFQF0ERIp4rpuV8Qk= -go.uber.org/automaxprocs v1.5.1/go.mod h1:BF4eumQw0P9GtnuxxovUd06vwm1o18oMzFtK66vU6XU= +go.uber.org/automaxprocs v1.5.2 h1:2LxUOGiR3O6tw8ui5sZa2LAaHnsviZdVOUZw4fvbnME= +go.uber.org/automaxprocs v1.5.2/go.mod h1:eRbA25aqJrxAbsLO0xy5jVwPt7FQnRgjW+efnwa1WM0= golang.org/x/crypto v0.7.0 h1:AvwMYaRytfdeVt3u6mLaxYtErKYjxA2OXjJ1HHq6t3A= golang.org/x/crypto v0.7.0/go.mod h1:pYwdfH91IfpZVANVyUOhSIPZaFoJGxTFbZhFTx+dXZU= golang.org/x/exp v0.0.0-20220303212507-bbda1eaf7a17 h1:3MTrJm4PyNL9NBqvYDSj3DHl46qQakyfqfWo4jgfaEM= diff --git a/test/main.go b/test/main.go new file mode 100644 index 0000000..1a99371 --- /dev/null +++ b/test/main.go @@ -0,0 +1,14 @@ +package main + +import ( + "os" + "runtime" + "strconv" + + "go.uber.org/automaxprocs/maxprocs" +) + +func main() { + maxprocs.Set(maxprocs.Logger(func(string, ...any) {})) + os.Stdout.Write([]byte(strconv.FormatInt(int64(runtime.GOMAXPROCS(0)), 10))) +}