mirror of
https://github.com/wownero/lwsf-wow.git
synced 2026-10-17 07:21:28 +02:00
Updates to get lwsf building in a mingw (Windows) environment (#6)
This commit is contained in:
@@ -0,0 +1,96 @@
|
||||
name: ci
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ "main", "release-*" ]
|
||||
pull_request:
|
||||
branches: [ "main", "release-*" ]
|
||||
|
||||
env:
|
||||
# Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.)
|
||||
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: |
|
||||
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
|
||||
BREW_INSTALL_MAC: 'HOMEBREW_NO_AUTO_UPDATE=1 brew install boost hidapi openssl zmq libpgm miniupnpc expat libunwind-headers protobuf unbound'
|
||||
CONFIGURE: 'cmake -B "${{github.workspace}}/lwsf/build" -DCMAKE_BUILD_TYPE=Release -DMONERO_SOURCE_DIR="${{github.workspace}}/monero" -DLWSF_MASTER_ENABLE=ON -DLWSF_BUILD_TESTS=ON "${{github.workspace}}/lwsf"'
|
||||
BUILD: 'cmake --build "${{github.workspace}}/lwsf/build" -j$(nproc)'
|
||||
RUN: 'ctest --test-dir "${{github.workspace}}/lwsf/build"'
|
||||
|
||||
jobs:
|
||||
unix-build-and-test:
|
||||
runs-on: ${{matrix.os}}
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
os: [macos-latest, ubuntu-latest]
|
||||
steps:
|
||||
- name: set apt conf (Debian based Linux)
|
||||
if: matrix.os == 'ubuntu-latest'
|
||||
run: ${{env.APT_SET_CONF}}
|
||||
- name: update apt (Debian based Linux)
|
||||
if: matrix.os == 'ubuntu-latest'
|
||||
run: sudo apt update
|
||||
- name: Install dependencies (Debian based Linux)
|
||||
if: matrix.os == 'ubuntu-latest'
|
||||
run: ${{env.APT_INSTALL_LINUX}}
|
||||
- name: Install dependencies (MacOS)
|
||||
if: matrix.os == 'macos-latest'
|
||||
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 LWSF Source
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
path: ${{github.workspace}}/lwsf
|
||||
submodules: recursive
|
||||
- name: Configure LWS
|
||||
run: ${{env.CONFIGURE}}
|
||||
- name: Build LWSF
|
||||
run: ${{env.BUILD}}
|
||||
- name: Run Tests
|
||||
run: ${{env.RUN}}
|
||||
windows-build-and-test:
|
||||
runs-on: windows-latest
|
||||
defaults:
|
||||
run:
|
||||
shell: msys2 {0}
|
||||
strategy:
|
||||
fail-fast: false
|
||||
steps:
|
||||
- name: Install dependencies
|
||||
uses: msys2/setup-msys2@v2
|
||||
with:
|
||||
msystem: MINGW64
|
||||
update: true
|
||||
install: >
|
||||
mingw-w64-x86_64-boost
|
||||
mingw-w64-x86_64-cmake
|
||||
mingw-w64-x86_64-gcc
|
||||
mingw-w64-x86_64-hidapi
|
||||
mingw-w64-x86_64-miniupnpc
|
||||
mingw-w64-x86_64-openssl
|
||||
mingw-w64-x86_64-unbound
|
||||
mingw-w64-x86_64-zeromq
|
||||
- name: Checkout Monero Source
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
repository: monero-project/monero
|
||||
path: ${{github.workspace}}/monero/
|
||||
submodules: recursive
|
||||
- name: Checkout LWSF Source
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
path: ${{github.workspace}}/lwsf
|
||||
submodules: recursive
|
||||
- name: Configure LWS
|
||||
run: ${{env.CONFIGURE}}
|
||||
- name: Build LWSF
|
||||
run: ${{env.BUILD}}
|
||||
- name: Run Tests
|
||||
run: ${{env.RUN}}
|
||||
Reference in New Issue
Block a user