From d871f744a3264ab563bb2c580cc9da42b60c17d9 Mon Sep 17 00:00:00 2001 From: div72 Date: Mon, 22 May 2023 15:06:41 +0300 Subject: [PATCH 1/6] ci: upload build artifacts Rationale: This will make testing PRs easier for other people as the builds will always be present but the main reason for this change is to merge the CI and CD. --- .github/workflows/ci.yml | 6 ++++++ ci/test/06_script_b.sh | 27 +++++++++++++++++++++++++++ 2 files changed, 33 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 2ed80872fe..5308d891d4 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -45,6 +45,12 @@ jobs: - name: test run: | ./ci/test_run_all.sh + - name: upload artifacts + uses: actions/upload-artifact@v3 + with: + name: ${{ env.ARTIFACT_FILENAME }} + path: ${{ env.ARTIFACT_FILE }} + retention-days: 30 test-macos: name: macOS 11 native [GOAL install] [GUI] [no depends] runs-on: macos-11 diff --git a/ci/test/06_script_b.sh b/ci/test/06_script_b.sh index 02979b8fe1..52adb0d09d 100755 --- a/ci/test/06_script_b.sh +++ b/ci/test/06_script_b.sh @@ -59,3 +59,30 @@ if [ "$RUN_FUZZ_TESTS" = "true" ]; then DOCKER_EXEC LD_LIBRARY_PATH=$DEPENDS_DIR/$HOST/lib test/fuzz/test_runner.py ${FUZZ_TESTS_CONFIG} $MAKEJOBS -l DEBUG ${DIR_FUZZ_IN} END_FOLD fi + +if [ -n "$GITHUB_ENV" ]; then + FILES= + + ARTIFACT_FILENAME="gridcoin-$(DOCKER_EXEC make print-VERSION | cut -d = -f 2-)-$(git rev-parse --short HEAD)-$CONTAINER_NAME.tar.gz" + DAEMON_BIN="$(DOCKER_EXEC make print-BITCOIND_BIN | cut -d = -f 2-)" + QT_BIN="$(DOCKER_EXEC make print-BITCOIN_QT_BIN | cut -d = -f 2-)" + WIN_INSTALLER="$(DOCKER_EXEC make print-BITCOIN_WIN_INSTALLER | cut -d = -f 2-)" + OSX_DMG="$(DOCKER_EXEC make print-OSX_DMG | cut -d = -f 2-)" + + if DOCKER_EXEC test -f "$DAEMON_BIN"; then + FILES="$FILES $DAEMON_BIN" + fi + if DOCKER_EXEC test -f "$QT_BIN"; then + FILES="$FILES $QT_BIN" + fi + if DOCKER_EXEC test -f "$WIN_INSTALLER"; then + FILES="$FILES $WIN_INSTALLER" + fi + if DOCKER_EXEC test -f "$OSX_DMG"; then + FILES="$FILES $OSX_DMG" + fi + + DOCKER_EXEC tar --create --file="$DEPENDS_DIR/$ARTIFACT_FILENAME" --gzip --strip-components=2 $FILES + echo "ARTIFACT_FILENAME=$ARTIFACT_FILENAME" >> $GITHUB_ENV + echo "ARTIFACT_FILE=$DEPENDS_DIR/$ARTIFACT_FILENAME" >> $GITHUB_ENV +fi From 15f6496dbd98fa8910603aa95c77964ee2305ee8 Mon Sep 17 00:00:00 2001 From: div72 Date: Fri, 26 May 2023 01:31:51 +0300 Subject: [PATCH 2/6] cd: remove cd Rationale: Since the CI uploads artifacts now, there's no need for a separate CD. --- .github/workflows/cd.yml | 39 ----------------- cd/00_setup_env.sh | 55 ------------------------ cd/00_setup_env_mac.sh | 15 ------- cd/00_setup_env_win32.sh | 15 ------- cd/00_setup_env_win64.sh | 13 ------ cd/03_before_install.sh | 22 ---------- cd/04_install.sh | 91 ---------------------------------------- cd/05_before_script.sh | 35 ---------------- cd/06_script_a.sh | 34 --------------- cd/06_script_b.sh | 22 ---------- cd/run_all.sh | 14 ------- 11 files changed, 355 deletions(-) delete mode 100644 .github/workflows/cd.yml delete mode 100755 cd/00_setup_env.sh delete mode 100755 cd/00_setup_env_mac.sh delete mode 100755 cd/00_setup_env_win32.sh delete mode 100755 cd/00_setup_env_win64.sh delete mode 100755 cd/03_before_install.sh delete mode 100755 cd/04_install.sh delete mode 100755 cd/05_before_script.sh delete mode 100755 cd/06_script_a.sh delete mode 100755 cd/06_script_b.sh delete mode 100755 cd/run_all.sh diff --git a/.github/workflows/cd.yml b/.github/workflows/cd.yml deleted file mode 100644 index 21db6e3bed..0000000000 --- a/.github/workflows/cd.yml +++ /dev/null @@ -1,39 +0,0 @@ -name: CD - -on: - push: - tags: - - '*' - -jobs: - release: - runs-on: ubuntu-latest - strategy: - fail-fast: false - matrix: - script-id: [win32, win64, mac] - env: - FILE_ENV: ./cd/00_setup_env_${{ matrix.script-id }}.sh - OS_NAME: linux - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - steps: - - name: checkout - uses: actions/checkout@v3 - - name: current time for cache - run: echo "TIMESTAMP=$(date +%s)" >> $GITHUB_ENV - - name: cache - uses: actions/cache@v3 - with: - path: | - ./depends/built - ./ci/scratch/.ccache - key: ${{ runner.os }}-${{ matrix.script-id }}-${{ env.TIMESTAMP }} - restore-keys: | - ${{ runner.os }}-${{ matrix.script-id }}- - - name: build - run: | - ./cd/run_all.sh - - name: release - uses: softprops/action-gh-release@5e3f23f92c903aac25270f66388fdcb366c5b549 - with: - files: '/tmp/release/*' diff --git a/cd/00_setup_env.sh b/cd/00_setup_env.sh deleted file mode 100755 index 668a70a0b5..0000000000 --- a/cd/00_setup_env.sh +++ /dev/null @@ -1,55 +0,0 @@ -#!/usr/bin/env bash -# -# Copyright (c) 2019-2020 The Bitcoin Core developers -# Distributed under the MIT software license, see the accompanying -# file COPYING or https://opensource.org/licenses/mit-license.php. - -export LC_ALL=C.UTF-8 - -# The root dir. -# The ci system copies this folder. -# This is where the depends build is done. -BASE_ROOT_DIR=$( cd "$( dirname "${BASH_SOURCE[0]}" )"/../ >/dev/null 2>&1 && pwd ) -export BASE_ROOT_DIR - -echo "Setting specific values in env" -if [ -n "${FILE_ENV}" ]; then - set -o errexit; - # shellcheck disable=SC1090 - source "${FILE_ENV}" -fi - -echo "Fallback to default values in env (if not yet set)" -# The number of parallel jobs to pass down to make and test_runner.py -export MAKEJOBS=${MAKEJOBS:--j4} -# A folder for the ci system to put temporary files (ccache, datadirs for tests, ...) -# This folder only exists on the ci host. -export BASE_SCRATCH_DIR=${BASE_SCRATCH_DIR:-$BASE_ROOT_DIR/ci/scratch} -# What host to compile for. See also ./depends/README.md -# Tests that need cross-compilation export the appropriate HOST. -# Tests that run natively guess the host -export HOST=${HOST:-$("$BASE_ROOT_DIR/depends/config.guess")} -# Whether to prefer BusyBox over GNU utilities -export USE_BUSY_BOX=${USE_BUSY_BOX:-false} -export CONTAINER_NAME=${CONTAINER_NAME:-ci_unnamed} -export DOCKER_NAME_TAG=${DOCKER_NAME_TAG:-ubuntu:18.04} -# See man 7 debconf -export DEBIAN_FRONTEND=noninteractive -export CCACHE_SIZE=${CCACHE_SIZE:-300M} -export CCACHE_TEMPDIR=${CCACHE_TEMPDIR:-/tmp/.ccache-temp} -export CCACHE_COMPRESS=${CCACHE_COMPRESS:-1} -export CCACHE_COMPILERCHECK=${CCACHE_COMPILERCHECK:-"%compiler% -v"} -# The cache dir. -# This folder exists on the ci host and ci guest. Changes are propagated back and forth. -export CCACHE_DIR=${CCACHE_DIR:-$BASE_SCRATCH_DIR/.ccache} -# The depends dir. -# This folder exists on the ci host and ci guest. Changes are propagated back and forth. -export DEPENDS_DIR=${DEPENDS_DIR:-$BASE_ROOT_DIR/depends} -# Folder where the build result is put (bin and lib). -export BASE_OUTDIR=${BASE_OUTDIR:-$BASE_SCRATCH_DIR/out/$HOST} -# Folder where the build is done (dist and out-of-tree build). -export BASE_BUILD_DIR=${BASE_BUILD_DIR:-$BASE_SCRATCH_DIR/build} -export SDK_URL=${SDK_URL:-https://bitcoincore.org/depends-sources/sdks} -export DOCKER_PACKAGES=${DOCKER_PACKAGES:-build-essential libtool autotools-dev automake pkg-config bsdmainutils curl ca-certificates ccache python3 rsync git procps bison} -export PATH=${BASE_ROOT_DIR}/ci/retry:$PATH -export CI_RETRY_EXE=${CI_RETRY_EXE:-"retry --"} diff --git a/cd/00_setup_env_mac.sh b/cd/00_setup_env_mac.sh deleted file mode 100755 index 68b002b0e4..0000000000 --- a/cd/00_setup_env_mac.sh +++ /dev/null @@ -1,15 +0,0 @@ -#!/usr/bin/env bash -# -# Copyright (c) 2019-2020 The Bitcoin Core developers -# Distributed under the MIT software license, see the accompanying -# file COPYING or https://opensource.org/licenses/mit-license.php. - -export LC_ALL=C.UTF-8 - -export CONTAINER_NAME=ci_macos_cross -export DOCKER_NAME_TAG=ubuntu:20.04 -export HOST=x86_64-apple-darwin -export PACKAGES="cmake imagemagick libcap-dev librsvg2-bin libz-dev libbz2-dev libtiff-tools libtinfo5 python3-dev python3-setuptools xorriso" -export XCODE_VERSION=12.1 -export XCODE_BUILD_ID=12A7403 -export GRIDCOIN_CONFIG="--with-gui --enable-reduce-exports" diff --git a/cd/00_setup_env_win32.sh b/cd/00_setup_env_win32.sh deleted file mode 100755 index e95b099721..0000000000 --- a/cd/00_setup_env_win32.sh +++ /dev/null @@ -1,15 +0,0 @@ -#!/usr/bin/env bash -# -# Copyright (c) 2019-2020 The Bitcoin Core developers -# Distributed under the MIT software license, see the accompanying -# file COPYING or https://opensource.org/licenses/mit-license.php. - -export LC_ALL=C.UTF-8 - -export CONTAINER_NAME=ci_win32 -export DOCKER_NAME_TAG=ubuntu:20.04 -export HOST=i686-w64-mingw32 -export PACKAGES="python3 nsis g++-mingw-w64-i686 wine-binfmt wine32" -export GOAL="deploy" -export GRIDCOIN_CONFIG="--enable-reduce-exports --with-gui=qt5" -export DPKG_ADD_ARCH="i386" diff --git a/cd/00_setup_env_win64.sh b/cd/00_setup_env_win64.sh deleted file mode 100755 index aad3645d37..0000000000 --- a/cd/00_setup_env_win64.sh +++ /dev/null @@ -1,13 +0,0 @@ -#!/usr/bin/env bash -# -# Copyright (c) 2019-2020 The Bitcoin Core developers -# Distributed under the MIT software license, see the accompanying -# file COPYING or https://opensource.org/licenses/mit-license.php. - -export LC_ALL=C.UTF-8 - -export CONTAINER_NAME=ci_win64 -export DOCKER_NAME_TAG=ubuntu:20.04 -export HOST=x86_64-w64-mingw32 -export PACKAGES="python3 nsis g++-mingw-w64-x86-64 wine-binfmt wine64" -export GRIDCOIN_CONFIG="--enable-reduce-exports --with-gui=qt5" diff --git a/cd/03_before_install.sh b/cd/03_before_install.sh deleted file mode 100755 index b0dcbbd5e1..0000000000 --- a/cd/03_before_install.sh +++ /dev/null @@ -1,22 +0,0 @@ -#!/usr/bin/env bash -# -# Copyright (c) 2018-2019 The Bitcoin Core developers -# Distributed under the MIT software license, see the accompanying -# file COPYING or https://opensource.org/licenses/mit-license.php. - -export LC_ALL=C.UTF-8 - -BEGIN_FOLD () { - echo "" - CURRENT_FOLD_NAME=$1 - echo "::group::${CURRENT_FOLD_NAME}" -} - -END_FOLD () { - RET=$? - echo "::endgroup::" - if [ $RET != 0 ]; then - echo "${CURRENT_FOLD_NAME} failed with status code ${RET}" - fi -} - diff --git a/cd/04_install.sh b/cd/04_install.sh deleted file mode 100755 index 154d6a56ac..0000000000 --- a/cd/04_install.sh +++ /dev/null @@ -1,91 +0,0 @@ -#!/usr/bin/env bash -# -# Copyright (c) 2018-2020 The Bitcoin Core developers -# Distributed under the MIT software license, see the accompanying -# file COPYING or https://opensource.org/licenses/mit-license.php. - -export LC_ALL=C.UTF-8 - -if [[ $DOCKER_NAME_TAG == centos* ]]; then - export LC_ALL=en_US.utf8 -fi -if [[ $QEMU_USER_CMD == qemu-s390* ]]; then - export LC_ALL=C -fi - -# Create folders that are mounted into the docker -mkdir -p "${CCACHE_DIR}" -mkdir -p "/tmp/release" - -env | grep -E '^(GRIDCOIN_CONFIG|BASE_|QEMU_|CCACHE_|LC_ALL|BOOST_TEST_RANDOM|DEBIAN_FRONTEND|CONFIG_SHELL|(ASAN|LSAN|TSAN|UBSAN)_OPTIONS|PREVIOUS_RELEASES_DIR)' | tee /tmp/env - -export P_CI_DIR="$PWD" - -mkdir -p /tmp/release - -if [ -z "$DANGER_RUN_CI_ON_HOST" ]; then - echo "Creating $DOCKER_NAME_TAG container to run in" - ${CI_RETRY_EXE} docker pull "$DOCKER_NAME_TAG" - - DOCKER_ID=$(docker run $DOCKER_ADMIN -idt \ - --mount type=bind,src=$BASE_ROOT_DIR,dst=/ro_base,readonly \ - --mount type=bind,src=$CCACHE_DIR,dst=$CCACHE_DIR \ - --mount type=bind,src=$DEPENDS_DIR,dst=$DEPENDS_DIR \ - --mount type=bind,src=/tmp/release,dst=/release \ - -w $BASE_ROOT_DIR \ - --env-file /tmp/env \ - --name $CONTAINER_NAME \ - $DOCKER_NAME_TAG) - export DOCKER_CI_CMD_PREFIX="docker exec $DOCKER_ID" -else - echo "Running on host system without docker wrapper" -fi - -DOCKER_EXEC () { - $DOCKER_CI_CMD_PREFIX bash -c "export PATH=$BASE_SCRATCH_DIR/bins/:\$PATH && cd $P_CI_DIR && $*" -} -export -f DOCKER_EXEC - -if [ -n "$DPKG_ADD_ARCH" ]; then - DOCKER_EXEC dpkg --add-architecture "$DPKG_ADD_ARCH" -fi - -if [[ $DOCKER_NAME_TAG == centos* ]]; then - BEGIN_FOLD yum - ${CI_RETRY_EXE} DOCKER_EXEC yum -y install epel-release - ${CI_RETRY_EXE} DOCKER_EXEC yum -y install $DOCKER_PACKAGES $PACKAGES - END_FOLD -elif [ "$CI_USE_APT_INSTALL" != "no" ]; then - BEGIN_FOLD apt - ${CI_RETRY_EXE} DOCKER_EXEC apt-get update - ${CI_RETRY_EXE} DOCKER_EXEC apt-get install --no-install-recommends --no-upgrade -y $PACKAGES $DOCKER_PACKAGES - END_FOLD -fi - -if [ "$OS_NAME" == "macos" ]; then - top -l 1 -s 0 | awk ' /PhysMem/ {print}' - echo "Number of CPUs: $(sysctl -n hw.logicalcpu)" -else - DOCKER_EXEC free -m -h - DOCKER_EXEC echo "Number of CPUs \(nproc\):" \$\(nproc\) - DOCKER_EXEC echo $(lscpu | grep Endian) - DOCKER_EXEC echo "Free disk space:" - DOCKER_EXEC df -h -fi - -if [ -z "$DANGER_RUN_CI_ON_HOST" ]; then - echo "Create $BASE_ROOT_DIR" - DOCKER_EXEC rsync -a /ro_base/ $BASE_ROOT_DIR -fi - -if [ "$USE_BUSY_BOX" = "true" ]; then - echo "Setup to use BusyBox utils" - DOCKER_EXEC mkdir -p $BASE_SCRATCH_DIR/bins/ - # tar excluded for now because it requires passing in the exact archive type in ./depends (fixed in later BusyBox version) - # find excluded for now because it does not recognize the -delete option in ./depends (fixed in later BusyBox version) - # ar excluded for now because it does not recognize the -q option in ./depends (unknown if fixed) - # shellcheck disable=SC1010 - DOCKER_EXEC for util in \$\(busybox --list \| grep -v "^ar$" \| grep -v "^tar$" \| grep -v "^find$"\)\; do ln -s \$\(command -v busybox\) $BASE_SCRATCH_DIR/bins/\$util\; done - # Print BusyBox version - DOCKER_EXEC patch --help -fi diff --git a/cd/05_before_script.sh b/cd/05_before_script.sh deleted file mode 100755 index 458fa8ce05..0000000000 --- a/cd/05_before_script.sh +++ /dev/null @@ -1,35 +0,0 @@ -#!/usr/bin/env bash -# -# Copyright (c) 2018-2020 The Bitcoin Core developers -# Distributed under the MIT software license, see the accompanying -# file COPYING or https://www.opensource.org/licenses/mit-license.php. - -export LC_ALL=C.UTF-8 - -DOCKER_EXEC mkdir -p ${DEPENDS_DIR}/SDKs ${DEPENDS_DIR}/sdk-sources - -OSX_SDK_BASENAME="Xcode-${XCODE_VERSION}-${XCODE_BUILD_ID}-extracted-SDK-with-libcxx-headers.tar.gz" -OSX_SDK_PATH="${DEPENDS_DIR}/sdk-sources/${OSX_SDK_BASENAME}" - -if [ -n "$XCODE_VERSION" ] && [ ! -f "$OSX_SDK_PATH" ]; then - sudo curl --location --fail "${SDK_URL}/${OSX_SDK_BASENAME}" -o "$OSX_SDK_PATH" -fi - -if [ -n "$XCODE_VERSION" ] && [ -f "$OSX_SDK_PATH" ]; then - DOCKER_EXEC tar -C "${DEPENDS_DIR}/SDKs" -xf "$OSX_SDK_PATH" -fi - -if [ -z "$NO_DEPENDS" ]; then - if [[ $DOCKER_NAME_TAG == centos* ]]; then - # CentOS has problems building the depends if the config shell is not explicitly set - # (i.e. for libevent a Makefile with an empty SHELL variable is generated, leading to - # an error as the first command is executed) - SHELL_OPTS="CONFIG_SHELL=/bin/bash" - else - SHELL_OPTS="CONFIG_SHELL=" - fi - DOCKER_EXEC $SHELL_OPTS make $MAKEJOBS -C depends HOST=$HOST $DEP_OPTS -fi -if [[ $HOST = x86_64-apple-darwin* ]]; then - DOCKER_EXEC "cd src/ && ../contrib/nomacro.pl" -fi diff --git a/cd/06_script_a.sh b/cd/06_script_a.sh deleted file mode 100755 index 88abf37c14..0000000000 --- a/cd/06_script_a.sh +++ /dev/null @@ -1,34 +0,0 @@ -#!/usr/bin/env bash -# -# Copyright (c) 2018-2020 The Bitcoin Core developers -# Distributed under the MIT software license, see the accompanying -# file COPYING or https://opensource.org/licenses/mit-license.php. - -export LC_ALL=C.UTF-8 - -GRIDCOIN_CONFIG_ALL="--disable-dependency-tracking --prefix=$DEPENDS_DIR/$HOST --bindir=$BASE_OUTDIR/bin --libdir=$BASE_OUTDIR/lib" -DOCKER_EXEC "ccache --zero-stats --max-size=$CCACHE_SIZE" - -DOCKER_EXEC mkdir -p "${BASE_BUILD_DIR}/gridcoin-$HOST" -export P_CI_DIR="${BASE_BUILD_DIR}/gridcoin-$HOST" - -BEGIN_FOLD autogen -if [ -n "$CONFIG_SHELL" ]; then - DOCKER_EXEC "$CONFIG_SHELL" -c "{BASE_ROOT_DIR}/autogen.sh" -else - DOCKER_EXEC ${BASE_ROOT_DIR}/autogen.sh -fi -END_FOLD - -BEGIN_FOLD configure -DOCKER_EXEC ${BASE_ROOT_DIR}/configure $GRIDCOIN_CONFIG_ALL $GRIDCOIN_CONFIG || ( (DOCKER_EXEC cat config.log) && false) -END_FOLD - -BEGIN_FOLD build -DOCKER_EXEC make $MAKEJOBS deploy || ( echo "Build failure. Verbose build follows." && DOCKER_EXEC make deploy V=1 ; false ) -END_FOLD - -BEGIN_FOLD cache_stats -DOCKER_EXEC "ccache --version | head -n 1 && ccache --show-stats" -DOCKER_EXEC du -sh "${DEPENDS_DIR}"/*/ -END_FOLD diff --git a/cd/06_script_b.sh b/cd/06_script_b.sh deleted file mode 100755 index 75e39be007..0000000000 --- a/cd/06_script_b.sh +++ /dev/null @@ -1,22 +0,0 @@ -#!/usr/bin/env bash -# -# Copyright (c) 2021 The Gridcoin developers -# Distributed under the MIT software license, see the accompanying -# file COPYING or https://opensource.org/licenses/mit-license.php. - -export LC_ALL=C.UTF-8 - -DOCKER_EXEC mv release/* /release - -if [[ $HOST = *-apple-* ]]; then - KV=$(cat $BASE_ROOT_DIR/depends/hosts/darwin.mk | grep "OSX_MIN_VERSION=") - VER=${KV#OSX_MIN_VERSION=} - for f in /tmp/release/*.dmg; do - mv $f ${f%.dmg}-min-$VER.dmg - done -fi - -cd /tmp/release/ || { echo "Failure"; exit 1; } -for f in *; do - sha256sum $f > $f.SHA256 -done diff --git a/cd/run_all.sh b/cd/run_all.sh deleted file mode 100755 index c806ea5f47..0000000000 --- a/cd/run_all.sh +++ /dev/null @@ -1,14 +0,0 @@ -#!/usr/bin/env bash -# -# Copyright (c) 2019 The Bitcoin Core developers -# Distributed under the MIT software license, see the accompanying -# file COPYING or https://opensource.org/licenses/mit-license.php. - -export LC_ALL=C.UTF-8 - -set -o errexit; source ./cd/00_setup_env.sh -set -o errexit; source ./cd/03_before_install.sh -set -o errexit; source ./cd/04_install.sh -set -o errexit; source ./cd/05_before_script.sh -set -o errexit; source ./cd/06_script_a.sh -set -o errexit; source ./cd/06_script_b.sh From 0e34f098d27a93bd14705ca4edf6e94f5a7f8550 Mon Sep 17 00:00:00 2001 From: div72 Date: Fri, 26 May 2023 01:34:11 +0300 Subject: [PATCH 3/6] ci: change win ci goals to deploy Rationale: So that installer packages are also included in the artifacts. --- ci/test/00_setup_env_win32.sh | 3 +-- ci/test/00_setup_env_win64.sh | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/ci/test/00_setup_env_win32.sh b/ci/test/00_setup_env_win32.sh index 449340fc58..3008286e76 100755 --- a/ci/test/00_setup_env_win32.sh +++ b/ci/test/00_setup_env_win32.sh @@ -13,7 +13,6 @@ export PACKAGES="python3 nsis g++-mingw-w64-i686 wine-binfmt winehq-stable" export RUN_UNIT_TESTS=true export RUN_FUNCTIONAL_TESTS=false # export RUN_SECURITY_TESTS="true" -export GOAL="" +export GOAL="deploy" export GRIDCOIN_CONFIG="--enable-reduce-exports" -export DEP_OPTS="NO_QT=1" export DPKG_ADD_ARCH="i386" diff --git a/ci/test/00_setup_env_win64.sh b/ci/test/00_setup_env_win64.sh index ababe46e35..a6869be704 100755 --- a/ci/test/00_setup_env_win64.sh +++ b/ci/test/00_setup_env_win64.sh @@ -11,6 +11,6 @@ export DOCKER_NAME_TAG=ubuntu:20.04 # Check that focal can cross-compile to win export HOST=x86_64-w64-mingw32 export PACKAGES="python3 nsis g++-mingw-w64-x86-64 wine-binfmt wine-stable winehq-stable" export DPKG_ADD_ARCH="i386" -export GOAL="" +export GOAL="deploy" export GRIDCOIN_CONFIG="--enable-reduce-exports --with-gui=qt5" export NEED_XVFB="true" From ed0601c33ed93fa28bbee0f9781deda72f71aac0 Mon Sep 17 00:00:00 2001 From: div72 Date: Fri, 26 May 2023 02:43:16 +0300 Subject: [PATCH 4/6] build: copy changelog to build dir Rationale: The @abs_top_srcdir@ for CHANGELOG.md in share/setup.nsi.in points to the build dir when building in a distdir. --- configure.ac | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac index bc9bc4656c..f4b43e9b85 100755 --- a/configure.ac +++ b/configure.ac @@ -1329,7 +1329,7 @@ AC_SUBST(HAVE_BUILTIN_PREFETCH) AC_SUBST(HAVE_MM_PREFETCH) AC_SUBST(HAVE_STRONG_GETAUXVAL) AC_SUBST(HAVE_WEAK_GETAUXVAL) -AC_CONFIG_FILES([Makefile src/Makefile share/setup.nsi share/qt/Info.plist]) +AC_CONFIG_FILES([Makefile src/Makefile share/setup.nsi share/qt/Info.plist CHANGELOG.md:CHANGELOG.md]) AC_CONFIG_FILES([contrib/devtools/split-debug.sh],[chmod +x contrib/devtools/split-debug.sh]) AM_COND_IF([HAVE_DOXYGEN], [AC_CONFIG_FILES([doc/Doxyfile])]) From 96b929568d651b96ab84180af3aabc80801a7388 Mon Sep 17 00:00:00 2001 From: div72 Date: Fri, 26 May 2023 17:24:15 +0300 Subject: [PATCH 5/6] build: do not move the windows installer Rationale: Moving the installer is not optimal as Make expects the file to be in the specified path of the rule in order to decide on whether to re-create the file or not. This also breaks the CI's artifact code as it expects the file to be present in the same way. --- Makefile.am | 1 - 1 file changed, 1 deletion(-) diff --git a/Makefile.am b/Makefile.am index c438625fb8..890a38fc9a 100644 --- a/Makefile.am +++ b/Makefile.am @@ -79,7 +79,6 @@ $(BITCOIN_WIN_INSTALLER): all-recursive echo error: could not build $@ @echo built $@ @rm release/gridcoinresearch.exe release/gridcoinresearchd.exe - @mv $@ $(top_builddir)/release/$@ $(OSX_APP)/Contents/PkgInfo: $(MKDIR_P) $(@D) From eebe996fbd4225a3ee91bb7a4bf359b909d9c4a2 Mon Sep 17 00:00:00 2001 From: div72 Date: Thu, 1 Jun 2023 22:13:14 +0300 Subject: [PATCH 6/6] build: do not move the MacOS DMG Rationale: Same as the previous commit. --- Makefile.am | 2 -- 1 file changed, 2 deletions(-) diff --git a/Makefile.am b/Makefile.am index 890a38fc9a..0a90fd02c5 100644 --- a/Makefile.am +++ b/Makefile.am @@ -137,9 +137,7 @@ $(OSX_TEMP_ISO): $(APP_DIST_EXTRAS) $(XORRISOFS) -D -l -V "$(OSX_VOLNAME)" -no-pad -r -dir-mode 0755 -o $@ dist -- $(if $(SOURCE_DATE_EPOCH),-volume_date all_file_dates =$(SOURCE_DATE_EPOCH)) $(OSX_DMG): $(OSX_TEMP_ISO) - $(MKDIR_P) $(top_builddir)/release $(DMG) dmg "$<" "$@" - @mv $@ $(top_builddir)/release/$(PACKAGE)-$(PACKAGE_VERSION)-macos.dmg dpi%.$(OSX_BACKGROUND_IMAGE): contrib/macdeploy/$(OSX_BACKGROUND_SVG) sed 's/PACKAGE_NAME/$(PACKAGE_NAME)/' < "$<" | $(RSVG_CONVERT) -f png -d $* -p $* | $(IMAGEMAGICK_CONVERT) - $@