tests/backwardcompatibility: use noquic tag for release binaries

Older releases are not compiling with latest Go version if quic is used.
We need to add noquic tag to be able to compile older release with
latest Go version.

Change-Id: Id5768fcaa5c1f7cf3e6fbb633e7ca60309b7a37c
This commit is contained in:
Michal Niewrzal 2023-02-21 12:16:51 +01:00
parent 0cdef95d55
commit 8aa6110835
2 changed files with 22 additions and 3 deletions

View File

@ -10,7 +10,7 @@ trap cleanup EXIT
cd satellite/console/wasm && pwd && GOOS=js GOARCH=wasm go build -o main.wasm .
BUILD_SIZE=$(stat -c %s main.wasm)
CURRENT_SIZE=10800000
CURRENT_SIZE=10900000
if [ $BUILD_SIZE -gt $CURRENT_SIZE ]; then
echo "Wasm size is too big, was $CURRENT_SIZE but now it is $BUILD_SIZE"
exit 1

View File

@ -42,6 +42,22 @@ test_branch() {
test "$BRANCH_DIR" "$@"
}
install_sim_noquic(){
local bin_dir="$1"
mkdir -p ${bin_dir}
go build -race -tags noquic -v -o ${bin_dir}/storagenode storj.io/storj/cmd/storagenode >/dev/null 2>&1
go build -race -tags noquic -v -o ${bin_dir}/satellite storj.io/storj/cmd/satellite >/dev/null 2>&1
go build -race -tags noquic -v -o ${bin_dir}/storj-sim storj.io/storj/cmd/storj-sim >/dev/null 2>&1
go build -race -tags noquic -v -o ${bin_dir}/versioncontrol storj.io/storj/cmd/versioncontrol >/dev/null 2>&1
go build -race -tags noquic -v -o ${bin_dir}/uplink storj.io/storj/cmd/uplink >/dev/null 2>&1
go build -race -tags noquic -v -o ${bin_dir}/identity storj.io/storj/cmd/identity >/dev/null 2>&1
go build -race -tags noquic -v -o ${bin_dir}/certificates storj.io/storj/cmd/certificates >/dev/null 2>&1
GOBIN=${bin_dir} go install -race -tags noquic storj.io/gateway@latest
}
##
## Build the release and branch binaries and set up the network
##
@ -68,12 +84,15 @@ EOF
SCRIPTDIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
GOBIN="$RELEASE_DIR"/bin make -C "$RELEASE_DIR" install-sim
pushd $RELEASE_DIR
install_sim_noquic "$RELEASE_DIR"/bin
popd
GOBIN="$BRANCH_DIR"/bin make -C "$BRANCH_DIR" install-sim
echo "Overriding default max segment size to 6MiB"
pushd $RELEASE_DIR
GOBIN=$RELEASE_DIR/bin go install -v -ldflags "-X 'storj.io/uplink.maxSegmentSize=6MiB'" storj.io/storj/cmd/uplink
GOBIN=$RELEASE_DIR/bin go install -tags noquic -v -ldflags "-X 'storj.io/uplink.maxSegmentSize=6MiB'" storj.io/storj/cmd/uplink
popd
pushd $BRANCH_DIR
GOBIN=$BRANCH_DIR/bin go install -v -ldflags "-X 'storj.io/uplink.maxSegmentSize=6MiB'" storj.io/storj/cmd/uplink