|
| 1 | +name: Build Unobtanium |
| 2 | + |
| 3 | +on: |
| 4 | + push: |
| 5 | + branches: [ "v0.12.0" ] |
| 6 | + |
| 7 | +jobs: |
| 8 | + build: |
| 9 | + runs-on: ${{ matrix.os }} |
| 10 | + strategy: |
| 11 | + matrix: |
| 12 | + os: [ubuntu-latest, macos-latest, windows-latest] |
| 13 | + include: |
| 14 | + - os: ubuntu-latest |
| 15 | + host: x86_64-unknown-linux-gnu |
| 16 | + packages: build-essential libtool autotools-dev autoconf pkg-config libssl-dev libboost-all-dev libdb4.8-dev libdb4.8++-dev libminiupnpc-dev libqt5gui5 libqt5core5a libqt5dbus5 qttools5-dev qttools5-dev-tools libprotobuf-dev protobuf-compiler libqrencode-dev |
| 17 | + goal: install |
| 18 | + artifact_name: unobtanium-linux |
| 19 | + - os: macos-latest |
| 20 | + host: x86_64-apple-darwin |
| 21 | + packages: autoconf automake libtool boost miniupnpc openssl pkg-config protobuf qt5 |
| 22 | + goal: install |
| 23 | + artifact_name: unobtanium-macos |
| 24 | + - os: windows-latest |
| 25 | + host: x86_64-w64-mingw32 |
| 26 | + packages: nsis gcc-mingw-w64-x86-64 g++-mingw-w64-x86-64 binutils-mingw-w64-x86-64 mingw-w64-dev |
| 27 | + goal: deploy |
| 28 | + artifact_name: unobtanium-windows |
| 29 | + |
| 30 | + steps: |
| 31 | + - uses: actions/checkout@v3 |
| 32 | + |
| 33 | + - name: Install dependencies (Linux) |
| 34 | + if: matrix.os == 'ubuntu-latest' |
| 35 | + run: | |
| 36 | + sudo add-apt-repository ppa:bitcoin/bitcoin |
| 37 | + sudo apt-get update |
| 38 | + sudo apt-get install -y ${{ matrix.packages }} |
| 39 | +
|
| 40 | + - name: Install dependencies (macOS) |
| 41 | + if: matrix.os == 'macos-latest' |
| 42 | + run: | |
| 43 | + brew install ${{ matrix.packages }} |
| 44 | + brew install https://raw.githubusercontent.com/homebrew/homebrew-core/master/Formula/berkeley-db@4.rb --without-java |
| 45 | + export LDFLAGS="-L/usr/local/opt/berkeley-db@4/lib" |
| 46 | + export CPPFLAGS="-I/usr/local/opt/berkeley-db@4/include" |
| 47 | +
|
| 48 | + - name: Install dependencies (Windows) |
| 49 | + if: matrix.os == 'windows-latest' |
| 50 | + run: choco install ${{ matrix.packages }} |
| 51 | + |
| 52 | + - name: Build |
| 53 | + run: | |
| 54 | + ./autogen.sh |
| 55 | + ./configure --prefix=`pwd`/depends/${{ matrix.host }} --with-gui=qt5 |
| 56 | + make ${{ matrix.goal }} -j$(nproc) |
| 57 | +
|
| 58 | + - name: Upload artifact |
| 59 | + uses: actions/upload-artifact@v3 |
| 60 | + with: |
| 61 | + name: ${{ matrix.artifact_name }} |
| 62 | + path: | |
| 63 | + ${{ matrix.os == 'windows-latest' && 'unobtanium-*-win64-setup.exe' || '' }} |
| 64 | + ${{ matrix.os == 'macos-latest' && 'Unobtanium-Qt.dmg' || '' }} |
| 65 | + ${{ matrix.os == 'ubuntu-latest' && 'src/unobtaniumd' || '' }} |
| 66 | + ${{ matrix.os == 'ubuntu-latest' && 'src/qt/unobtanium-qt' || '' }} |
0 commit comments