Skip to content

Commit

Permalink
chore: emit build commands during tests
Browse files Browse the repository at this point in the history
  • Loading branch information
bnpfeife committed Nov 23, 2023
1 parent 6159c85 commit b90b681
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
8 changes: 4 additions & 4 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -376,10 +376,10 @@ jobs:
- checkout
- run:
name: Build test binaries
command: |
export GOOS=<< parameters.os >>
export GOARCH=<< parameters.arch >>
./scripts/ci/build-tests.sh ./test-bin
environment:
GOOS: << parameters.os >>
GOARCH: << parameters.arch >>
command: ./scripts/ci/build-tests.sh ./test-bin
- persist_to_workspace:
root: .
paths:
Expand Down
8 changes: 4 additions & 4 deletions scripts/ci/build-tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,17 +20,17 @@ function build_linux () {

local -r extld="-fno-PIC -static -Wl,-z,stack-size=8388608"
CGO_ENABLED=1 PKG_CONFIG=$(which pkg-config) CC="${cc}" go-test-compile \
-tags "$tags" -o "${1}/" -ldflags "-extldflags '$extld'" ./...
-x -tags "$tags" -o "${1}/" -ldflags "-extldflags '$extld'" ./...
}

function build_mac () {
CGO_ENABLED=1 PKG_CONFIG=$(which pkg-config) CC="$(xcc darwin)" go-test-compile \
-tags sqlite_foreign_keys,sqlite_json -o "${1}/" ./...
-x -tags sqlite_foreign_keys,sqlite_json -o "${1}/" ./...
}

function build_windows () {
CGO_ENABLED=1 PKG_CONFIG=$(which pkg-config) CC="$(xcc windows)" go-test-compile \
-tags sqlite_foreign_keys,sqlite_json,timetzdata -o "${1}/" ./...
-x -tags sqlite_foreign_keys,sqlite_json,timetzdata -o "${1}/" ./...
}

function build_test_tools () {
Expand All @@ -42,7 +42,7 @@ function build_test_tools () {
cp "/usr/local/bin/gotestsum_$(go env GOOS)_$(go env GOARCH)${ext}" "$1/gotestsum${ext}"

# Build test2json from the installed Go distribution.
CGO_ENABLED=0 go build -o "${1}/" -ldflags="-s -w" cmd/test2json
CGO_ENABLED=0 go build -x -o "${1}/" -ldflags="-s -w" cmd/test2json
}

function write_test_metadata () {
Expand Down

0 comments on commit b90b681

Please sign in to comment.