diff options
| author | Czarek Nakamoto <cyjan@mrcyjanek.net> | 2024-02-17 19:50:56 +0100 |
|---|---|---|
| committer | Czarek Nakamoto <cyjan@mrcyjanek.net> | 2024-02-17 22:31:26 +0100 |
| commit | 1a0d77e21260097a81b62b49578b5325f90b8455 (patch) | |
| tree | 9906f2b12d5ebfef99ecd0dc28ffbedf8983fc06 | |
| parent | a61bd154098bc38ca8cdc4e5c1f8a482c4a5fadb (diff) | |
woodpecker linux
| -rw-r--r-- | .woodpecker/linux.yaml | 122 | ||||
| -rw-r--r-- | Makefile | 9 |
2 files changed, 62 insertions, 69 deletions
diff --git a/.woodpecker/linux.yaml b/.woodpecker/linux.yaml index e06874f..b26f1d8 100644 --- a/.woodpecker/linux.yaml +++ b/.woodpecker/linux.yaml @@ -1,13 +1,4 @@ matrix: - include: - - HOST_TRIPLET: x86_64-linux-gnu - BUILD_TRIPLET: x86_64-linux-gnu - short_arch: x86_64 - full_arch: x86_64 - monero_arch: x86-64 - monero_buildtag: linux-x86_64 - monero_build64: 'ON' - monero_cmake_arm_mode: 'OFF' platform: - linux/amd64 @@ -15,67 +6,64 @@ steps: - name: clone repositories image: git.mrcyjanek.net/mrcyjanek/debian:bookworm commands: - - . ./.env - # Monero - - (git clone $${MONERO_GIT_SOURCE} --depth=1 --branch $${MONERO_TAG} monero && cd monero && git submodule init && git submodule update) - # Boost - - curl -L -o boost_$${BOOST_VERSION}.tar.bz2 https://archives.boost.io/release/$${BOOST_VERSION_DOT}/source/boost_$${BOOST_VERSION}.tar.bz2 - - echo "$${BOOST_HASH} boost_$${BOOST_VERSION}.tar.bz2" | sha256sum -c - - tar -xf boost_$${BOOST_VERSION}.tar.bz2 - - rm -f boost_$${BOOST_VERSION}.tar.bz2 - # libiconv - - curl -O http://ftp.gnu.org/pub/gnu/libiconv/libiconv-$${ICONV_VERSION}.tar.gz - - echo "$${ICONV_HASH} libiconv-$${ICONV_VERSION}.tar.gz" | sha256sum -c - - tar -xzf libiconv-$${ICONV_VERSION}.tar.gz - - rm -f libiconv-$${ICONV_VERSION}.tar.gz - # zlib - - curl -O https://zlib.net/zlib-$${ZLIB_VERSION}.tar.gz - - echo "$${ZLIB_HASH} zlib-$${ZLIB_VERSION}.tar.gz" | sha256sum -c - - tar -xzf zlib-$${ZLIB_VERSION}.tar.gz - - rm zlib-$${ZLIB_VERSION}.tar.gz - - mv zlib-$${ZLIB_VERSION} zlib - # openssl - - curl -O https://www.openssl.org/source/openssl-$${OPENSSL_VERSION}.tar.gz - - echo "$${OPENSSL_HASH} openssl-$${OPENSSL_VERSION}.tar.gz" | sha256sum -c - - tar -xzf openssl-$${OPENSSL_VERSION}.tar.gz - - rm openssl-$${OPENSSL_VERSION}.tar.gz - # libzmq - - git clone https://github.com/zeromq/libzmq.git -b $${ZMQ_VERSION} --depth=1 - - (cd libzmq && test `git rev-parse HEAD` = $${ZMQ_HASH}) || exit 1 - # libsodium - - git clone https://github.com/jedisct1/libsodium.git -b $${SODIUM_VERSION} --depth=1 - - (cd libsodium && test `git rev-parse HEAD` = $${SODIUM_HASH}) || exit 1 - # libexpat - - git clone https://github.com/libexpat/libexpat.git -b $${LIBEXPAT_VERSION} --depth=1 - - (cd libexpat && test `git rev-parse HEAD` = $${LIBEXPAT_HASH}) || exit 1 - # unbound - - git clone https://github.com/NLnetLabs/unbound.git -b $${LIBUNBOUND_VERSION} --depth=1 - - cd unbound - - test `git rev-parse HEAD` = $${LIBUNBOUND_HASH} || exit 1 - # polyseed - - git clone https://github.com/tevador/polyseed.git - - (cd polyseed && git reset --hard $${POLYSEED_HASH}) || exit 1 - # utf8proc - - git clone https://github.com/JuliaStrings/utf8proc -b v2.8.0 --depth=1 - - (cd utf8proc && git reset --hard $${UTF8PROC_HASH}) - - name: Build boost (1/2) + - make download + - name: build libiconv_host image: git.mrcyjanek.net/mrcyjanek/debian:bookworm commands: - - . ./.env && export PREFIX="$${PWD}/pfx" - - cd boost_$${BOOST_VERSION} - - ./bootstrap.sh --prefix="$${PREFIX}" - - name: Build iconv (for boost) + - make libiconv_host + - name: build boost_host image: git.mrcyjanek.net/mrcyjanek/debian:bookworm commands: - - . ./.env && export PREFIX="$${PWD}/pfx" - - cd libiconv-${ICONV_VERSION} - - ./configure --build=${BUILD_TRIPLET} --host=${HOST_TRIPLET} --prefix=$${PREFIX} --disable-rpath - - make -j${NPROC} - - make install - - name: Build boost (2/2) + - make boost_host + - name: build zlib_host image: git.mrcyjanek.net/mrcyjanek/debian:bookworm commands: - - . ./.env && export PREFIX="$${PWD}/pfx" - - cd boost_${BOOST_VERSION} - - echo -n -e '\n#undef PTHREAD_STACK_MIN\n#define PTHREAD_STACK_MIN 16384\n' | cat - ./boost/thread/pthread/thread_data.hpp > temp && mv temp ./boost/thread/pthread/thread_data.hpp - - ./b2 cxxflags=-fPIC cflags=-fPIC --build-type=minimal link=static runtime-link=static --with-chrono --with-date_time --with-filesystem --with-program_options --with-regex --with-serialization --with-system --with-thread --with-locale --build-dir=linux --stagedir=linux toolset=gcc threading=multi threadapi=pthread -sICONV_PATH=${PREFIX} install -j${NPROC} &>/tmp/boost_log.txt || cat /tmp/boost_log.txt
\ No newline at end of file + - make zlib_host + - name: build openssl_host + image: git.mrcyjanek.net/mrcyjanek/debian:bookworm + commands: + - make openssl_host + - name: build libzmq_host + image: git.mrcyjanek.net/mrcyjanek/debian:bookworm + commands: + - make libzmq_host + - name: build libsodium_host + image: git.mrcyjanek.net/mrcyjanek/debian:bookworm + commands: + - make libsodium_host + - name: build libexpat_host + image: git.mrcyjanek.net/mrcyjanek/debian:bookworm + commands: + - make libexpat_host + - name: build host_copy_libs + image: git.mrcyjanek.net/mrcyjanek/debian:bookworm + commands: + - make host_copy_libs + - name: build unbound_host + image: git.mrcyjanek.net/mrcyjanek/debian:bookworm + commands: + - make unbound_host + - name: build polyseed_host + image: git.mrcyjanek.net/mrcyjanek/debian:bookworm + commands: + - make polyseed_host + - name: build utf8proc_host + image: git.mrcyjanek.net/mrcyjanek/debian:bookworm + commands: + - make utf8proc_host + - name: build monero + image: git.mrcyjanek.net/mrcyjanek/debian:bookworm + commands: + - make monero_linux_amd64 + - name: build monero_linux_amd64 + image: git.mrcyjanek.net/mrcyjanek/debian:bookworm + commands: + - make moneroc_linux_amd64 + - name: info + image: git.mrcyjanek.net/mrcyjanek/debian:bookworm + commands: + - ls -lah libbridge/build/libwallet2_api_c.so + - file libbridge/build/libwallet2_api_c.so + - md5sum libbridge/build/libwallet2_api_c.so + - sha256sum libbridge/build/libwallet2_api_c.so + - sha512sum libbridge/build/libwallet2_api_c.so
\ No newline at end of file @@ -50,8 +50,11 @@ download: .PHONY: host_depends -host_depends: libiconv_host boost_host zlib_host openssl_host libzmq_host libsodium_host libsodium_host libexpat_host unbound_host polyseed_host utf8proc_host - cp -a ${PREFIX}/lib64/* ${PREFIX}/lib # fix linking issue +host_depends: libiconv_host boost_host zlib_host openssl_host libzmq_host libsodium_host libexpat_host host_copy_libs unbound_host polyseed_host utf8proc_host + +.PHONY: host_copy_libs +host_copy_libs: + cp -a ${PREFIX}/lib64/* ${PREFIX}/lib # fix linking issue (openssl?) .PHONY: libiconv_host libiconv_host: @@ -107,6 +110,7 @@ unbound_host: .PHONY: polyseed_host polyseed_host: + cd polyseed && rm -rf ./CMakeCache.txt ./CMakeFiles/ cd polyseed && cmake -DCMAKE_INSTALL_PREFIX=${PREFIX} . cd polyseed && make -j${NPROC} cd polyseed && make install @@ -123,6 +127,7 @@ utf8proc_host: .PHONY: monero_linux_amd64 monero_linux_amd64: cd monero \ + && rm -rf build/release \ && mkdir -p build/release \ && cd build/release \ && env CMAKE_INCLUDE_PATH="${PREFIX}/include" CMAKE_LIBRARY_PATH="${PREFIX}/lib" USE_SINGLE_BUILDDIR=1 cmake -D USE_DEVICE_TREZOR=OFF -D BUILD_GUI_DEPS=1 -D BUILD_TESTS=OFF -D ARCH="x86-64" -D STATIC=ON -D BUILD_64="ON" -D CMAKE_BUILD_TYPE=release -D ANDROID=false -D BUILD_TAG="linux-x86_64" -D CMAKE_SYSTEM_NAME="Linux" ../.. |
