mirror of
https://codeberg.org/wownero/wownero-lws
synced 2026-10-17 07:31:34 +02:00
Revamp ci: add archlinux and debian (bookworm, trixie), and reorganize (#230)
This commit is contained in:
committed by
Lee *!* Clagett
parent
97e0161cfd
commit
708e525e36
@@ -1,4 +1,4 @@
|
|||||||
name: unix-ci
|
name: ci
|
||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
@@ -10,13 +10,15 @@ on:
|
|||||||
|
|
||||||
env:
|
env:
|
||||||
# Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.)
|
# Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.)
|
||||||
BUILD_TYPE: Release
|
APT_INSTALL_LINUX: 'apt -y install build-essential cmake git libboost-all-dev miniupnpc libunbound-dev 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'
|
||||||
APT_INSTALL_LINUX: 'sudo apt -y install build-essential cmake libboost-all-dev miniupnpc libunbound-dev 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'
|
|
||||||
APT_SET_CONF: |
|
APT_SET_CONF: |
|
||||||
echo "Acquire::Retries \"3\";" | sudo tee -a /etc/apt/apt.conf.d/80-custom
|
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::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
|
echo "Acquire::ftp::Timeout \"120\";" | sudo tee -a /etc/apt/apt.conf.d/80-custom
|
||||||
BREW_INSTALL_MAC: 'HOMEBREW_NO_AUTO_UPDATE=1 brew install boost hidapi openssl zmq libpgm miniupnpc expat libunwind-headers protobuf unbound'
|
BREW_INSTALL_MAC: 'HOMEBREW_NO_AUTO_UPDATE=1 brew install boost hidapi openssl zmq libpgm miniupnpc expat libunwind-headers protobuf unbound'
|
||||||
|
CONFIGURE_BASIC: '-B "$GITHUB_WORKSPACE/lws/build" -DMONERO_SOURCE_DIR="$GITHUB_WORKSPACE/monero" -DCMAKE_BUILD_TYPE=Release -DBUILD_TESTS=ON -S "$GITHUB_WORKSPACE/lws"'
|
||||||
|
BUILD: 'cmake --build "$GITHUB_WORKSPACE/lws/build" -j$(nproc)'
|
||||||
|
RUN: 'ctest --test-dir "$GITHUB_WORKSPACE/lws/build" --output-on-failure'
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build-beginner:
|
build-beginner:
|
||||||
@@ -26,31 +28,65 @@ jobs:
|
|||||||
matrix:
|
matrix:
|
||||||
os: [ubuntu-latest, macos-latest]
|
os: [ubuntu-latest, macos-latest]
|
||||||
steps:
|
steps:
|
||||||
- name: set apt conf (Debian base Linux)
|
- name: Install Dependencies (Ubuntu)
|
||||||
if: matrix.os == 'ubuntu-latest'
|
if: matrix.os == 'ubuntu-latest'
|
||||||
run: ${{env.APT_SET_CONF}}
|
run: |
|
||||||
- name: update apt (Debian based Linux)
|
${{env.APT_SET_CONF}}
|
||||||
if: matrix.os == 'ubuntu-latest'
|
sudo apt update
|
||||||
run: sudo apt update
|
sudo ${{env.APT_INSTALL_LINUX}}
|
||||||
- name: Install dependencies (Debian based Linux)
|
|
||||||
if: matrix.os == 'ubuntu-latest'
|
|
||||||
run: ${{env.APT_INSTALL_LINUX}}
|
|
||||||
- name: Install dependencies (MacOS)
|
- name: Install dependencies (MacOS)
|
||||||
if: matrix.os == 'macos-latest'
|
if: matrix.os == 'macos-latest'
|
||||||
run: ${{env.BREW_INSTALL_MAC}}
|
run: ${{env.BREW_INSTALL_MAC}}
|
||||||
|
- name: Checkout Monero Source
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
with:
|
||||||
|
repository: monero-project/monero
|
||||||
|
path: ${{github.workspace}}/monero/
|
||||||
|
submodules: recursive
|
||||||
- name: Checkout LWS Source
|
- name: Checkout LWS Source
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
with:
|
with:
|
||||||
path: ${{github.workspace}}/lws
|
path: ${{github.workspace}}/lws
|
||||||
submodules: recursive
|
submodules: recursive
|
||||||
- name: Configure 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.
|
run: cmake ${{env.CONFIGURE_BASIC}}
|
||||||
# See https://cmake.org/cmake/help/latest/variable/CMAKE_BUILD_TYPE.html?highlight=cmake_build_type
|
|
||||||
run: cmake -B ${{github.workspace}}/lws/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} ${{github.workspace}}/lws
|
|
||||||
- name: Build LWS
|
- name: Build LWS
|
||||||
# Build your program with the given configuration
|
run: ${{env.BUILD}}
|
||||||
run: (cd ${{github.workspace}}/lws/build && make -j$(nproc))
|
build-distro:
|
||||||
build-tests:
|
runs-on: ubuntu-latest
|
||||||
|
container: ${{matrix.distro}}
|
||||||
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
|
matrix:
|
||||||
|
distro: [archlinux:base-devel, debian:bookworm-slim, debian:trixie-slim]
|
||||||
|
steps:
|
||||||
|
- name: Install Dependencies (Debian/apt)
|
||||||
|
if: matrix.distro == 'debian:bookworm-slim' || matrix.distro == 'debian:trixie-slim'
|
||||||
|
run: |
|
||||||
|
apt update
|
||||||
|
${{env.APT_INSTALL_LINUX}}
|
||||||
|
- name: Install Dependencies (Arch/pacman)
|
||||||
|
if: matrix.distro == 'archlinux:base-devel'
|
||||||
|
run: |
|
||||||
|
sudo pacman -Syu
|
||||||
|
sudo pacman --noconfirm -S cmake boost boost-libs git hidapi libsodium miniupnpc openssl unbound zeromq
|
||||||
|
- name: Checkout Monero Source
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
with:
|
||||||
|
repository: monero-project/monero
|
||||||
|
path: ${{github.workspace}}/monero/
|
||||||
|
submodules: recursive
|
||||||
|
- name: Checkout LWS Source
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
with:
|
||||||
|
path: ${{github.workspace}}/lws
|
||||||
|
- name: Configure LWS
|
||||||
|
run: cmake ${{env.CONFIGURE_BASIC}}
|
||||||
|
- name: Build LWS
|
||||||
|
run: ${{env.BUILD}}
|
||||||
|
- name: Run Tests
|
||||||
|
run: ${{env.RUN}}
|
||||||
|
build-advanced:
|
||||||
runs-on: ${{matrix.os}}
|
runs-on: ${{matrix.os}}
|
||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
@@ -58,16 +94,13 @@ jobs:
|
|||||||
os: [ubuntu-24.04, ubuntu-22.04, macos-15, macos-14]
|
os: [ubuntu-24.04, ubuntu-22.04, macos-15, macos-14]
|
||||||
rmq: [WITH_RMQ=ON, WITH_RMQ=OFF]
|
rmq: [WITH_RMQ=ON, WITH_RMQ=OFF]
|
||||||
steps:
|
steps:
|
||||||
- name: set apt conf (Debian based Linux)
|
- name: Install Dependencies (Ubuntu)
|
||||||
if: matrix.os == 'ubuntu-latest' || matrix.os == 'ubuntu-24.04' || matrix.os == 'ubuntu-22.04'
|
if: matrix.os == 'ubuntu-latest' || matrix.os == 'ubuntu-24.04' || matrix.os == 'ubuntu-22.04'
|
||||||
run: ${{env.APT_SET_CONF}}
|
run: |
|
||||||
- name: update apt (Debian based Linux)
|
${{env.APT_SET_CONF}}
|
||||||
if: matrix.os == 'ubuntu-latest' || matrix.os == 'ubuntu-24.04' || matrix.os == 'ubuntu-22.04'
|
sudo apt update
|
||||||
run: sudo apt update
|
sudo ${{env.APT_INSTALL_LINUX}}
|
||||||
- name: Install dependencies (Debian based Linux)
|
- name: Install RabbitMQ iff WITH_RMQ (Ubuntu)
|
||||||
if: matrix.os == 'ubuntu-latest' || matrix.os == 'ubuntu-24.04' || matrix.os == 'ubuntu-22.04'
|
|
||||||
run: ${{env.APT_INSTALL_LINUX}}
|
|
||||||
- name: Install RabbitMQ iff WITH_RMQ (Debian based Linux)
|
|
||||||
if: matrix.rmq == 'WITH_RMQ=ON' && (matrix.os == 'ubuntu-latest' || matrix.os == 'ubuntu-24.04' || matrix.os == 'ubuntu-22.04')
|
if: matrix.rmq == 'WITH_RMQ=ON' && (matrix.os == 'ubuntu-latest' || matrix.os == 'ubuntu-24.04' || matrix.os == 'ubuntu-22.04')
|
||||||
run: sudo apt -y install librabbitmq-dev
|
run: sudo apt -y install librabbitmq-dev
|
||||||
|
|
||||||
@@ -97,16 +130,13 @@ jobs:
|
|||||||
path: ${{github.workspace}}/lws
|
path: ${{github.workspace}}/lws
|
||||||
|
|
||||||
- name: Configure 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.
|
run: cmake -D${{matrix.rmq}} -DMONERO_BUILD_DIR=${{github.workspace}}/monero/build ${{env.CONFIGURE_BASIC}}
|
||||||
# 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
|
|
||||||
|
|
||||||
- name: Build LWS
|
- name: Build LWS
|
||||||
# Build your program with the given configuration
|
# Build your program with the given configuration
|
||||||
run: (cd ${{github.workspace}}/lws/build && make -j$(nproc))
|
run: ${{env.BUILD}}
|
||||||
|
|
||||||
- name: Run Tests
|
- name: Run Tests
|
||||||
run: cd ${{github.workspace}}/lws/build && ctest
|
run: ${{env.RUN}}
|
||||||
|
|
||||||
build-sanitizer-tests:
|
build-sanitizer-tests:
|
||||||
runs-on: ${{matrix.os}}
|
runs-on: ${{matrix.os}}
|
||||||
strategy:
|
strategy:
|
||||||
@@ -116,16 +146,13 @@ jobs:
|
|||||||
rmq: [WITH_RMQ=ON]
|
rmq: [WITH_RMQ=ON]
|
||||||
sanitizer: [SANITIZER=address]
|
sanitizer: [SANITIZER=address]
|
||||||
steps:
|
steps:
|
||||||
- name: set apt conf (Debian based Linux)
|
- name: Install Dependencies (Ubuntu)
|
||||||
if: matrix.os == 'ubuntu-latest'
|
if: matrix.os == 'ubuntu-latest'
|
||||||
run: ${{env.APT_SET_CONF}}
|
run: |
|
||||||
- name: update apt (Debian based Linux)
|
${{env.APT_SET_CONF}}
|
||||||
if: matrix.os == 'ubuntu-latest'
|
sudo apt update
|
||||||
run: sudo apt update
|
sudo ${{env.APT_INSTALL_LINUX}}
|
||||||
- name: Install dependencies (Debian based Linux)
|
- name: Install RabbitMQ iff WITH_RMQ (Ubuntu)
|
||||||
if: matrix.os == 'ubuntu-latest'
|
|
||||||
run: ${{env.APT_INSTALL_LINUX}}
|
|
||||||
- name: Install RabbitMQ iff WITH_RMQ (Debian based Linux)
|
|
||||||
if: matrix.rmq == 'WITH_RMQ=ON' && (matrix.os == 'ubuntu-latest')
|
if: matrix.rmq == 'WITH_RMQ=ON' && (matrix.os == 'ubuntu-latest')
|
||||||
run: sudo apt -y install librabbitmq-dev
|
run: sudo apt -y install librabbitmq-dev
|
||||||
|
|
||||||
@@ -149,14 +176,8 @@ jobs:
|
|||||||
path: ${{github.workspace}}/lws
|
path: ${{github.workspace}}/lws
|
||||||
|
|
||||||
- name: Configure 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.
|
run: cmake -D${{matrix.rmq}} -D${{matrix.sanitizer}} ${{env.CONFIGURE_BASIC}}
|
||||||
# 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 ${{github.workspace}}/lws -D${{matrix.sanitizer}} -DBUILD_TESTS=ON
|
|
||||||
|
|
||||||
- name: Build LWS
|
- name: Build LWS
|
||||||
# Build your program with the given configuration
|
run: ${{env.BUILD}}
|
||||||
run: (cd ${{github.workspace}}/lws/build && make -j$(nproc))
|
|
||||||
|
|
||||||
- name: Run Tests
|
- name: Run Tests
|
||||||
run: cd ${{github.workspace}}/lws/build && ctest --output-on-failure
|
run: ${{env.RUN}}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user