mirror of
https://github.com/aljazceru/lightning.git
synced 2026-01-13 02:54:24 +01:00
We want to compile with one set of dependencies, and run the tests with another. This also helps us cut down on the times we compile CLN itself, by sharing them among stages, and simplifies the logic of each stage to have one specific goal.
117 lines
3.2 KiB
YAML
117 lines
3.2 KiB
YAML
---
|
|
name: Continuous Integration
|
|
on:
|
|
push:
|
|
branches:
|
|
- "master"
|
|
pull_request:
|
|
|
|
jobs:
|
|
prebuild:
|
|
name: Pre-build checks
|
|
runs-on: ubuntu-20.04
|
|
env:
|
|
RUST: 1
|
|
COMPAT: 1
|
|
strategy:
|
|
fail-fast: true
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v3
|
|
|
|
- name: Set up Python 3.7
|
|
uses: actions/setup-python@v4
|
|
with:
|
|
python-version: 3.7
|
|
|
|
- name: Install dependencies
|
|
run: |
|
|
bash -x .github/scripts/setup.sh
|
|
pip install -U pip wheel poetry
|
|
# Export and then use pip to install into the current env
|
|
poetry export -o /tmp/requirements.txt --without-hashes --with dev
|
|
pip install -r /tmp/requirements.txt
|
|
- name: Run checks
|
|
run: |
|
|
./configure
|
|
make -j 4 check-source
|
|
make -j 4 check-units
|
|
make -j 4 check-gen-updated
|
|
make -j 4 check-doc
|
|
make -j 4 installcheck
|
|
|
|
compile:
|
|
name: Compile CLN ${{ matrix.cfg }}
|
|
runs-on: ubuntu-20.04
|
|
env:
|
|
COMPAT: 1
|
|
needs:
|
|
- prebuild
|
|
strategy:
|
|
fail-fast: true
|
|
matrix:
|
|
include:
|
|
- CFG: gcc-dev1-exp1
|
|
DEVELOPER: 1
|
|
EXPERIMENTAL_FEATURES: 1
|
|
COMPILER: gcc
|
|
- CFG: gcc-dev1-exp0
|
|
DEVELOPER: 1
|
|
EXPERIMENTAL_FEATURES: 0
|
|
COMPILER: gcc
|
|
- CFG: gcc-dev0-exp1
|
|
DEVELOPER: 0
|
|
EXPERIMENTAL_FEATURES: 1
|
|
COMPILER: gcc
|
|
- CFG: gcc-dev0-exp0
|
|
DEVELOPER: 0
|
|
EXPERIMENTAL_FEATURES: 0
|
|
COMPILER: gcc
|
|
# While we're at it let's try to compile with clang
|
|
- CFG: clang-dev1-exp1
|
|
DEVELOPER: 1
|
|
EXPERIMENTAL_FEATURES: 1
|
|
COMPILER: clang
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v3
|
|
|
|
- name: Set up Python 3.7
|
|
uses: actions/setup-python@v4
|
|
with:
|
|
python-version: 3.7
|
|
|
|
- name: Install dependencies
|
|
run: |
|
|
bash -x .github/scripts/setup.sh
|
|
|
|
- name: Build
|
|
env:
|
|
VALGRIND: ${{ matrix.VALGRIND }}
|
|
DEVELOPER: ${{ matrix.DEVELOPER }}
|
|
EXPERIMENTAL_FEATURES: ${{ matrix.EXPERIMENTAL_FEATURES }}
|
|
COMPILER: ${{ matrix.COMPILER }}
|
|
COMPAT: 1
|
|
CFG: ${{ matrix.CFG }}
|
|
run: |
|
|
set -e
|
|
export SLOW_MACHINE=1
|
|
|
|
pip3 install --user pip wheel poetry
|
|
poetry export -o requirements.txt --with dev --without-hashes
|
|
python3 -m pip install -r requirements.txt
|
|
./configure CC="$COMPILER"
|
|
|
|
# We'll need lowdown, not present on ubuntu:20.04 yet
|
|
make -j $(nproc) doc-all # Builds lowdown as a dependency
|
|
make -j $(nproc) DESTDIR=${GITHUB_WORKSPACE}/cln-${{ matrix.CFG }} install
|
|
|
|
# The above leaves the binaries installed in
|
|
# cln-${matrix.CFG}, let's package it up and store it.
|
|
|
|
tar -cvzf /tmp/cln-${CFG}.tar.gz cln-${CFG}
|
|
- uses: actions/upload-artifact@v3
|
|
with:
|
|
name: cln-${{ matrix.CFG }}.tar.gz
|
|
path: /tmp/cln-${{ matrix.CFG }}.tar.gz
|