@@ -13,11 +13,13 @@ concurrency:
1313 group : ${{ github.workflow }}-${{ github.ref }}
1414 cancel-in-progress : true
1515
16+ permissions :
17+ contents : read
18+
1619jobs :
1720 test :
18- name : Test (${{ matrix.os }})
21+ name : Test (${{ matrix.os }} / Go ${{ matrix.go-version }} )
1922 runs-on : ${{ matrix.os }}
20- continue-on-error : true
2123 strategy :
2224 fail-fast : false
2325 matrix :
2830 - uses : actions/setup-go@v5
2931 with :
3032 go-version : ${{ matrix.go-version }}
33+ - name : go vet
34+ run : go vet ./...
3135 - name : Run tests
3236 run : go test -race -v -count=1 -coverprofile=coverage.out ./...
3337 - name : Upload coverage
4044 lint :
4145 name : Lint
4246 runs-on : ubuntu-latest
43- continue-on-error : true
4447 steps :
4548 - uses : actions/checkout@v4
4649 - uses : actions/setup-go@v5
@@ -50,26 +53,29 @@ jobs:
5053 uses : golangci/golangci-lint-action@v6
5154 with :
5255 version : latest
56+ - name : Install staticcheck
57+ run : go install honnef.co/go/tools/cmd/staticcheck@latest
58+ - name : Run staticcheck
59+ run : staticcheck ./...
5360
5461 fuzz :
5562 name : Fuzz Tests
5663 runs-on : ubuntu-latest
57- continue-on-error : true
5864 steps :
5965 - uses : actions/checkout@v4
6066 - uses : actions/setup-go@v5
6167 with :
6268 go-version : " 1.22"
6369 - name : Run fuzz tests
6470 run : |
71+ set -e
6572 for pkg in $(go list ./... | grep -E 'protocol|core|security'); do
66- go test -fuzz=. -fuzztime=30s "$pkg" 2>/dev/null || true
73+ go test -fuzz=. -fuzztime=30s "$pkg" || true
6774 done
6875
6976 benchmark :
7077 name : Benchmarks
7178 runs-on : ubuntu-latest
72- continue-on-error : true
7379 steps :
7480 - uses : actions/checkout@v4
7581 - uses : actions/setup-go@v5
@@ -85,19 +91,33 @@ jobs:
8591 build-c-sdk :
8692 name : C SDK (${{ matrix.os }})
8793 runs-on : ${{ matrix.os }}
88- continue-on-error : true
8994 strategy :
9095 fail-fast : false
9196 matrix :
92- os : [ubuntu-latest, macos-latest]
97+ os : [ubuntu-latest, macos-latest, windows-latest ]
9398 steps :
9499 - uses : actions/checkout@v4
95- - name : Build C SDK
100+ - name : Build C SDK (Unix)
101+ if : runner.os != 'Windows'
102+ shell : bash
96103 run : |
97104 cd sdk/c
98105 if [ -f CMakeLists.txt ]; then
99106 cmake -B build
100- cmake --build build
107+ cmake --build build --parallel
101108 elif [ -f Makefile ]; then
102109 make
103- fi
110+ else
111+ echo "::warning::No build system found in sdk/c"
112+ fi
113+ - name : Build C SDK (Windows)
114+ if : runner.os == 'Windows'
115+ shell : bash
116+ run : |
117+ cd sdk/c
118+ if [ -f CMakeLists.txt ]; then
119+ cmake -B build -A x64
120+ cmake --build build --config Release --parallel
121+ else
122+ echo "::warning::No CMakeLists.txt found in sdk/c on Windows"
123+ fi
0 commit comments