|
2 | 2 | set -e # exit when any command fails |
3 | 3 | set -x # show all commands being run |
4 | 4 |
|
5 | | -GC=go |
6 | | -COMPILE_CHECK_DIR="internal/cmd/compilecheck" |
7 | | -ARCHITECTURES=("386" "arm" "arm64" "ppc64le" "s390x") |
8 | | -BUILD_CMD="${GC} build -buildvcs=false" |
9 | | - |
10 | | -# Compilation modules are not part of the workspace as testcontainers requires |
11 | | -# a version of klauspost/compress not supported by the Go Driver / other modules |
12 | | -# in the workspace. |
13 | | -export GOWORK=off |
14 | | - |
15 | | -# compile_check will attempt to build the internal/test/compilecheck project |
16 | | -# using the provided Go version. This is to simulate an end-to-end use case. |
17 | | -function compile_check { |
18 | | - # Change the directory to the compilecheck test directory. |
19 | | - pushd "${COMPILE_CHECK_DIR}" >/dev/null |
20 | | - |
21 | | - ${GC} version |
22 | | - ${GC} mod tidy |
23 | | - |
24 | | - # Standard build |
25 | | - $BUILD_CMD ./... |
26 | | - |
27 | | - # Dynamic linking |
28 | | - $BUILD_CMD -buildmode=plugin |
29 | | - |
30 | | - # Check build with tags. |
31 | | - [[ -n "$BUILD_TAGS" ]] && $BUILD_CMD $BUILD_TAGS ./... |
32 | | - |
33 | | - # Check build with various architectures. |
34 | | - for ARCH in "${ARCHITECTURES[@]}"; do |
35 | | - GOOS=linux GOARCH=$ARCH $BUILD_CMD ./... |
36 | | - done |
37 | | - |
38 | | - # Change the directory back to the working directory. |
39 | | - popd >/dev/null |
40 | | -} |
41 | | - |
42 | | -compile_check |
| 5 | +#GC=go |
| 6 | +#COMPILE_CHECK_DIR="internal/cmd/compilecheck" |
| 7 | +#ARCHITECTURES=("386" "arm" "arm64" "ppc64le" "s390x") |
| 8 | +#BUILD_CMD="${GC} build -buildvcs=false" |
| 9 | +# |
| 10 | +## Compilation modules are not part of the workspace as testcontainers requires |
| 11 | +## a version of klauspost/compress not supported by the Go Driver / other modules |
| 12 | +## in the workspace. |
| 13 | +#export GOWORK=off |
| 14 | +# |
| 15 | +## compile_check will attempt to build the internal/test/compilecheck project |
| 16 | +## using the provided Go version. This is to simulate an end-to-end use case. |
| 17 | +#function compile_check { |
| 18 | +# # Change the directory to the compilecheck test directory. |
| 19 | +# pushd "${COMPILE_CHECK_DIR}" >/dev/null |
| 20 | +# |
| 21 | +# ${GC} version |
| 22 | +# ${GC} mod tidy |
| 23 | +# |
| 24 | +# # Standard build |
| 25 | +# $BUILD_CMD ./... |
| 26 | +# |
| 27 | +# # Dynamic linking |
| 28 | +# $BUILD_CMD -buildmode=plugin |
| 29 | +# |
| 30 | +# # Check build with tags. |
| 31 | +# [[ -n "$BUILD_TAGS" ]] && $BUILD_CMD $BUILD_TAGS ./... |
| 32 | +# |
| 33 | +# # Check build with various architectures. |
| 34 | +# for ARCH in "${ARCHITECTURES[@]}"; do |
| 35 | +# GOOS=linux GOARCH=$ARCH $BUILD_CMD ./... |
| 36 | +# done |
| 37 | +# |
| 38 | +# # Change the directory back to the working directory. |
| 39 | +# popd >/dev/null |
| 40 | +#} |
| 41 | +# |
| 42 | +#compile_check |
0 commit comments