Skip to content

Commit

Permalink
ci: upgrade go to 1.22
Browse files Browse the repository at this point in the history
This commit:
- updates status-go to point to status-im/status-go#6258
- updates nix derivation to switch to go 1.22
- swaps `sc3md` for `sc5md`
- updates docker image used by jenkins for linux jobs to image built with go 1.22.
- updates, linux, windows and MacOS build scripts to use go 1.22
  • Loading branch information
siddarthkay committed Feb 5, 2025
1 parent 09bdb95 commit ae93b70
Show file tree
Hide file tree
Showing 19 changed files with 55 additions and 53 deletions.
4 changes: 2 additions & 2 deletions ci/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -82,8 +82,8 @@ RUN wget https://github.com/Kitware/CMake/releases/download/v3.22.1/cmake-3.22.1
ENV PATH="/opt/cmake/bin:${PATH}"

# Installing Golang
RUN GOLANG_SHA256="e330e5d977bf4f3bdc157bc46cf41afa5b13d66c914e12fd6b694ccda65fcf92" \
&& GOLANG_TARBALL="go1.21.10.linux-amd64.tar.gz" \
RUN GOLANG_SHA256="736ce492a19d756a92719a6121226087ccd91b652ed5caec40ad6dbfb2252092" \
&& GOLANG_TARBALL="go1.22.10.linux-amd64.tar.gz" \
&& wget -q "https://dl.google.com/go/${GOLANG_TARBALL}" \
&& echo "${GOLANG_SHA256} ${GOLANG_TARBALL}" | sha256sum -c \
&& sudo tar -C /usr/local -xzf "${GOLANG_TARBALL}" \
Expand Down
2 changes: 1 addition & 1 deletion ci/Jenkinsfile.combined
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ pipeline {
/* Generate sha256 checksums for all artifacts. */
sha = "./${utils.pkgFilename(ext: 'sha256')}"
sh "sha256sum * | tee ./${sha}"
urls['SHA'] = s3.uploadArtifact(sha)
urls['SHA'] = s5cmd.upload(sha)
jenkins.setBuildDesc(urls)
}
archiveArtifacts('pkg/*')
Expand Down
2 changes: 1 addition & 1 deletion ci/Jenkinsfile.linux
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ pipeline {
/* Necessary image with Ubuntu 20.04 for older Glibc. */
docker {
label 'linux'
image 'statusteam/nim-status-client-build:1.5.1-qt5.15.2'
image 'statusteam/nim-status-client-build:1.6.0-qt5.15.2'
/* allows jenkins use cat and mounts '/dev/fuse' for linuxdeployqt */
args '--entrypoint="" --cap-add SYS_ADMIN --security-opt apparmor:unconfined --device /dev/fuse'
}
Expand Down
2 changes: 1 addition & 1 deletion ci/Jenkinsfile.linux-nix
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ pipeline {
parallel {
stage('Upload') {
steps { script {
env.PKG_URL = s3.uploadArtifact(env.STATUS_CLIENT_TARBALL)
env.PKG_URL = s5cmd.upload(env.STATUS_CLIENT_TARBALL)
jenkins.setBuildDesc(AppImage: env.PKG_URL)
} }
}
Expand Down
4 changes: 2 additions & 2 deletions ci/Jenkinsfile.macos
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ def isPRBuild = utils.isPRBuild()
pipeline {
/* This way we run the same Jenkinsfile on different platforms. */
agent {
label "${getAgentLabels().join(' && ')} && qt-5.15 && go-1.21 && xcode-15.1"
label "${getAgentLabels().join(' && ')} && qt-5.15 && go-1.22 && xcode-15.1"
}

parameters {
Expand Down Expand Up @@ -120,7 +120,7 @@ pipeline {
parallel {
stage('Upload') {
steps { script {
env.PKG_URL = s3.uploadArtifact(env.STATUS_CLIENT_DMG)
env.PKG_URL = s5cmd.upload(env.STATUS_CLIENT_DMG)
jenkins.setBuildDesc(Dmg: env.PKG_URL)
} }
}
Expand Down
2 changes: 1 addition & 1 deletion ci/Jenkinsfile.tests-nim
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ pipeline {
agent {
docker {
label 'linux'
image 'statusteam/nim-status-client-build:1.5.1-qt5.15.2'
image 'statusteam/nim-status-client-build:1.6.0-qt5.15.2'
}
}

Expand Down
6 changes: 3 additions & 3 deletions ci/Jenkinsfile.windows
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ library '[email protected]'
def isPRBuild = utils.isPRBuild()

pipeline {
agent { label 'windows && x86_64 && qt-5.15.2 && go-1.21' }
agent { label 'windows && x86_64 && qt-5.15.2 && go-1.22' }

parameters {
booleanParam(
Expand Down Expand Up @@ -110,12 +110,12 @@ pipeline {
parallel {
stage('Upload 7Z') {
steps { script {
zip_url = s3.uploadArtifact(env.STATUS_CLIENT_7Z)
zip_url = s5cmd.upload(env.STATUS_CLIENT_7Z)
} }
}
stage('Upload EXE') {
steps { script {
exe_url = s3.uploadArtifact(env.STATUS_CLIENT_EXE)
exe_url = s5cmd.upload(env.STATUS_CLIENT_EXE)
} }
}
}
Expand Down
2 changes: 1 addition & 1 deletion ci/cpp/Jenkinsfile.macos
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ pipeline {
parallel {
stage('Upload') {
steps { script {
env.PKG_URL = s3.uploadArtifact(env.STATUS_CLIENT_DMG)
env.PKG_URL = s5cmd.upload(env.STATUS_CLIENT_DMG)
jenkins.setBuildDesc(Dmg: env.PKG_URL)
} }
}
Expand Down
2 changes: 1 addition & 1 deletion ci/cpp/Jenkinsfile.windows
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ pipeline {
parallel {
stage('Upload') {
steps { script {
exe_url = s3.uploadArtifact(env.STATUS_CLIENT_ZIP)
exe_url = s5cmd.upload(env.STATUS_CLIENT_ZIP)
env.PKG_URL = exe_url
jenkins.setBuildDesc(Zip: zip_url, Exe: exe_url)
} }
Expand Down
4 changes: 2 additions & 2 deletions nix/overlay.nix
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,8 @@ in {
# - development/compilers/go/print-hashes.sh 1.21.11
# TODO: compile, not binary
# Binary is used because of initial complexity of both package override and copy from newer nixpkgs
go_1_21 = callPackage ./pkgs/go/bootstrap121.nix { };
buildGo121Module = callPackage ./pkgs/go-module { go = final.go_1_21; };
go_1_22 = callPackage ./pkgs/go/bootstrap122.nix { };
buildGo122Module = callPackage ./pkgs/go-module { go = final.go_1_22; };

# Fix for linuxdeployqt running ldd from nix with system shell
# ERROR: findDependencyInfo: "/bin/sh: /nix/store/HASH-glibc-2.31-74/lib/libc.so.6: version `GLIBC_2.33' not found (required by /bin/sh)\n/bin/sh: /nix/store/0c7c96gikmzv87i7lv3vq5s1cmfjd6zf-glibc-2.31-74/lib/libc.so.6: version `GLIBC_2.34' not found (required by /bin/sh)"
Expand Down
22 changes: 0 additions & 22 deletions nix/pkgs/go/bootstrap121.nix

This file was deleted.

22 changes: 22 additions & 0 deletions nix/pkgs/go/bootstrap122.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
{ callPackage }:
callPackage ./binary.nix {
version = "1.22.3";
hashes = {
# Use `print-hashes.sh ${version}` to generate the list below
darwin-amd64 = "610e48c1df4d2f852de8bc2e7fd2dc1521aac216f0c0026625db12f67f192024";
darwin-arm64 = "02abeab3f4b8981232237ebd88f0a9bad933bc9621791cd7720a9ca29eacbe9d";
linux-386 = "fefba30bb0d3dd1909823ee38c9f1930c3dc5337a2ac4701c2277a329a386b57";
linux-amd64 = "8920ea521bad8f6b7bc377b4824982e011c19af27df88a815e3586ea895f1b36";
linux-arm64 = "6c33e52a5b26e7aa021b94475587fce80043a727a54ceb0eee2f9fc160646434";
linux-armv6l = "f2bacad20cd2b96f23a86d4826525d42b229fd431cc6d0dec61ff3bc448ef46e";
linux-loong64 = "41e9328340544893482b2928ae18a9a88ba18b2fdd29ac77f4d33cf1815bbdc2";
linux-mips = "cf4d5faff52e642492729eaf396968f43af179518be769075b90bc1bf650abf6";
linux-mips64 = "3bd009fe2e3d2bfd52433a11cb210d1dfa50b11b4c347a293951efd9e36de945";
linux-mips64le = "5913b82a042188ef698f7f2dfd0cd0c71f0508a4739de9e41fceff3f4dc769b4";
linux-mipsle = "441afebca555be5313867b4577f237c7b5c0fff4386e22e47875b9f805abbec5";
linux-ppc64 = "f3b53190a76f4a35283501ba6d94cbb72093be0c62ff735c6f9e586a1c983381";
linux-ppc64le = "04b7b05283de30dd2da20bf3114b2e22cc727938aed3148babaf35cc951051ac";
linux-riscv64 = "d4992d4a85696e3f1de06cefbfc2fd840c9c6695d77a0f35cfdc4e28b2121c20";
linux-s390x = "2aba796417a69be5f3ed489076bac79c1c02b36e29422712f9f3bf51da9cf2d4";
};
}
4 changes: 2 additions & 2 deletions nix/pkgs/mockgen/default.nix
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{ buildGo121Module, fetchFromGitHub, lib }:
{ buildGo122Module, fetchFromGitHub, lib }:

buildGo121Module rec {
buildGo122Module rec {
pname = "mockgen";
version = "0.4.0";

Expand Down
6 changes: 3 additions & 3 deletions nix/pkgs/protoc-gen-go/default.nix
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{ pkgs ? import <nixpkgs> { } }:

let
inherit (pkgs) lib buildGo121Module fetchFromGitHub;
in buildGo121Module rec {
let
inherit (pkgs) lib buildGo122Module fetchFromGitHub;
in buildGo122Module rec {
pname = "protoc-gen-go";
version = "1.34.1";

Expand Down
7 changes: 4 additions & 3 deletions scripts/macos_build_setup.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/usr/bin/env bash
set -eo pipefail

GO_VERSION="1.19.5"
GO_VERSION="1.22.10"
GO_INSTALL_DIR="/usr/local/go"
QT_VERSION="5.15.2"
QT_INSTALL_DIR="/usr/local/qt"
Expand Down Expand Up @@ -42,13 +42,14 @@ function install_golang {
fi
declare -A GO_SHA256_MAP
GO_SHA256_MAP=(
["amd64"]="242b099b5b9bd9c5d4d25c041216bc75abcdf8e0541aec975eeabcbce61ad47f"
["arm64"]="61bd4f7f2d209e2a6a7ce17787fc5fea52fb11cc9efb3d8471187a8b39ce0dc9"
["amd64"]="dd2c4ac3702658c2c20e3a8b394da1917d86156b2cb4312c9d2f657f80067874"
["arm64"]="21cf49415ffe0755b45f2b63e75d136528a32f7bb7bdd0166f51d22a03eb0a3f"
)
echo "Install GoLang ${GO_VERSION}"
GO_ARCH=$(get_go_arch)
GO_OS=$(uname -s | tr '[:upper:]' '[:lower:]')
GO_TARBALL="go${GO_VERSION}.${GO_OS}-${GO_ARCH}.tar.gz"
# example: https://dl.google.com/go/go1.22.10.darwin-amd64.tar.gz
wget -q "https://dl.google.com/go/${GO_TARBALL}" -O "${GO_TARBALL}"
echo "${GO_SHA256_MAP[${GO_ARCH}]} ${GO_TARBALL}" | sha256sum -c
tar -C "${GO_INSTALL_DIR%/go}" -xzf "${GO_TARBALL}"
Expand Down
11 changes: 6 additions & 5 deletions scripts/ubuntu_build_setup.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/usr/bin/env bash
set -eo pipefail

GO_VERSION="1.19.5"
GO_VERSION="1.22.10"
GO_INSTALL_DIR="/usr/local/go"
QT_VERSION="5.15.2"
QT_INSTALL_DIR="/opt/qt"
Expand Down Expand Up @@ -66,14 +66,15 @@ function install_golang {
fi
declare -A GO_SHA256_MAP
GO_SHA256_MAP=(
["amd64"]="698ef3243972a51ddb4028e4a1ac63dc6d60821bf18e59a807e051fee0a385bd"
["arm64"]="105889992ee4b1d40c7c108555222ca70ae43fccb42e20fbf1eebb822f5e72c6"
["armv6l"]="0b75ca23061a9996840111f5f19092a1bdbc42ec1ae25237ed2eec1c838bd819"
["amd64"]="736ce492a19d756a92719a6121226087ccd91b652ed5caec40ad6dbfb2252092"
["arm64"]="5213c5e32fde3bd7da65516467b7ffbfe40d2bb5a5f58105e387eef450583eec"
["armv6l"]="a7bbbc80fe736269820bbdf3555e91ada5d18a5cde2276aac3b559bc1d52fc70"
)
echo "Install GoLang ${GO_VERSION}"
GO_OS=$(uname -s | tr '[:upper:]' '[:lower:]')
GO_ARCH=$(get_go_arch)
GO_TARBALL="go${GO_VERSION}.${GO_OS}-${GO_ARCH}.tar.gz"
# example: https://dl.google.com/go/go1.22.10.linux-amd64.tar.gz
wget -q "https://dl.google.com/go/${GO_TARBALL}" -O "${GO_TARBALL}"
echo "${GO_SHA256_MAP[${GO_ARCH}]} ${GO_TARBALL}" | sha256sum -c
tar -C "${GO_INSTALL_DIR}" -xzf "${GO_TARBALL}"
Expand All @@ -85,7 +86,7 @@ function success_message {
msg="
SUCCESS!
Before you attempt to build status-dektop you'll need a few environment variables set:
Before you attempt to build status-desktop you'll need a few environment variables set:
export QTDIR=${QT_INSTALL_DIR}/${QT_VERSION}/gcc_64
export PATH=\$QTDIR:\$QTDIR/bin:\$(go env GOPATH)\bin:$PATH
Expand Down
2 changes: 1 addition & 1 deletion scripts/windows_build_setup.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ function Install-Dependencies {
if (!(scoop bucket list | Where { $_.Name -eq "extras" })) {
scoop bucket add extras
}
scoop install --global go@1.21.10
scoop install --global go@1.22.10
scoop install --global protobuf@3.20.0
scoop install --global vcredist2022
scoop install --global `
Expand Down
2 changes: 1 addition & 1 deletion shell.nix
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ in pkgs.mkShell {
linuxdeployqt appimagekit
libglvnd # TODO: Qt 5.15.2 fix, review after upgrade
cmake_3_19 gnumake pkg-config gnugrep qtCustom
go_1_21 go-bindata mockgen protobuf3_20 protoc-gen-go
go_1_22 go-bindata mockgen protobuf3_20 protoc-gen-go
pcre nss pcsclite extra-cmake-modules
xorg.libxcb xorg.libX11 libxkbcommon
] ++ (with gst_all_1; [
Expand Down
2 changes: 1 addition & 1 deletion vendor/status-go
Submodule status-go updated 89 files
+0 −51 .github/workflows/test-reliability.yml
+1 −1 _assets/build/Dockerfile
+1 −8 _assets/ci/Jenkinsfile.tests-rpc
+4 −4 _assets/scripts/run_functional_tests.sh
+121 −178 api/default_networks.go
+29 −25 api/default_networks_test.go
+2 −5 api/geth_backend.go
+0 −78 contracts/community-tokens/contracts.go
+1 −3 go.mod
+8 −24 nix/overlay.nix
+85 −0 nix/pkgs/gomobile/default.nix
+22 −10 nix/pkgs/xcodeenv/compose-xcodewrapper.nix
+1 −1 nix/shell.nix
+11 −13 node/get_status_node.go
+1 −1 node/status_node_services.go
+17 −1 params/config.go
+0 −17 params/network_config.go
+27 −9 params/networkhelper/provider_utils.go
+21 −16 params/networkhelper/provider_utils_test.go
+2 −4 params/networkhelper/validate_test.go
+2 −0 protocol/communities/manager.go
+2 −0 protocol/communities/persistence.go
+5 −0 protocol/communities_messenger_helpers_test.go
+3 −0 protocol/requests/create_account.go
+72 −73 rpc/client.go
+25 −39 rpc/client_test.go
+12 −56 rpc/network/db/network_db.go
+0 −25 rpc/network/db/network_db_test.go
+7 −37 rpc/network/db/utils.go
+257 −172 rpc/network/network.go
+108 −244 rpc/network/network_test.go
+0 −11 rpc/network/testutil/testutil.go
+98 −0 rpc/provider.go
+1 −0 rpc/verif_proxy_test.go
+460 −30 services/communitytokens/api.go
+65 −0 services/communitytokens/api_test.go
+442 −0 services/communitytokens/estimations.go
+35 −21 services/communitytokens/manager.go
+213 −65 services/communitytokens/service.go
+176 −0 services/communitytokens/token_instances.go
+5 −7 services/connector/commands/test_helpers.go
+5 −7 services/connector/test_helpers.go
+1 −0 services/ens/api_test.go
+1 −5 services/ext/service.go
+1 −4 services/wallet/activity/activity_v2.go
+0 −10 services/wallet/api.go
+21 −33 services/wallet/api_test.go
+0 −1 services/wallet/common/const.go
+1 −0 services/wallet/history/service_test.go
+0 −338 services/wallet/requests/router_input_community_params.go
+0 −73 services/wallet/requests/router_input_community_params_test.go
+0 −49 services/wallet/requests/router_input_params.go
+2 −29 services/wallet/requests/tx_custom_params.go
+0 −7 services/wallet/responses/router_transactions.go
+0 −13 services/wallet/responses/store_community_token_details.go
+8 −9 services/wallet/routeexecution/manager.go
+14 −17 services/wallet/router/errors.go
+10 −19 services/wallet/router/pathprocessor/common/constants.go
+0 −3 services/wallet/router/pathprocessor/errors.go
+4 −19 services/wallet/router/pathprocessor/processor.go
+1 −6 services/wallet/router/pathprocessor/processor_bridge_hop.go
+0 −234 services/wallet/router/pathprocessor/processor_community_burn.go
+0 −126 services/wallet/router/pathprocessor/processor_community_deploy_assets.go
+0 −126 services/wallet/router/pathprocessor/processor_community_deploy_collectibles.go
+0 −191 services/wallet/router/pathprocessor/processor_community_deploy_owner_token.go
+0 −155 services/wallet/router/pathprocessor/processor_community_mint_tokens.go
+0 −120 services/wallet/router/pathprocessor/processor_community_remote_burn.go
+0 −117 services/wallet/router/pathprocessor/processor_community_set_signer_pub_key.go
+0 −42 services/wallet/router/pathprocessor/processor_test.go
+123 −215 services/wallet/router/router.go
+0 −5 services/wallet/router/router_helper.go
+1 −0 services/wallet/router/router_test.go
+28 −45 services/wallet/router/router_test_data.go
+2 −28 services/wallet/router/routes/router_path.go
+21 −38 services/wallet/router/sendtype/send_type.go
+0 −21 services/wallet/service.go
+2 −16 services/wallet/token/token.go
+1 −0 services/wallet/token/token_test.go
+13 −8 services/wallet/transfer/commands_sequential_test.go
+34 −39 services/wallet/transfer/transaction_manager_route.go
+1 −0 services/web3provider/api_test.go
+15 −15 signal/events_community_tokens.go
+1 −1 tests-functional/Dockerfile
+4 −13 tests-functional/clients/status_backend.py
+11 −21 tests-functional/config.json
+9 −8 tests-functional/requirements.txt
+1 −1 tests-unit-network/cryptocompare/cryptocompare_test.go
+3 −10 transactions/transactor.go
+1 −0 transactions/transactor_test.go

0 comments on commit ae93b70

Please sign in to comment.