From 78c7a6f40c8eb67f463e194b56127f8a2cdea7be Mon Sep 17 00:00:00 2001 From: Torkel Rogstad Date: Tue, 23 Jan 2024 13:38:02 +0100 Subject: [PATCH] ci: add windows builds --- .github/workflows/build.yml | 42 +++++++++++++++++++++++++++++++++++-- 1 file changed, 40 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index c92762fa4..065bcda6d 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -28,7 +28,7 @@ jobs: run: make -C ./depends download-linux - name: build dependencies - run: make -C ./depends + run: make -C ./depends -j - run: ./autogen.sh @@ -57,6 +57,44 @@ jobs: src/zsided src/zside-cli + build-windows: + name: Build Windows binaries + runs-on: ubuntu-latest + steps: + # https://zcash.readthedocs.io/en/master/rtd_pages/Debian-Ubuntu-build.html + - uses: actions/checkout@v3 + + - name: Cache dependencies + uses: actions/cache@v3 + with: + path: ./depends + key: Windows-${{ hashFiles('depends/packages/**') }} + + - name: Run build in Docker + uses: addnab/docker-run-action@v3 + with: + image: electriccoinco/zcashd-build-ubuntu-jammy + options: -v ${{ github.workspace }}:/zside --workdir=zside + shell: bash + run: | + make -C ./depends download-win + HOST=x86_64-w64-mingw32 make -C ./depends -j + export CONFIG_SITE=$PWD/depends/x86_64-w64-mingw32/share/config.site + ./autogen.sh + ./configure --disable-tests --disable-bench --disable-hardening --enable-online-rust + make -C src cargo-build-lib + BRIDGE_LOCATION=$(dirname $(./contrib/devtools/find-libcxxbridge.sh)) + export LDFLAGS="-L$BRIDGE_LOCATION -lcxxbridge1" + ./configure --disable-tests --disable-bench --disable-hardening --enable-online-rust + make -j + + - uses: actions/upload-artifact@v4 + with: + name: binaries-Windows + if-no-files-found: error + path: | + src/zsided.exe + src/zside-cli.exe build-macos: name: Build macOS binaries @@ -83,7 +121,7 @@ jobs: run: make -C ./depends download-osx - name: build dependencies - run: make -C ./depends + run: make -C ./depends -j - run: ./autogen.sh