ci mac build patch 1 #371
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Continuous Integration | |
| on: | |
| push: | |
| paths-ignore: | |
| - '**/*.md' | |
| pull_request: | |
| paths-ignore: | |
| - 'doc/**' | |
| - 'contrib/**' | |
| - '**/*.md' | |
| jobs: | |
| build: | |
| name: ${{ matrix.name }} | |
| env: | |
| MAKEJOBS: "-j3" | |
| CHECK_DOC: "0" | |
| CCACHE_SIZE: "100M" | |
| CCACHE_TEMPDIR: /tmp/.ccache-temp | |
| CCACHE_COMPRESS: "1" | |
| PYTHON_DEBUG: "1" | |
| CACHE_NONCE: "1" | |
| WINEDEBUG: fixme-all | |
| WINEPREFIX: /tmp/wineprefix/ | |
| SDK_URL: https://depends.dogecoincore.org | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| name: | |
| - aarch64-linux | |
| - armhf-linux | |
| - i686-linux | |
| - i686-win | |
| - x86_64-linux | |
| - x86_64-macos | |
| - x86_64-win | |
| include: | |
| - name: i686-linux | |
| host: i686-pc-linux-gnu | |
| container: ubuntu:20.04 | |
| packages: g++-multilib bc python3-zmq | |
| run-bench: false | |
| check-security: true | |
| check-symbols: false | |
| dep-opts: "NO_QT=1" | |
| config-opts: "--enable-zmq --enable-glibc-back-compat LDFLAGS=-static-libstdc++ --disable-tests" | |
| goal: install | |
| - name: armhf-linux | |
| host: arm-linux-gnueabihf | |
| container: ubuntu:20.04 | |
| packages: g++-arm-linux-gnueabihf qemu-user-static qemu-user | |
| run-bench: false | |
| check-security: true | |
| check-symbols: false | |
| dep-opts: "NO_QT=1" | |
| config-opts: "--enable-glibc-back-compat LDFLAGS=-static-libstdc++ --disable-tests" | |
| goal: install | |
| - name: aarch64-linux | |
| host: aarch64-linux-gnu | |
| container: ubuntu:20.04 | |
| packages: g++-aarch64-linux-gnu qemu-user-static qemu-user | |
| run-bench: false | |
| check-security: true | |
| check-symbols: false | |
| dep-opts: "NO_QT=1" | |
| config-opts: "--enable-zmq --enable-glibc-back-compat LDFLAGS=-static-libstdc++ --disable-tests" | |
| goal: install | |
| - name: x86_64-linux | |
| host: x86_64-unknown-linux-gnu | |
| container: ubuntu:20.04 | |
| packages: python3 g++-multilib bc python3-zmq | |
| run-bench: false | |
| check-security: true | |
| check-symbols: false | |
| dep-opts: "NO_QT=1" | |
| config-opts: "--enable-zmq --enable-glibc-back-compat LDFLAGS=-static-libstdc++ --disable-tests" | |
| goal: install | |
| - name: i686-win | |
| host: i686-w64-mingw32 | |
| container: ubuntu:20.04 | |
| container-options: --privileged | |
| packages: python3 nsis g++-mingw-w64-i686 wine32 bc wine-binfmt binfmt-support | |
| preinstall: | | |
| dpkg --add-architecture i386 | |
| postinstall: | | |
| update-alternatives --set i686-w64-mingw32-gcc /usr/bin/i686-w64-mingw32-gcc-posix | |
| update-alternatives --set i686-w64-mingw32-g++ /usr/bin/i686-w64-mingw32-g++-posix | |
| update-binfmts --import /usr/share/binfmts/wine | |
| update-binfmts --enable | |
| update-binfmts --display | |
| run-bench: false | |
| check-security: true | |
| check-symbols: false | |
| dep-opts: "" | |
| config-opts: "--with-gui=qt5 --disable-tests" | |
| goal: install | |
| - name: x86_64-win | |
| host: x86_64-w64-mingw32 | |
| container: ubuntu:20.04 | |
| container-options: --privileged | |
| packages: python3 nsis g++-mingw-w64-x86-64 wine64 bc wine-binfmt | |
| postinstall: | | |
| update-alternatives --set x86_64-w64-mingw32-gcc /usr/bin/x86_64-w64-mingw32-gcc-posix | |
| update-alternatives --set x86_64-w64-mingw32-g++ /usr/bin/x86_64-w64-mingw32-g++-posix | |
| update-binfmts --import /usr/share/binfmts/wine | |
| update-binfmts --enable | |
| update-binfmts --display | |
| run-bench: false | |
| check-security: true | |
| check-symbols: false | |
| dep-opts: "" | |
| config-opts: "--with-gui=qt5 --disable-tests" | |
| goal: install | |
| - name: x86_64-macos | |
| host: x86_64-apple-darwin11 | |
| container: ubuntu:20.04 | |
| packages: cmake imagemagick libcap-dev librsvg2-bin libz-dev libbz2-dev libtiff-tools libtinfo5 xorriso | |
| run-bench: false | |
| check-security: true | |
| check-symbols: false | |
| dep-opts: "" | |
| config-opts: "--with-gui=qt5 --disable-tests" | |
| goal: deploy | |
| sdk: 10.11 | |
| sdk-shasum: "bec9d089ebf2e2dd59b1a811a38ec78ebd5da18cbbcd6ab39d1e59f64ac5033f" | |
| runs-on: ubuntu-22.04 | |
| container: | |
| image: ${{ matrix.container }} | |
| options: ${{ matrix.container-options == '' && '-e 1ADVC=1ADVC' || matrix.container-options }} | |
| steps: | |
| - name: Configure container | |
| run: | | |
| ln -snf /usr/share/zoneinfo/Etc/UTC /etc/localtime | |
| echo Etc/UTC > /etc/timezone | |
| mkdir -p $WINEPREFIX | |
| uname -a | |
| - name: Pre install | |
| if: ${{ matrix.preinstall }} | |
| run: ${{ matrix.preinstall }} | |
| - name: Install packages | |
| run: | | |
| apt-get update | |
| apt-get install -y build-essential libtool autotools-dev automake \ | |
| pkg-config bsdmainutils curl ca-certificates ccache rsync git \ | |
| procps bison python3 python3-pip python3-setuptools python3-wheel autoconf-archive | |
| ln -sf /usr/bin/python3 /usr/bin/python | |
| apt-get install -y ${{ matrix.packages }} | |
| python3 -m pip install setuptools==70.3.0 --upgrade | |
| python3 -m pip install lief | |
| - name: Post install | |
| if: ${{ matrix.postinstall }} | |
| run: ${{ matrix.postinstall }} | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - name: Fix permissions and init submodules | |
| run: | | |
| git config --global --add safe.directory $GITHUB_WORKSPACE | |
| git submodule update --init --recursive | |
| chmod +x depends/config.guess depends/config.sub || true | |
| - name: SDK cache | |
| if: ${{ matrix.sdk }} | |
| uses: actions/cache@v4 | |
| env: | |
| cache-name: sdk | |
| with: | |
| path: ./depends/sdk-sources | |
| key: ${{ matrix.name }}-${{ env.cache-name }}-${{ hashFiles('.github/workflows/ci.yml') }} | |
| - name: Install SDK | |
| if: ${{ matrix.sdk }} | |
| env: | |
| sdk-filename: MacOSX${{ matrix.sdk }}.sdk.tar.gz | |
| run: | | |
| mkdir -p depends/sdk-sources | |
| mkdir -p depends/SDKs | |
| cd depends/sdk-sources | |
| # First check: does NOT include path | |
| echo "${{ matrix.sdk-shasum }} ${{ env.sdk-filename }}" | sha256sum -c || \ | |
| curl --location --fail "$SDK_URL/${{ env.sdk-filename }}" -o "${{ env.sdk-filename }}" | |
| # Second check AFTER download | |
| echo "${{ matrix.sdk-shasum }} ${{ env.sdk-filename }}" | sha256sum -c | |
| cd ../.. | |
| tar -C depends/SDKs -xf depends/sdk-sources/${{ env.sdk-filename }} | |
| - name: Dependency cache | |
| uses: actions/cache@v4 | |
| env: | |
| cache-name: depends | |
| with: | |
| path: ./depends/built | |
| key: ${{ matrix.name }}-${{ env.cache-name }}-${{ hashFiles('depends/packages/*', '.github/workflows/ci.yml') }} | |
| - name: Build depends | |
| run: make $MAKEJOBS -C depends HOST=${{ matrix.host }} ${{ matrix.dep-opts }} | |
| # - name: Build depends | |
| # run: | | |
| # set +e | |
| # make $MAKEJOBS -C depends HOST=${{ matrix.host }} ${{ matrix.dep-opts }} | |
| # STATUS=$? | |
| # echo "==== Attempting to dump util/domd files found so far ====" | |
| # find depends/work -path "*/openssl*/util/domd" -exec sh -c ' | |
| # echo "---- {} ----" | |
| # sed -n "1,200p" "{}" | |
| # ' \; | |
| # exit $STATUS | |
| - name: CCache | |
| uses: actions/cache@v4 | |
| env: | |
| cache-name: ccache | |
| with: | |
| path: ~/.ccache | |
| key: ${{ matrix.name }}-${{ env.cache-name }}-${{ hashFiles('**/configure.ac', '.github/workflows/ci.yml') }} | |
| - name: Build AdventureCoin | |
| env: | |
| GIT_COMMIT_ID: ${{ github.sha }} | |
| run: | | |
| chmod +x autogen.sh | |
| chmod -R +x depends || true | |
| chmod +x share/genbuild.sh | |
| SHORT_COMMIT=$(echo "$GIT_COMMIT_ID" | cut -c1-7) | |
| depends/${{ matrix.host }}/native/bin/ccache --max-size=$CCACHE_SIZE | |
| ./autogen.sh | |
| chmod +x configure || true | |
| ./configure --prefix=`pwd`/depends/${{ matrix.host }} \ | |
| ${{ matrix.config-opts }} \ | |
| --enable-reduce-exports \ | |
| CFLAGS="-pipe -O2 -DGIT_COMMIT_ID=\\\"$SHORT_COMMIT\\\"" \ | |
| CXXFLAGS="-std=c++17 -pipe -O2 -DGIT_COMMIT_ID=\\\"$SHORT_COMMIT\\\"" \ | |
| || (cat config.log && false) | |
| make $MAKEJOBS ${{ matrix.goal }} \ | |
| CXXFLAGS="-std=c++17" \ | |
| || (echo "Build failure. Verbose build follows." && make ${{ matrix.goal }} CXXFLAGS="-std=c++17" V=1 ; false) | |
| - name: Run benchmark | |
| if: ${{ matrix.run-bench }} | |
| run: | | |
| src/bench/bench_adventurecoin > ${{ matrix.name }}-bench.csv | |
| cat ${{ matrix.name }}-bench.csv | |
| - name: Fix permissions for security-check.py | |
| run: chmod +x contrib/devtools/security-check.py | |
| - name: Check security | |
| if: ${{ matrix.check-security }} | |
| run: make -C src check-security | |
| - name: Check symbols | |
| if: ${{ matrix.check-symbols }} | |
| run: make -C src check-symbols | |
| - name: Cleanup qa artifacts | |
| run: rm -rf qa/cache || true | |
| - name: Upload artifacts | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: adventurecoin-${{ github.sha }}-${{ matrix.name }} | |
| path: | | |
| depends/${{ matrix.host }}/bin/adventurecoin* | |
| depends/${{ matrix.host }}/lib/libbitcoinconsensus* | |
| depends/${{ matrix.host }}/include/bitcoinconsensus.h | |
| depends/${{ matrix.host }}/share/man/man1/adventurecoin* | |
| dist/AdventureCoin-Qt.app | |
| AdventureCoin-Core.dmg | |
| ${{ matrix.name }}-bench.csv |