ci: upgrade go to 1.22

This commit:
- updates status-go to point to https://github.com/status-im/status-go/pull/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
This commit is contained in:
Siddarth Kumar 2025-01-16 23:17:39 +05:30
parent c887581994
commit bce7f7d3d0
16 changed files with 49 additions and 47 deletions

View File

@ -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}" \

View File

@ -11,7 +11,7 @@ pipeline {
/* Necessary image with Ubuntu 20.04 for older Glibc. */
docker {
label 'linux'
image 'statusteam/nim-status-client-build:1.5.3-qt5.15.2'
image 'statusteam/nim-status-client-build:1.6.1-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'
}

View File

@ -8,7 +8,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 {

View File

@ -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'
}
}

View File

@ -6,7 +6,7 @@ library 'status-jenkins-lib@v1.9.17'
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(

View File

@ -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)"

View File

@ -1,22 +0,0 @@
{ callPackage }:
callPackage ./binary.nix {
version = "1.21.11";
hashes = {
# Use `print-hashes.sh ${version}` to generate the list below
darwin-amd64 = "a3efff72f7aba31c85b53ebfd3985d0e3157a87b0e69e178161ba7097c197885";
darwin-arm64 = "0142f5ac9f9a1bf19b826ee08a8c7955a745f7a2e62d36e0566d29fcac4d88e0";
linux-386 = "8b00cbc2519c2d052177bf2c8472bf06578d3b0182eeb3406a1d7d4e5d4c59ef";
linux-amd64 = "54a87a9325155b98c85bc04dc50298ddd682489eb47f486f2e6cb0707554abf0";
linux-arm64 = "715d9a7ff72e4e0e3378c48318c52c6e4dd32a47c4136f3c08846f89b2ee2241";
linux-armv6l = "a62bff8297816a387a36bbda2889dd0dbcf0f8ce03bc62162ecd6918d6acecb5";
linux-loong64 = "19c738e3670efb6581a91d7d93e719080ccf710684938d015ab3e7ca044715be";
linux-mips = "4240bd1a4ca8ab664ead554b418bd1b1f319b063258763ade44f81a4dd018e61";
linux-mips64 = "6245001da9e2c39698f97543019f9faf4813f0564e471ec654f4698e0b9f19eb";
linux-mips64le = "d10166bb6ea6538e24f01ac9bcbbbaee5657d07b9edc11a82cbf569355a36534";
linux-mipsle = "8ab7e1af86845aa39bc93e1ae7e58f79a0b8df59783129c3b73aa0379f693c4a";
linux-ppc64 = "2939e56894877c51eb9c579f55588b80c77f38481240042512307ad1db5b3dd8";
linux-ppc64le = "6f5e18187abc4ff1c3173afbe38ef29f84b6d1ee7173f40075a4134863b209a5";
linux-riscv64 = "3ee5f9aac2f252838d88bb4cf93560c567814889c74d87ad8a04be16aa5e1b21";
linux-s390x = "489c363d5da2d3d5709419bda61856582c5ebdc7874ca7ecdebf67d736d329e6";
};
}

View File

@ -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";
};
}

View File

@ -1,6 +1,6 @@
{ buildGo121Module, fetchFromGitHub, lib }:
{ buildGo122Module, fetchFromGitHub, lib }:
buildGo121Module rec {
buildGo122Module rec {
pname = "mockgen";
version = "0.4.0";

View File

@ -1,8 +1,8 @@
{ pkgs ? import <nixpkgs> { } }:
let
inherit (pkgs) lib buildGo121Module fetchFromGitHub;
in buildGo121Module rec {
inherit (pkgs) lib buildGo122Module fetchFromGitHub;
in buildGo122Module rec {
pname = "protoc-gen-go";
version = "1.34.1";

View File

@ -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"
@ -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}"

View File

@ -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"
@ -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}"
@ -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

View File

@ -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 `

View File

@ -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; [

2
vendor/status-go vendored

@ -1 +1 @@
Subproject commit 157d6eb1bd075b8ab04ff89cd2a2598799ce0c2d
Subproject commit 562eacef3968bffc3aa09afbfd5d4a90e8d2ce01

@ -1 +1 @@
Subproject commit 03d1c04e293ed66dbce66a8554b5374f11e9c090
Subproject commit 6076ce417dfd76a659fa565d69d3d35dfae444bc