|
1 | | -name: Build Unobtanium |
| 1 | +name: Continuous Integration |
2 | 2 |
|
3 | 3 | on: |
4 | 4 | push: |
5 | | - branches: [ "v0.12.0" ] |
| 5 | + paths-ignore: |
| 6 | + - '**/*.md' |
| 7 | + pull_request: |
| 8 | + paths-ignore: |
| 9 | + - 'doc/**' |
| 10 | + - 'contrib/**' |
| 11 | + - '**/*.md' |
6 | 12 |
|
7 | 13 | jobs: |
8 | 14 | build: |
9 | | - runs-on: ${{ matrix.os }} |
| 15 | + name: ${{ matrix.name }} |
| 16 | + |
| 17 | + env: |
| 18 | + MAKEJOBS: "-j3" |
| 19 | + CHECK_DOC: "0" |
| 20 | + CCACHE_SIZE: "100M" |
| 21 | + CCACHE_TEMPDIR: /tmp/.ccache-temp |
| 22 | + CCACHE_COMPRESS: "1" |
| 23 | + PYTHON_DEBUG: "1" |
| 24 | + CACHE_NONCE: "1" |
| 25 | + WINEDEBUG: fixme-all |
| 26 | + WINEPREFIX: /tmp/wineprefix/ |
| 27 | + SDK_URL: https://depends.dogecoincore.org |
| 28 | + |
10 | 29 | strategy: |
11 | 30 | fail-fast: false |
12 | 31 | matrix: |
13 | | - os: [ubuntu-22.04, macos-latest, windows-latest] |
| 32 | + name: |
| 33 | + - aarch64-linux |
| 34 | + - aarch64-linux-experimental |
| 35 | + - armhf-linux |
| 36 | + - i686-linux |
| 37 | + - i686-win |
| 38 | + - x86_64-linux-dbg |
| 39 | + - x86_64-linux-nowallet |
| 40 | + - x86_64-macos |
| 41 | + - x86_64-win |
| 42 | + - x86_64-win-experimental |
| 43 | + - x86_64-linux-experimental |
14 | 44 | include: |
15 | | - - os: ubuntu-22.04 |
| 45 | + - name: i686-linux |
| 46 | + host: i686-pc-linux-gnu |
| 47 | + container: ubuntu:20.04 |
| 48 | + packages: g++-multilib bc python3-zmq |
| 49 | + run-bench: false |
| 50 | + check-security: true |
| 51 | + check-symbols: true |
| 52 | + dep-opts: "NO_QT=1" |
| 53 | + config-opts: "--enable-zmq --enable-glibc-back-compat LDFLAGS=-static-libstdc++" |
| 54 | + goal: install |
| 55 | + - name: armhf-linux |
| 56 | + host: arm-linux-gnueabihf |
| 57 | + container: ubuntu:20.04 |
| 58 | + packages: g++-arm-linux-gnueabihf qemu-user-static qemu-user |
| 59 | + run-bench: false |
| 60 | + check-security: true |
| 61 | + check-symbols: true |
| 62 | + dep-opts: "NO_QT=1" |
| 63 | + config-opts: "--enable-glibc-back-compat LDFLAGS=-static-libstdc++" |
| 64 | + goal: install |
| 65 | + - name: aarch64-linux-experimental |
| 66 | + host: aarch64-linux-gnu |
| 67 | + container: ubuntu:20.04 |
| 68 | + packages: g++-aarch64-linux-gnu qemu-user-static qemu-user |
| 69 | + run-bench: false |
| 70 | + check-security: true |
| 71 | + check-symbols: false |
| 72 | + dep-opts: "NO_QT=1" |
| 73 | + config-opts: "--enable-experimental --with-armv8-crypto --with-armv82-crypto --enable-zmq --enable-glibc-back-compat LDFLAGS=-static-libstdc++ --enable-c++14" |
| 74 | + goal: install |
| 75 | + - name: aarch64-linux |
| 76 | + host: aarch64-linux-gnu |
| 77 | + container: ubuntu:20.04 |
| 78 | + packages: g++-aarch64-linux-gnu qemu-user-static qemu-user |
| 79 | + run-bench: false |
| 80 | + check-security: true |
| 81 | + check-symbols: true |
| 82 | + dep-opts: "NO_QT=1" |
| 83 | + config-opts: "--enable-zmq --enable-glibc-back-compat LDFLAGS=-static-libstdc++" |
| 84 | + goal: install |
| 85 | + - name: x86_64-linux-nowallet |
| 86 | + host: x86_64-unknown-linux-gnu |
| 87 | + container: ubuntu:20.04 |
| 88 | + packages: python3 |
| 89 | + run-bench: false |
| 90 | + check-security: true |
| 91 | + check-symbols: true |
| 92 | + dep-opts: "NO_WALLET=1" |
| 93 | + config-opts: "--with-gui=qt5 --enable-glibc-back-compat --disable-wallet LDFLAGS=-static-libstdc++" |
| 94 | + goal: install |
| 95 | + - name: x86_64-linux-dbg |
16 | 96 | host: x86_64-unknown-linux-gnu |
17 | | - packages: build-essential libtool autotools-dev autoconf pkg-config libssl-dev libboost-all-dev libdb5.3-dev libdb5.3++-dev libminiupnpc-dev libqt5gui5 libqt5core5a libqt5dbus5 qttools5-dev qttools5-dev-tools libprotobuf-dev protobuf-compiler libqrencode-dev |
| 97 | + container: ubuntu:20.04 |
| 98 | + packages: bc python3-zmq |
| 99 | + run-bench: false |
| 100 | + check-security: true |
| 101 | + check-symbols: false |
| 102 | + dep-opts: "DEBUG=1" |
| 103 | + config-opts: "--with-gui=qt5 --enable-zmq --enable-glibc-back-compat CPPFLAGS=-DDEBUG_LOCKORDER" |
18 | 104 | goal: install |
19 | | - artifact_name: unobtanium-linux |
20 | | - - os: macos-latest |
21 | | - host: x86_64-apple-darwin |
22 | | - packages: autoconf automake libtool boost miniupnpc openssl pkg-config protobuf berkeley-db qt5 |
| 105 | + - name: i686-win |
| 106 | + host: i686-w64-mingw32 |
| 107 | + container: ubuntu:20.04 |
| 108 | + container-options: --privileged |
| 109 | + packages: python3 nsis g++-mingw-w64-i686 wine32 bc wine-binfmt binfmt-support |
| 110 | + preinstall: | |
| 111 | + dpkg --add-architecture i386 |
| 112 | + postinstall: | |
| 113 | + update-alternatives --set i686-w64-mingw32-gcc /usr/bin/i686-w64-mingw32-gcc-posix |
| 114 | + update-alternatives --set i686-w64-mingw32-g++ /usr/bin/i686-w64-mingw32-g++-posix |
| 115 | + update-binfmts --import /usr/share/binfmts/wine |
| 116 | + update-binfmts --enable |
| 117 | + update-binfmts --display |
| 118 | + run-bench: false |
| 119 | + check-security: true |
| 120 | + check-symbols: true |
| 121 | + dep-opts: "" |
| 122 | + config-opts: "--enable-gui=qt5" |
23 | 123 | goal: install |
24 | | - artifact_name: unobtanium-macos |
25 | | - - os: windows-latest |
| 124 | + - name: x86_64-win |
26 | 125 | host: x86_64-w64-mingw32 |
27 | | - packages: nsis mingw |
| 126 | + container: ubuntu:20.04 |
| 127 | + container-options: --privileged |
| 128 | + packages: python3 nsis g++-mingw-w64-x86-64 wine64 bc wine-binfmt |
| 129 | + postinstall: | |
| 130 | + update-alternatives --set x86_64-w64-mingw32-gcc /usr/bin/x86_64-w64-mingw32-gcc-posix |
| 131 | + update-alternatives --set x86_64-w64-mingw32-g++ /usr/bin/x86_64-w64-mingw32-g++-posix |
| 132 | + update-binfmts --import /usr/share/binfmts/wine |
| 133 | + update-binfmts --enable |
| 134 | + update-binfmts --display |
| 135 | + run-bench: false |
| 136 | + check-security: true |
| 137 | + check-symbols: true |
| 138 | + dep-opts: "" |
| 139 | + config-opts: "--enable-gui=qt5" |
| 140 | + goal: install |
| 141 | + - name: x86_64-win-experimental |
| 142 | + host: x86_64-w64-mingw32 |
| 143 | + container: ubuntu:20.04 |
| 144 | + container-options: --privileged |
| 145 | + packages: python3 nsis g++-mingw-w64-x86-64 wine64 bc wine-binfmt |
| 146 | + postinstall: | |
| 147 | + update-alternatives --set x86_64-w64-mingw32-gcc /usr/bin/x86_64-w64-mingw32-gcc-posix |
| 148 | + update-alternatives --set x86_64-w64-mingw32-g++ /usr/bin/x86_64-w64-mingw32-g++-posix |
| 149 | + update-binfmts --import /usr/share/binfmts/wine |
| 150 | + update-binfmts --enable |
| 151 | + update-binfmts --display |
| 152 | + run-bench: false |
| 153 | + check-security: true |
| 154 | + check-symbols: false |
| 155 | + dep-opts: "AVX2=1 MINGW=1" |
| 156 | + config-opts: " --with-intel-avx2 --with-gui=qt5 --enable-c++14" |
| 157 | + goal: install |
| 158 | + - name: x86_64-macos |
| 159 | + host: x86_64-apple-darwin11 |
| 160 | + container: ubuntu:20.04 |
| 161 | + packages: cmake imagemagick libcap-dev librsvg2-bin libz-dev libbz2-dev libtiff-tools libtinfo5 xorriso |
| 162 | + run-bench: false |
| 163 | + check-security: true |
| 164 | + check-symbols: false |
| 165 | + dep-opts: "" |
| 166 | + config-opts: "--with-gui=qt5 --disable-tests" |
28 | 167 | goal: deploy |
29 | | - artifact_name: unobtanium-windows |
| 168 | + sdk: 10.11 |
| 169 | + sdk-shasum: "bec9d089ebf2e2dd59b1a811a38ec78ebd5da18cbbcd6ab39d1e59f64ac5033f" |
| 170 | + - name: x86_64-linux-experimental |
| 171 | + host: x86_64-linux-gnu |
| 172 | + container: ubuntu:20.04 |
| 173 | + packages: bc python3-zmq |
| 174 | + run-bench: false |
| 175 | + dep-opts: "AVX2=1" |
| 176 | + config-opts: " --with-intel-avx2 --with-gui=qt5 --enable-zmq --enable-glibc-back-compat --enable-reduce-exports --enable-c++14" |
| 177 | + goal: install |
| 178 | + |
| 179 | + runs-on: ubuntu-24.04 |
| 180 | + container: |
| 181 | + image: ${{ matrix.container }} |
| 182 | + options: ${{ matrix.container-options == '' && '-e UNO' || matrix.container-options }} |
30 | 183 |
|
31 | 184 | steps: |
32 | | - - uses: actions/checkout@v3 |
33 | | - |
34 | | - - name: Install dependencies (Linux) |
35 | | - if: matrix.os == 'ubuntu-22.04' |
36 | | - env: |
37 | | - DEBIAN_FRONTEND: noninteractive |
38 | | - run: | |
39 | | - sudo apt-get update |
40 | | - sudo apt-get install -yq ${{ matrix.packages }} |
41 | | -
|
42 | | - - name: Install dependencies (macOS) |
43 | | - if: matrix.os == 'macos-latest' |
44 | | - run: | |
45 | | - brew install ${{ matrix.packages }} |
46 | | - export LDFLAGS="-L$(brew --prefix berkeley-db)/lib" |
47 | | - export CPPFLAGS="-I$(brew --prefix berkeley-db)/include" |
48 | | -
|
49 | | - - name: Install dependencies (Windows) |
50 | | - if: matrix.os == 'windows-latest' |
51 | | - run: choco install ${{ matrix.packages }} |
52 | | - |
53 | | - - name: Build |
54 | | - run: | |
55 | | - ./autogen.sh |
56 | | - ./configure --prefix=`pwd`/depends/${{ matrix.host }} --with-gui=qt5 |
57 | | - make ${{ matrix.goal }} -j$(nproc) |
58 | | -
|
59 | | - - name: Upload artifact |
60 | | - uses: actions/upload-artifact@v4 |
61 | | - with: |
62 | | - name: ${{ matrix.artifact_name }} |
63 | | - path: | |
64 | | - ${{ matrix.os == 'windows-latest' && 'unobtanium-*-win64-setup.exe' || '' }} |
65 | | - ${{ matrix.os == 'macos-latest' && 'Unobtanium-Qt.dmg' || '' }} |
66 | | - ${{ matrix.os == 'ubuntu-22.04' && 'src/unobtaniumd' || '' }} |
67 | | - ${{ matrix.os == 'ubuntu-22.04' && 'src/qt/unobtanium-qt' || '' }} |
| 185 | + - name: Configure container |
| 186 | + run: | |
| 187 | + ln -snf /usr/share/zoneinfo/Etc/UTC /etc/localtime |
| 188 | + echo Etc/UTC > /etc/timezone |
| 189 | + mkdir -p $WINEPREFIX |
| 190 | + uname -a |
| 191 | +
|
| 192 | + - name: Pre install |
| 193 | + if: ${{ matrix.preinstall }} |
| 194 | + run: ${{ matrix.preinstall }} |
| 195 | + |
| 196 | + - name: Install packages |
| 197 | + run: | |
| 198 | + apt-get update |
| 199 | + apt-get install -y build-essential libtool autotools-dev automake \ |
| 200 | + pkg-config bsdmainutils curl ca-certificates ccache rsync git \ |
| 201 | + procps bison python3 python3-pip python3-setuptools python3-wheel |
| 202 | + apt-get install -y ${{ matrix.packages }} |
| 203 | + python3 -m pip install setuptools==70.3.0 --upgrade |
| 204 | + python3 -m pip install lief |
| 205 | +
|
| 206 | + - name: Post install |
| 207 | + if: ${{ matrix.postinstall }} |
| 208 | + run: ${{ matrix.postinstall }} |
| 209 | + |
| 210 | + - name: Checkout |
| 211 | + uses: actions/checkout@v4 |
| 212 | + |
| 213 | + - name: SDK cache |
| 214 | + if: ${{ matrix.sdk }} |
| 215 | + uses: actions/cache@v4 |
| 216 | + env: |
| 217 | + cache-name: sdk |
| 218 | + with: |
| 219 | + path: ./depends/sdk-sources |
| 220 | + key: ${{ matrix.name }}-${{ env.cache-name }}-${{ hashFiles('.github/workflows/build.yml') }} |
| 221 | + |
| 222 | + - name: Install SDK |
| 223 | + if: ${{ matrix.sdk }} |
| 224 | + env: |
| 225 | + sdk-filename: MacOSX${{ matrix.sdk }}.sdk.tar.gz |
| 226 | + run: | |
| 227 | + mkdir -p ./depends/sdk-sources |
| 228 | + mkdir -p ./depends/SDKs |
| 229 | + echo "${{ matrix.sdk-shasum }} depends/sdk-sources/${{ env.sdk-filename }}" | sha256sum -c || \ |
| 230 | + curl --location --fail $SDK_URL/${{ env.sdk-filename }} -o depends/sdk-sources/${{ env.sdk-filename }} &&\ |
| 231 | + echo "${{ matrix.sdk-shasum }} depends/sdk-sources/${{ env.sdk-filename }}" | sha256sum -c |
| 232 | + tar -C depends/SDKs -xf depends/sdk-sources/${{ env.sdk-filename }} |
| 233 | +
|
| 234 | + - name: Dependency cache |
| 235 | + uses: actions/cache@v4 |
| 236 | + env: |
| 237 | + cache-name: depends |
| 238 | + with: |
| 239 | + path: ./depends/built |
| 240 | + key: ${{ matrix.name }}-${{ env.cache-name }}-${{ hashFiles('depends/packages/*', '.github/workflows/build.yml') }} |
| 241 | + |
| 242 | + - name: Build depends |
| 243 | + run: | |
| 244 | + make $MAKEJOBS -C depends HOST=${{ matrix.host }} ${{ matrix.dep-opts }} |
| 245 | +
|
| 246 | + - name: CCache |
| 247 | + uses: actions/cache@v4 |
| 248 | + env: |
| 249 | + cache-name: ccache |
| 250 | + with: |
| 251 | + path: ~/.ccache |
| 252 | + key: ${{ matrix.name }}-${{ env.cache-name }}-${{ hashFiles('**/configure.ac', '.github/workflows/build.yml') }} |
| 253 | + |
| 254 | + - name: Build Unobtanium |
| 255 | + run: | |
| 256 | + depends/${{ matrix.host }}/native/bin/ccache --max-size=$CCACHE_SIZE |
| 257 | + ./autogen.sh |
| 258 | + ./configure --prefix=`pwd`/depends/${{ matrix.host }} ${{ matrix.config-opts }} --enable-reduce-exports || ( cat config.log && false) |
| 259 | + make $MAKEJOBS ${{ matrix.goal }} || ( echo "Build failure. Verbose build follows." && make ${{ matrix.goal }} V=1 ; false ) |
| 260 | +
|
| 261 | + - name: Run benchmark |
| 262 | + if: ${{ matrix.run-bench }} |
| 263 | + run: | |
| 264 | + src/bench/bench_unobtanium > ${{ matrix.name }}-bench.csv |
| 265 | + cat ${{ matrix.name }}-bench.csv |
| 266 | +
|
| 267 | + - name: Run tests |
| 268 | + if: ${{ matrix.test-script }} |
| 269 | + run: ${{ matrix.test-script }} |
| 270 | + |
| 271 | + - name: Check security |
| 272 | + if: ${{ matrix.check-security }} |
| 273 | + run: make -C src check-security |
| 274 | + |
| 275 | + - name: Check symbols |
| 276 | + if: ${{ matrix.check-symbols }} |
| 277 | + run: make -C src check-symbols |
| 278 | + |
| 279 | + - name: Cleanup qa artifacts |
| 280 | + run: | |
| 281 | + rm -rf qa/cache || true |
| 282 | +
|
| 283 | + - name: Upload artifacts |
| 284 | + uses: actions/upload-artifact@v4 |
| 285 | + with: |
| 286 | + name: unobtanium-${{ github.sha }}-${{ matrix.name }} |
| 287 | + path: | |
| 288 | + depends/${{ matrix.host }}/bin/unobtanium* |
| 289 | + dist/Unobtanium-Qt.app |
| 290 | + ${{ matrix.name }}-bench.csv |
| 291 | +
|
0 commit comments