Skip to content

Commit e9dce53

Browse files
committed
fix(ci): fix build env for simd
1 parent 51ccb13 commit e9dce53

File tree

3 files changed

+12
-3
lines changed

3 files changed

+12
-3
lines changed

.github/workflows/test.simd.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,10 @@ on:
44
push:
55
# pull_request:
66

7+
env:
8+
GOEXPERIMENT: simd
9+
GOWORK: off
10+
711
jobs:
812
test-simd:
913
# GitHub hosted runners run on several architectures.
@@ -34,4 +38,4 @@ jobs:
3438
- name: Benchmark
3539
run: |
3640
cd plugins/exp/simd/
37-
GOEXPERIMENT=simd go test -run=^Benchmark -benchmem -bench ./...
41+
GOWORK=off GOEXPERIMENT=simd go test -run=^Benchmark -benchmem -bench ./...

Makefile

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,12 @@ MODULES=$(shell go list -m)
22

33
build:
44
go build -v ${MODULES} ./...
5+
@if [ -n "$(GOEXPERIMENT)" ]; then cd ./plugins/exp/simd && GOWORK=off GOEXPERIMENT=simd go build -v ./...; fi
56

67
test:
78
go test -race ${MODULES} ./...
9+
@if [ -n "$(GOEXPERIMENT)" ]; then cd ./plugins/exp/simd && GOWORK=off GOEXPERIMENT=simd go test -race ./...; fi
10+
811
watch-test:
912
reflex -t 50ms -s -- sh -c 'gotest -timeout 300s -race ${MODULES} ./...'
1013

@@ -34,10 +37,12 @@ tools:
3437

3538
lint:
3639
golangci-lint run --timeout 60s --max-same-issues 50 ./...
40+
@if [ -n "$(GOEXPERIMENT)" ]; then cd ./plugins/exp/simd && GOWORK=off GOEXPERIMENT=simd golangci-lint run --timeout 60s --max-same-issues 50 ./...; fi
3741
headercheck --config ./licenses/headercheck.yaml .
3842
# mdsf verify --debug --log-level warn docs/
3943
lint-fix:
4044
golangci-lint run --timeout 60s --max-same-issues 50 --fix ./...
45+
@if [ -n "$(GOEXPERIMENT)" ]; then cd ./plugins/exp/simd && GOWORK=off GOEXPERIMENT=simd golangci-lint run --timeout 60s --max-same-issues 50 --fix ./...; fi
4146
headercheck --config ./licenses/headercheck.yaml --fix .
4247
# mdsf format --debug --log-level warn docs/
4348

go.work

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
go 1.26
1+
go 1.18
22

33
//
44
// Base library
@@ -17,7 +17,7 @@ use (
1717
./plugins/encoding/gob
1818
./plugins/encoding/json
1919
// Commented out because requires go>=1.26
20-
./plugins/exp/simd
20+
// ./plugins/exp/simd
2121
// Commented out because requires go>=1.25
2222
// ./plugins/encoding/json/v2
2323
./plugins/fsnotify

0 commit comments

Comments
 (0)