Skip to content

Commit

Permalink
ci: update build setup scripts to Qt 5.15.2
Browse files Browse the repository at this point in the history
This needs to be synced with a Squish upgrade to match the QT version.

Signed-off-by: Jakub Sokołowski <[email protected]>
  • Loading branch information
jakubgs committed Feb 1, 2023
1 parent fb52684 commit fc5dbf0
Show file tree
Hide file tree
Showing 4 changed files with 116 additions and 15 deletions.
5 changes: 3 additions & 2 deletions ci/Jenkinsfile.e2e
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ def isPRBuild = utils.isPRBuild()

pipeline {
agent {
label 'linux && x86_64 && qt-5.14.2'
label 'linux && x86_64 && qt-5.15.2'
}

parameters {
Expand Down Expand Up @@ -52,6 +52,7 @@ pipeline {
NIMFLAGS = '--colors:off'
/* Makefile assumes the compiler folder is included */
QTDIR = '/opt/qt/5.15.2/gcc_64'
PATH = "${env.QTDIR}/bin:${env.PATH}"
/* Include library in order to compile the project */
LD_LIBRARY_PATH = "$QTDIR/lib:$WORKSPACE/vendor/status-go/build/bin:$WORKSPACE/vendor/status-keycard-go/build/libkeycard/"
/* Container ports */
Expand Down Expand Up @@ -138,7 +139,7 @@ pipeline {
'--config', 'addAUT', 'nim_status_client',
"${WORKSPACE}/bin",
].join('\n'),
squishPackageName: 'squish-6.7.2-qt514x-linux64',
squishPackageName: 'squish-7.1.0-qt515x-linux64',
testSuite: "${WORKSPACE}/test/ui-test/testSuites/*",
])
print("Squish run result: ${result}")
Expand Down
4 changes: 2 additions & 2 deletions ci/Jenkinsfile.macos
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ def isPRBuild = utils.isPRBuild()

pipeline {
agent {
label 'macos && x86_64 && qt-5.14.2'
label 'macos && x86_64 && qt-5.15.2'
}

parameters {
Expand Down Expand Up @@ -44,7 +44,7 @@ pipeline {
/* Disable colors in Nim compiler logs */
NIMFLAGS = '--colors:off'
/* Qt location is pre-defined */
QTDIR = '/usr/local/qt/clang_64'
QTDIR = '/usr/local/qt/5.15.2/clang_64'
PATH = "${env.QTDIR}/bin:${env.PATH}"
/* Control output the filename */
STATUS_CLIENT_DMG = "pkg/${utils.pkgFilename(ext: 'dmg')}"
Expand Down
77 changes: 77 additions & 0 deletions scripts/macos_build_setup.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
#!/usr/bin/env bash
set -eo pipefail

GO_VERSION="1.19.5"
GO_INSTALL_DIR="/usr/local/go"
QT_VERSION="5.15.2"
QT_INSTALL_DIR="/usr/local/qt"

function check_version {
if [[ "$(uname -s)" != "Darwin" ]]; then
echo "ERROR: Installer intended for MacOS/Darwin!"
exit 1
fi
}

function install_build_dependencies {
echo "Install build dependencies"
brew install cmake pkg-config libtool jq node@18
}

function install_qt {
echo "Install QT"
brew install [email protected]
pip3 install -U pip
pip3 install aqtinstall
aqt install-qt mac desktop ${QT_VERSION} clang_64 -m qtwebengine -O ${QT_INSTALL_DIR}
}

function get_go_arch {
case "$(uname -m)" in
"x86_64") echo "amd64" ;;
"aarch64") echo "arm64" ;;
"armv*") echo "armv6l" ;;
*) echo "UNKNOWN" ;;
esac
}

function install_golang {
if [[ -x "$(command -v go)" ]]; then
echo "Already present: $(go version)"
return
fi
declare -A GO_SHA256_MAP
GO_SHA256_MAP=(
["amd64"]="23d22bb6571bbd60197bee8aaa10e702f9802786c2e2ddce5c84527e86b66aa0"
["arm64"]="4a67f2bf0601afe2177eb58f825adf83509511d77ab79174db0712dc9efa16c8"
)
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"
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}"
rm "${GO_TARBALL}"
ln -s "${GO_INSTALL_DIR}/bin/go" /usr/local/bin
}

function success_message {
msg="
SUCCESS!
Before you attempt to build status-dektop you'll need a few environment variables set:
export QTDIR=${QT_INSTALL_DIR}/${QT_VERSION}/clang_64
export PATH=\$QTDIR:\$QTDIR/bin:\$PATH
"
echo $msg
}

if [ "$0" = "$BASH_SOURCE" ]; then
check_version
install_build_dependencies
install_qt
install_golang
success_message
fi
45 changes: 34 additions & 11 deletions scripts/ubuntu_build_setup.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
#!/usr/bin/env bash
set -eo pipefail

GO_VERSION="1.19.5"
GO_INSTALL_DIR="/usr/local/go"
QT_VERSION="5.15.2"
QT_INSTALL_DIR="/opt/qt"

function check_version {
source /etc/os-release

Expand Down Expand Up @@ -40,20 +45,38 @@ function install_qt {
apt install -y python3-pip
pip install -U pip
pip install aqtinstall
aqt install-qt linux desktop 5.14.2 gcc_64 -m qtwebengine qtlottie -O /opt/qt
aqt install-qt linux desktop ${QT_VERSION} gcc_64 -m qtwebengine -O ${QT_INSTALL_DIR}
}

function get_go_arch {
case "$(uname -m)" in
"x86_64") echo "amd64" ;;
"aarch64") echo "arm64" ;;
"armv*") echo "armv6l" ;;
*) echo "UNKNOWN" ;;
esac
}

function install_golang {
if ! [[ -x "$(command -v go)" ]]; then
echo "Install GoLang"
export GOLANG_SHA256="006f6622718212363fa1ff004a6ab4d87bbbe772ec5631bab7cac10be346e4f1"
export GOLANG_TARBALL="go1.18.5.linux-arm64.tar.gz"
wget -q "https://dl.google.com/go/${GOLANG_TARBALL}"
echo "${GOLANG_SHA256} ${GOLANG_TARBALL}" | sha256sum -c
tar -C /usr/local -xzf "${GOLANG_TARBALL}"
rm "${GOLANG_TARBALL}"
ln -s /usr/local/go/bin/go /usr/local/bin
if [[ -x "$(command -v go)" ]]; then
echo "Already present: $(go version)"
return
fi
declare -A GO_SHA256_MAP
GO_SHA256_MAP=(
["amd64"]="36519702ae2fd573c9869461990ae550c8c0d955cd28d2827a6b159fda81ff95"
["arm64"]="fc0aa29c933cec8d76f5435d859aaf42249aa08c74eb2d154689ae44c08d23b3"
["armv6l"]="ec14f04bdaf4a62bdcf8b55b9b6434cc27c2df7d214d0bb7076a7597283b026a"
)
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"
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}"
rm "${GO_TARBALL}"
ln -s "${GO_INSTALL_DIR}/go/bin/go" /usr/local/bin
}

function success_message {
Expand All @@ -62,7 +85,7 @@ SUCCESS!
Before you attempt to build status-dektop you'll need a few environment variables set:
export QTDIR=/opt/qt/5.14.2/gcc_64
export QTDIR=${QT_INSTALL_DIR}/${QT_VERSION}/gcc_64
export PATH=\$QTDIR:\$QTDIR/bin:\$PATH
"
echo $msg
Expand Down

0 comments on commit fc5dbf0

Please sign in to comment.