Skip to content

Commit 5026306

Browse files
feat(build): Add FIPS build
1 parent 8f98c9e commit 5026306

File tree

4 files changed

+46
-0
lines changed

4 files changed

+46
-0
lines changed

.github/workflows/presubmit.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ on:
77

88
env:
99
GO_VERSION: 1.23.x
10+
ZIG_VERSION: 0.13.0
1011
GOLINT_ARGS: -v --allow-parallel-runners --timeout=10m --disable errcheck
1112

1213
jobs:
@@ -31,6 +32,11 @@ jobs:
3132
with:
3233
go-version: ${{ env.GO_VERSION }}
3334

35+
- name: Setup Zig 🛠️
36+
uses: goto-bus-stop/setup-zig@v2
37+
with:
38+
version: ${{ env.ZIG_VERSION }}
39+
3440
- name: Test pkg library 🧪
3541
run: |
3642
cd pkg

.github/workflows/release.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ on:
77

88
env:
99
GO_VERSION: 1.23.x
10+
ZIG_VERSION: 0.13.0
1011
GOLINT_ARGS: -v --allow-parallel-runners --timeout=10m --disable errcheck
1112

1213
jobs:
@@ -21,6 +22,11 @@ jobs:
2122
with:
2223
go-version: ${{ env.GO_VERSION }}
2324

25+
- name: Setup Zig 🛠️
26+
uses: goto-bus-stop/setup-zig@v2
27+
with:
28+
version: ${{ env.ZIG_VERSION }}
29+
2430
- name: Test pkg library 🧪
2531
run: |
2632
cd pkg

runtimes/cloudformation/.goreleaser.yml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,5 +27,34 @@ builds:
2727
- -X main.commit={{ .Commit }}
2828
- -X main.date={{ .Date }}
2929

30+
- id: fips
31+
no_unique_dist_dir: true
32+
binary: handler-fips/handler-{{ .Os }}-{{ .Arch }}
33+
main: ./cmd/handler
34+
goos:
35+
- linux
36+
goarch:
37+
- amd64
38+
- arm64
39+
goamd64:
40+
- v1
41+
mod_timestamp: "{{ .CommitTimestamp }}"
42+
tags:
43+
- fips
44+
env:
45+
- GOEXPERIMENT=boringcrypto
46+
- CGO_ENABLED=1
47+
- >-
48+
{{- if and (eq .Os "linux") (eq .Arch "amd64") }}CC=zig c++ -target x86_64-linux-gnu{{- end }}
49+
{{- if and (eq .Os "linux") (eq .Arch "arm64") }}CC=zig c++ -target aarch64-linux-gnu{{- end }}
50+
- >-
51+
{{- if and (eq .Os "linux") (eq .Arch "amd64") }}CXX=zig c++ -target x86_64-linux-gnu{{- end }}
52+
{{- if and (eq .Os "linux") (eq .Arch "arm64") }}CXX=zig c++ -target aarch64-linux-gnu{{- end }}
53+
ldflags:
54+
- -s -w
55+
- -X main.version={{ .Version }}
56+
- -X main.commit={{ .Commit }}
57+
- -X main.date={{ .Date }}
58+
3059
snapshot:
3160
version_template: "{{ .Env.BUILD_VERSION }}"
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
//go:build boringcrypto
2+
3+
package main
4+
5+
import _ "crypto/tls/fipsonly"

0 commit comments

Comments
 (0)