@@ -5,135 +5,103 @@ jobs:
55 strategy :
66 fail-fast : false
77 matrix :
8- go-version : [1.24.x, 1.25.x]
9- openssl-version :
10- [1.1.0, 1.1.1, 3.0.1, 3.0.13, 3.1.5, 3.2.1, 3.3.0, 3.3.1]
8+ go-version : [1.23.x, 1.24.x]
9+ openssl-version : [1.1.0, 1.1.1, 3.0.1, 3.0.13, 3.1.5, 3.2.1, 3.3.0, 3.3.1]
1110 runs-on : ubuntu-22.04
1211 steps :
13- - name : Install build tools
14- run : sudo apt-get install -y build-essential
15- - name : Install Go
16- uses : actions/setup-go@v5
17- with :
18- go-version : ${{ matrix.go-version }}
19- - name : Checkout code
20- uses : actions/checkout@v4
21- - name : Verify go generate leaves no changes
22- run : |
23- go generate ./...
24- git diff --exit-code
25- - name : Install OpenSSL
26- run : sudo sh ./scripts/openssl.sh ${{ matrix.openssl-version }}
27- - name : Check headers
28- working-directory : ./cmd/checkheader
29- run : |
30- go run . --ossl-include /usr/local/src/openssl-${{ matrix.openssl-version }}/include -shim ../../internal/ossl/shims.h
31- - name : Set OpenSSL config and prove FIPS
32- run : |
33- sudo cp ./scripts/openssl-3.cnf /usr/local/ssl/openssl.cnf
34- go test -v -count 0 . | grep -q "FIPS enabled: true"
35- if : ${{ matrix.openssl-version == '3.0.1' }}
36- env :
37- GO_OPENSSL_VERSION_OVERRIDE : ${{ matrix.openssl-version }}
38- - name : Run Test
39- # Run each test 10 times so the garbage collector chimes in
40- # and exercises the multiple finalizers we use.
41- # This can detect use-after-free and double-free issues.
42- run : go test -gcflags=all=-d=checkptr -count 10 -v ./...
43- env :
44- GO_OPENSSL_VERSION_OVERRIDE : ${{ matrix.openssl-version }}
45- CGO_ENABLED : 0
46- GOFLAGS : -tags=goexperiment.ms_go_nocgo_opensslcrypto
47- - name : Run Test CGO disabled
48- run : go test -count 10 -v ./...
49- env :
50- GO_OPENSSL_VERSION_OVERRIDE : ${{ matrix.openssl-version }}
51- - name : Run Test with address sanitizer
52- run : |
53- ok=true
54- for t in $(go test ./... -list=. | grep '^Test'); do
55- go test ./... -gcflags=all=-d=checkptr -asan -run ^$t$ -v || ok=false
56- done
57- $ok
58- env :
59- GO_OPENSSL_VERSION_OVERRIDE : ${{ matrix.openssl-version }}
60-
12+ - name : Install build tools
13+ run : sudo apt-get install -y build-essential
14+ - name : Install Go
15+ uses : actions/setup-go@v5
16+ with :
17+ go-version : ${{ matrix.go-version }}
18+ - name : Checkout code
19+ uses : actions/checkout@v4
20+ - name : Verify go generate leaves no changes
21+ run : |
22+ go generate ./...
23+ git diff --exit-code
24+ - name : Install OpenSSL
25+ run : sudo sh ./scripts/openssl.sh ${{ matrix.openssl-version }}
26+ - name : Check headers
27+ working-directory : ./cmd/checkheader
28+ run : |
29+ go run . --ossl-include /usr/local/src/openssl-${{ matrix.openssl-version }}/include -shim ../../internal/ossl/shims.h
30+ - name : Set OpenSSL config and prove FIPS
31+ run : |
32+ sudo cp ./scripts/openssl-3.cnf /usr/local/ssl/openssl.cnf
33+ go test -v -count 0 . | grep -q "FIPS enabled: true"
34+ if : ${{ matrix.openssl-version == '3.0.1' }}
35+ env :
36+ GO_OPENSSL_VERSION_OVERRIDE : ${{ matrix.openssl-version }}
37+ - name : Run Test
38+ # Run each test 10 times so the garbage collector chimes in
39+ # and exercises the multiple finalizers we use.
40+ # This can detect use-after-free and double-free issues.
41+ run : go test -gcflags=all=-d=checkptr -count 10 -v ./...
42+ env :
43+ GO_OPENSSL_VERSION_OVERRIDE : ${{ matrix.openssl-version }}
44+ - name : Run Test with address sanitizer
45+ run : |
46+ ok=true
47+ for t in $(go test ./... -list=. | grep '^Test'); do
48+ go test ./... -gcflags=all=-d=checkptr -asan -run ^$t$ -v || ok=false
49+ done
50+ $ok
51+ env :
52+ GO_OPENSSL_VERSION_OVERRIDE : ${{ matrix.openssl-version }}
6153 wintest :
6254 runs-on : windows-2022
6355 strategy :
6456 fail-fast : false
6557 matrix :
66- go-version : [1.24 .x, 1.25 .x]
58+ go-version : [1.22 .x, 1.23 .x]
6759 openssl-version : [libcrypto-1_1-x64.dll, libcrypto-3-x64.dll]
6860 steps :
69- - name : Install Go
70- uses : actions/setup-go@v5
71- with :
72- go-version : ${{ matrix.go-version }}
73- - name : Checkout code
74- uses : actions/checkout@v4
75- - name : Run Test
76- run : go test -gcflags=all=-d=checkptr -count 10 -v ./...
77- env :
78- GO_OPENSSL_VERSION_OVERRIDE : ${{ matrix.openssl-version }}
79- CGO_ENABLED : 1
80- - name : Run Test CGO disabled
81- run : go test -count 10 -v ./...
82- env :
83- GO_OPENSSL_VERSION_OVERRIDE : ${{ matrix.openssl-version }}
84- CGO_ENABLED : 0
85- GOFLAGS : -tags=goexperiment.ms_go_nocgo_opensslcrypto
86-
61+ - name : Install Go
62+ uses : actions/setup-go@v5
63+ with :
64+ go-version : ${{ matrix.go-version }}
65+ - name : Checkout code
66+ uses : actions/checkout@v4
67+ - name : Run Test
68+ run : go test -gcflags=all=-d=checkptr -count 10 -v ./...
69+ env :
70+ GO_OPENSSL_VERSION_OVERRIDE : ${{ matrix.openssl-version }}
8771 mactest :
8872 strategy :
8973 fail-fast : false
9074 matrix :
91- go-version : [1.24 .x, 1.25 .x]
75+ go-version : [1.22 .x, 1.23 .x]
9276 openssl-version : [/usr/local/opt/openssl@3/lib/libcrypto.3.dylib]
9377 runs-on : macos-13
9478 steps :
95- - name : Install Go
96- uses : actions/setup-go@v5
97- with :
98- go-version : ${{ matrix.go-version }}
99- - name : Checkout code
100- uses : actions/checkout@v4
101- - name : Run Test
102- run : go test -gcflags=all=-d=checkptr -count 10 -v ./...
103- env :
104- GO_OPENSSL_VERSION_OVERRIDE : ${{ matrix.openssl-version }}
105- - name : Run Test CGO disabled
106- run : go test -count 10 -v ./...
107- env :
108- GO_OPENSSL_VERSION_OVERRIDE : ${{ matrix.openssl-version }}
109- CGO_ENABLED : 0
110- GOFLAGS : -tags=goexperiment.ms_go_nocgo_opensslcrypto
111-
79+ - name : Install Go
80+ uses : actions/setup-go@v5
81+ with :
82+ go-version : ${{ matrix.go-version }}
83+ - name : Checkout code
84+ uses : actions/checkout@v4
85+ - name : Run Test
86+ run : go test -gcflags=all=-d=checkptr -count 10 -v ./...
87+ env :
88+ GO_OPENSSL_VERSION_OVERRIDE : ${{ matrix.openssl-version }}
11289 azurelinux :
11390 runs-on : ubuntu-latest
11491 container : mcr.microsoft.com/oss/go/microsoft/golang:1.23-azurelinux3.0
11592 steps :
116- - name : Checkout code
117- uses : actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
118- - name : Run Test
119- run : go test -v ./...
120- - name : Run Test CGO disabled
121- run : go test -v ./...
122- env :
123- CGO_ENABLED : 0
124- GOFLAGS : -tags=goexperiment.ms_go_nocgo_opensslcrypto
125-
93+ - name : Checkout code
94+ uses : actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
95+ - name : Run Test
96+ run : go test -v ./...
12697 mariner2 :
12798 runs-on : ubuntu-latest
12899 container : mcr.microsoft.com/oss/go/microsoft/golang:1.23.1-3-cbl-mariner2.0
129100 steps :
130- - name : Checkout code
131- uses : actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
132- - name : Run Test CGO disabled
133- run : go test -v ./...
134- env :
135- CGO_ENABLED : 0
136- GOFLAGS : -tags=goexperiment.ms_go_nocgo_opensslcrypto
101+ - name : Checkout code
102+ uses : actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
103+ - name : Run Test
104+ run : go test -v ./...
137105
138106 # Verify that golang-fips/openssl builds successfully without cgo enabled.
139107 #
@@ -147,8 +115,6 @@ jobs:
147115 #
148116 # The golang-fips/openssl module can't do any crypto when built without cgo,
149117 # but it exports a few simple functions and types.
150- #
151- # TODO: Remove once ms_go_nocgo_opensslcrypto is enabled by default.
152118 cgolessbuild :
153119 runs-on : ubuntu-latest
154120 steps :
0 commit comments