Build #26
This file contains 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: Build | |
on: | |
pull_request: | |
push: | |
branches: | |
- "master" | |
- "sidechain" | |
workflow_dispatch: | |
jobs: | |
build-linux: | |
name: Build Linux binaries | |
runs-on: ubuntu-latest-large | |
steps: | |
# https://zcash.readthedocs.io/en/master/rtd_pages/Debian-Ubuntu-build.html | |
- name: install Linux deps | |
run: sudo apt-get install build-essential pkg-config libc6-dev m4 g++-multilib autoconf libtool ncurses-dev unzip git python3 python3-zmq zlib1g-dev curl bsdmainutils automake libtinfo5 | |
- uses: actions/checkout@v3 | |
- name: Cache dependencies | |
uses: actions/cache@v3 | |
with: | |
path: ./depends | |
key: ${{ runner.os }}-${{ hashFiles('depends/packages/**') }} | |
- name: download dependencies | |
run: make -C ./depends download-linux | |
- name: build dependencies | |
run: make -C ./depends | |
- run: ./autogen.sh | |
- run: echo "HOST=$(./depends/config.guess)" >> $GITHUB_ENV | |
- run: echo "CONFIG_SITE=$PWD/depends/$HOST/share/config.site" >> $GITHUB_ENV | |
- run: ./configure --disable-tests --disable-bench --disable-hardening --enable-online-rust | |
- run: make -C src cargo-build-lib | |
- run: echo BRIDGE_LOCATION=$(dirname $(./contrib/devtools/find-libcxxbridge.sh)) >> $GITHUB_ENV | |
- run: echo LDFLAGS="-L$BRIDGE_LOCATION -lcxxbridge1" >> $GITHUB_ENV | |
# Reconfigure the build, taking our freshly compiled Rust C++ bridge into account. | |
- run: ./configure --disable-tests --disable-bench --disable-hardening --enable-online-rust | |
- run: make -j | |
- uses: actions/upload-artifact@v4 | |
with: | |
name: binaries-${{ runner.os }} | |
if-no-files-found: error | |
path: | | |
src/zsided | |
src/zside-cli | |
build-macos: | |
name: Build macOS binaries | |
runs-on: macos-latest-large | |
steps: | |
# https://zcash.readthedocs.io/en/master/rtd_pages/Debian-Ubuntu-build.html | |
- name: install deps | |
run: brew install pkgconfig automake autoconf libtool coreutils | |
- uses: actions/checkout@v3 | |
- name: Cache dependencies | |
uses: actions/cache@v3 | |
with: | |
path: ./depends | |
key: ${{ runner.os }}-${{ hashFiles('depends/packages/**') }} | |
- name: Set HOST + BUILD | |
run: | | |
echo BUILD=x86_64-apple-darwin23.0.0 >> $GITHUB_ENV | |
echo HOST=x86_64-apple-darwin23.0.0 >> $GITHUB_ENV | |
- name: download dependencies | |
run: make -C ./depends download-osx | |
- name: build dependencies | |
run: make -C ./depends | |
- run: ./autogen.sh | |
- run: echo "CONFIG_SITE=$PWD/depends/$HOST/share/config.site" >> $GITHUB_ENV | |
- run: ./configure --disable-tests --disable-bench --disable-hardening --enable-online-rust | |
- run: make -C src cargo-build-lib | |
- run: find ./target -name libcxxbridge1.a | |
- run: echo BRIDGE_LOCATION=$(dirname $(./contrib/devtools/find-libcxxbridge.sh)) >> $GITHUB_ENV | |
- run: echo LDFLAGS="-L$BRIDGE_LOCATION -lcxxbridge1" >> $GITHUB_ENV | |
# Reconfigure the build, taking our freshly compiled Rust C++ bridge into account. | |
- run: ./configure --disable-tests --disable-bench --disable-hardening --enable-online-rust | |
- run: make -j | |
- uses: actions/upload-artifact@v4 | |
with: | |
name: binaries-${{ runner.os }} | |
if-no-files-found: error | |
path: | | |
src/zsided | |
src/zside-cli | |
upload-artifacts-to-releases-drivechain-info: | |
name: Upload artifacts to releases.drivechain.info | |
runs-on: ubuntu-latest | |
needs: [build-linux, build-macos] | |
if: github.repository_owner == 'LayerTwo-Labs' | |
steps: | |
- name: Download artifacts | |
uses: actions/download-artifact@v4 | |
- name: Zip artifacts | |
run: | | |
mv binaries-Linux zside-latest-linux | |
zip -r zside-latest-linux.zip zside-latest-linux | |
mv binaries-macOS zside-latest-macos | |
zip -r zside-latest-macOS.zip zside-latest-macos | |
- name: Upload artifacts to releases.drivechain.info | |
uses: cross-the-world/ssh-scp-ssh-pipelines@latest | |
with: | |
host: 45.33.96.47 | |
user: root | |
pass: ${{ secrets.RELEASES_SERVER_PW }} | |
port: 22 | |
scp: | | |
'zside-latest-*.zip' => '/var/www/html/' |