monero-lws/.github/workflows/build-ubuntu.yml

76 lines
3.6 KiB
YAML
Raw Normal View History

2023-08-04 19:59:26 +00:00
name: unix-ci
2023-05-18 15:37:39 +00:00
on:
push:
2023-11-30 00:49:20 +00:00
branches: [ "master", "develop", "release-*" ]
2023-05-18 15:37:39 +00:00
pull_request:
branches: [ "master", "develop" ]
2023-05-18 15:37:39 +00:00
env:
# Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.)
BUILD_TYPE: Release
APT_INSTALL_LINUX: 'sudo apt -y install build-essential cmake libboost-all-dev miniupnpc libunbound-dev graphviz doxygen libunwind8-dev pkg-config libssl-dev libzmq3-dev libsodium-dev libhidapi-dev libnorm-dev libusb-1.0-0-dev libpgm-dev libprotobuf-dev protobuf-compiler ccache'
APT_SET_CONF: |
echo "Acquire::Retries \"3\";" | sudo tee -a /etc/apt/apt.conf.d/80-custom
echo "Acquire::http::Timeout \"120\";" | sudo tee -a /etc/apt/apt.conf.d/80-custom
echo "Acquire::ftp::Timeout \"120\";" | sudo tee -a /etc/apt/apt.conf.d/80-custom
jobs:
2023-08-04 19:59:26 +00:00
build-tests:
runs-on: ${{matrix.os}}
strategy:
matrix:
2023-08-04 19:37:21 +00:00
os: [ubuntu-latest, ubuntu-22.04, ubuntu-20.04, macos-latest, macos-12, macos-11]
rmq: [WITH_RMQ=ON, WITH_RMQ=OFF]
2023-05-18 15:37:39 +00:00
steps:
2023-08-04 19:59:26 +00:00
- name: set apt conf (Debian based Linux)
2023-08-04 19:39:47 +00:00
if: matrix.os == 'ubuntu-latest' || matrix.os == 'ubuntu-22.04' || matrix.os == 'ubuntu-20.04'
run: ${{env.APT_SET_CONF}}
2023-08-04 19:59:26 +00:00
- name: update apt (Debian based Linux)
2023-08-04 19:39:47 +00:00
if: matrix.os == 'ubuntu-latest' || matrix.os == 'ubuntu-22.04' || matrix.os == 'ubuntu-20.04'
run: sudo apt update
2023-08-04 19:59:26 +00:00
- name: Install dependencies (Debian based Linux)
2023-08-04 19:39:47 +00:00
if: matrix.os == 'ubuntu-latest' || matrix.os == 'ubuntu-22.04' || matrix.os == 'ubuntu-20.04'
run: ${{env.APT_INSTALL_LINUX}}
2023-09-09 00:14:51 +00:00
- name: Install RabbitMQ iff WITH_RMQ (Debian based Linux)
if: matrix.rmq == 'WITH_RMQ=ON' && (matrix.os == 'ubuntu-latest' || matrix.os == 'ubuntu-22.04' || matrix.os == 'ubuntu-20.04')
2023-09-09 00:14:51 +00:00
run: sudo apt -y install librabbitmq-dev
2023-08-04 19:37:21 +00:00
- name: Install dependencies (MacOS)
2023-08-04 19:39:47 +00:00
if: matrix.os == 'macos-latest' || matrix.os == 'macos-12' || matrix.os == 'macos-11'
2023-08-04 19:37:21 +00:00
run: HOMEBREW_NO_AUTO_UPDATE=1 brew install boost hidapi openssl zmq libpgm miniupnpc expat libunwind-headers protobuf ccache
2023-09-09 00:14:51 +00:00
- name: Install RabbitMQ iff WITH_RMQ (MacOS)
if: matrix.rmq == 'WITH_RMQ=ON' && (matrix.os == 'macos-latest' || matrix.os == 'macos-12' || matrix.os == 'macos-11')
2023-09-09 00:38:00 +00:00
run: HOMEBREW_NO_AUTO_UPDATE=1 brew install rabbitmq-c
2023-08-04 19:37:21 +00:00
- name: Checkout Monero Source
uses: actions/checkout@v3
2023-05-18 15:37:39 +00:00
with:
repository: monero-project/monero
path: ${{github.workspace}}/monero/
2023-08-04 18:56:13 +00:00
submodules: recursive
2023-08-01 16:02:11 +00:00
- name: Configure Monero
2023-09-09 00:18:51 +00:00
run: cmake -B ${{github.workspace}}/monero/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} ${{github.workspace}}/monero
2023-08-01 16:02:11 +00:00
2023-05-18 15:37:39 +00:00
- name: Build Monero
2023-08-04 18:03:54 +00:00
run: cd ${{github.workspace}}/monero/build && make -j$(nproc) daemon lmdb_lib multisig
2023-08-01 16:02:11 +00:00
2023-08-04 19:37:21 +00:00
- name: Checkout LWS Source
uses: actions/checkout@v3
2023-05-18 15:37:39 +00:00
with:
path: ${{github.workspace}}/lws
- name: Configure LWS
# Configure CMake in a 'build' subdirectory. `CMAKE_BUILD_TYPE` is only required if you are using a single-configuration generator such as make.
# See https://cmake.org/cmake/help/latest/variable/CMAKE_BUILD_TYPE.html?highlight=cmake_build_type
run: cmake -B ${{github.workspace}}/lws/build -D${{matrix.rmq}} -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DMONERO_SOURCE_DIR=${{github.workspace}}/monero -DMONERO_BUILD_DIR=${{github.workspace}}/monero/build ${{github.workspace}}/lws -DBUILD_TESTS=ON
2023-05-18 15:37:39 +00:00
- name: Build LWS
# Build your program with the given configuration
2023-08-04 18:03:54 +00:00
run: (cd ${{github.workspace}}/lws/build && make -j$(nproc))
- name: Run Tests
run: cd ${{github.workspace}}/lws/build && ctest
2023-05-18 15:37:39 +00:00