File tree 2 files changed +29
-13
lines changed
.github/actions/build-vault
2 files changed +29
-13
lines changed Original file line number Diff line number Diff line change 87
87
with :
88
88
github-token : ${{ inputs.github-token }}
89
89
- uses : ./.github/actions/install-external-tools
90
+ - if : inputs.goarch == 's390x' && inputs.vault-edition == 'ent.hsm'
91
+ name : Configure CGO compiler for HSM edition on s390x
92
+ shell : bash
93
+ run : |
94
+ sudo apt-get update
95
+ sudo apt-get install -y gcc-multilib-s390x-linux-gnu
96
+ {
97
+ echo "CC=s390x-linux-gnu-gcc"
98
+ echo "CC_FOR_TARGET=s390x-linux-gnu-gcc"
99
+ } | tee -a "$GITHUB_ENV"
90
100
- if : inputs.vault-edition != 'ce'
91
101
name : Configure Git
92
102
shell : bash
Original file line number Diff line number Diff line change 2
2
# Copyright (c) HashiCorp, Inc.
3
3
# SPDX-License-Identifier: BUSL-1.1
4
4
5
-
6
5
# The ci-helper is used to determine build metadata, build Vault binaries,
7
6
# package those binaries into artifacts, and execute tests with those artifacts.
8
7
@@ -92,7 +91,14 @@ function build() {
92
91
: " ${GO_TAGS:= " " } "
93
92
: " ${REMOVE_SYMBOLS:= " " } "
94
93
95
- (unset GOOS; unset GOARCH; go generate ./...)
94
+ # Generate code but make sure we don't slurp in cross compilation env vars
95
+ (
96
+ unset GOOS
97
+ unset GOARCH
98
+ unset CC
99
+ unset CC_FOR_TARGET
100
+ go generate ./...
101
+ )
96
102
97
103
# Build our ldflags
98
104
msg=" --> Building Vault revision $revision , built $build_date ..."
@@ -155,43 +161,43 @@ function prepare_ce_legal() {
155
161
# Package version converts a vault version string into a compatible representation for system
156
162
# packages.
157
163
function version_package() {
158
- awk ' { gsub("-","~",$1); print $1 }' <<< " $VAULT_VERSION"
164
+ awk ' { gsub("-","~",$1); print $1 }' <<< " $VAULT_VERSION"
159
165
}
160
166
161
167
# Run the CI Helper
162
168
function main() {
163
169
case $1 in
164
170
artifact-basename)
165
171
artifact_basename
166
- ;;
172
+ ;;
167
173
build)
168
174
build
169
- ;;
175
+ ;;
170
176
build-ui)
171
177
build_ui
172
- ;;
178
+ ;;
173
179
bundle)
174
180
bundle
175
- ;;
181
+ ;;
176
182
date)
177
183
build_date
178
- ;;
184
+ ;;
179
185
prepare-ent-legal)
180
186
prepare_ent_legal
181
- ;;
187
+ ;;
182
188
prepare-ce-legal)
183
189
prepare_ce_legal
184
- ;;
190
+ ;;
185
191
revision)
186
192
build_revision
187
- ;;
193
+ ;;
188
194
version-package)
189
195
version_package
190
- ;;
196
+ ;;
191
197
* )
192
198
echo " unknown sub-command" >&2
193
199
exit 1
194
- ;;
200
+ ;;
195
201
esac
196
202
}
197
203
You can’t perform that action at this time.
0 commit comments