diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 8ea82a10..53e441fe 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -160,19 +160,35 @@ jobs: submodules: recursive # depends is the slow part (static Qt6/boost/openssl/tor from source). Cache the source tarballs # and the compiled-package cache so only the first run pays the ~1h cost; warm runs are minutes. - - name: cache depends sources - uses: actions/cache@v4 + - name: restore depends sources cache + id: cache-sources + uses: actions/cache/restore@v4 with: path: contrib/depends/sources key: depends-sources-${{ hashFiles('contrib/depends/packages/*') }} - - name: cache depends built (mingw) - uses: actions/cache@v4 + - name: restore depends built cache (mingw) + id: cache-built + uses: actions/cache/restore@v4 with: path: contrib/depends/built key: depends-built-mingw32-${{ hashFiles('contrib/depends/packages/*', 'contrib/depends/hosts/*', 'contrib/depends/toolchain.cmake.in') }} - name: build depends (static Qt6 + tor + boost + openssl for mingw) # -j2 not -j(nproc): the parallel static Qt6 compile OOMs the 16G runner at -j4. Slower but safe. run: make -C contrib/depends HOST="$HOST" -j2 + # Save depends with if:always() so the expensive toolchain banks even when the LATER wowlet.exe + # build fails — actions/cache's auto post-save is skipped on job failure, which kept re-paying ~2.5h. + - name: save depends sources cache + if: always() && steps.cache-sources.outputs.cache-hit != 'true' + uses: actions/cache/save@v4 + with: + path: contrib/depends/sources + key: depends-sources-${{ hashFiles('contrib/depends/packages/*') }} + - name: save depends built cache (mingw) + if: always() && steps.cache-built.outputs.cache-hit != 'true' + uses: actions/cache/save@v4 + with: + path: contrib/depends/built + key: depends-built-mingw32-${{ hashFiles('contrib/depends/packages/*', 'contrib/depends/hosts/*', 'contrib/depends/toolchain.cmake.in') }} - name: fetch wownerod.exe to embed run: | mkdir -p /tmp/wownerod-embed diff --git a/contrib/depends/packages/packages.mk b/contrib/depends/packages/packages.mk index 95cd7fd7..2dbcbd4f 100644 --- a/contrib/depends/packages/packages.mk +++ b/contrib/depends/packages/packages.mk @@ -1,4 +1,4 @@ -packages := boost openssl unbound qrencode libsodium polyseed hidapi abseil protobuf libusb zlib libgpg-error libgcrypt expat libzip zxing-cpp +packages := boost openssl unbound qrencode libsodium polyseed hidapi abseil protobuf libusb zlib libgpg-error libgcrypt expat libzip zxing-cpp zeromq native_packages := native_qt native_abseil native_protobuf linux_packages := libfuse libsquashfuse zstd appimage_runtime wayland libffi diff --git a/contrib/depends/packages/zeromq.mk b/contrib/depends/packages/zeromq.mk new file mode 100644 index 00000000..20f2d4bd --- /dev/null +++ b/contrib/depends/packages/zeromq.mk @@ -0,0 +1,35 @@ +package=zeromq +$(package)_version=4.3.4 +$(package)_download_path=https://github.com/zeromq/libzmq/releases/download/v$($(package)_version)/ +$(package)_file_name=$(package)-$($(package)_version).tar.gz +$(package)_sha256_hash=c593001a89f5a85dd2ddf564805deb860e02471171b3f204944857336295c3e5 +$(package)_patches=06aba27b04c5822cb88a69677382a0f053367143.patch + +define $(package)_set_vars + $(package)_config_opts=--without-documentation --disable-shared --without-libsodium --disable-curve + $(package)_config_opts_linux=--with-pic + $(package)_config_opts_freebsd=--with-pic + $(package)_cxxflags=-std=c++11 +endef + +define $(package)_preprocess_cmds + patch -p1 < $($(package)_patch_dir)/06aba27b04c5822cb88a69677382a0f053367143.patch +endef + +define $(package)_config_cmds + $($(package)_autoconf) AR_FLAGS=$($(package)_arflags) +endef + +define $(package)_build_cmds + $(MAKE) src/libzmq.la +endef + +define $(package)_stage_cmds + $(MAKE) DESTDIR=$($(package)_staging_dir) install-libLTLIBRARIES install-includeHEADERS install-pkgconfigDATA +endef + +define $(package)_postprocess_cmds + rm -rf bin share &&\ + rm lib/*.la +endef + diff --git a/contrib/depends/patches/zeromq/06aba27b04c5822cb88a69677382a0f053367143.patch b/contrib/depends/patches/zeromq/06aba27b04c5822cb88a69677382a0f053367143.patch new file mode 100644 index 00000000..53e18a45 --- /dev/null +++ b/contrib/depends/patches/zeromq/06aba27b04c5822cb88a69677382a0f053367143.patch @@ -0,0 +1,22 @@ +From 06aba27b04c5822cb88a69677382a0f053367143 Mon Sep 17 00:00:00 2001 +From: sabotagebeats <27985126+sabotagebeats@users.noreply.github.com> +Date: Thu, 22 Jul 2021 21:53:19 -0700 +Subject: [PATCH] fix: building libzmq fails with error src/clock.cpp:131:16: + error: unused variable 'nsecs_per_usec' + +--- + src/clock.cpp | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/src/clock.cpp b/src/clock.cpp +index 93da90a8e..63c0100a5 100644 +--- a/src/clock.cpp ++++ b/src/clock.cpp +@@ -195,6 +195,7 @@ uint64_t zmq::clock_t::now_us () + + #else + ++ LIBZMQ_UNUSED (nsecs_per_usec); + // Use POSIX gettimeofday function to get precise time. + struct timeval tv; + int rc = gettimeofday (&tv, NULL);