Introduce initial Nix packaging #242
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: C-language CI | |
on: | |
push: | |
branches: [ develop ] | |
pull_request: | |
branches: [ develop ] | |
env: | |
SDL: 1 | |
JIT: 1 | |
ICARUS: 1 | |
CTEST_OUTPUT_ON_FAILURE: 1 | |
jobs: | |
coverage: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Set up Homebrew | |
id: set-up-homebrew | |
uses: Homebrew/actions/setup-homebrew@master | |
- run: brew install bison expect icarus-verilog lcov | |
- if: env.SDL != 0 | |
run: brew install sdl2 sdl2_image | |
- uses: actions/checkout@v3 | |
with: | |
submodules: true | |
- run: | | |
./scripts/build-lightning.sh 2.1.3 $HOME/local | |
echo "C_INCLUDE_PATH=$HOME/local/include" >> $GITHUB_ENV | |
echo "LIBRARY_PATH=$HOME/local/lib" >> $GITHUB_ENV | |
echo "LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$HOME/local/lib" >> $GITHUB_ENV | |
- name: make coverage | |
run: unbuffer make coverage | |
timeout-minutes: 10 | |
- uses: codecov/codecov-action@v2 | |
build: | |
strategy: | |
matrix: | |
os: | |
- ubuntu-latest | |
- macos-latest | |
runs-on: ${{ matrix.os }} | |
steps: | |
- name: Set up Homebrew | |
id: set-up-homebrew | |
uses: Homebrew/actions/setup-homebrew@master | |
- run: brew upgrade || true # Avoid failures due to incomplete links. | |
- run: brew install bison expect icarus-verilog | |
- if: runner.os == 'macOS' | |
run: echo "/usr/local/opt/bison/bin" >> $GITHUB_PATH | |
- if: env.SDL != 0 | |
run: | | |
brew install sdl2 sdl2_image | |
- uses: actions/checkout@v3 | |
with: | |
submodules: true | |
- if: env.JIT != 0 | |
run: | | |
./scripts/build-lightning.sh 2.1.3 $HOME/local | |
echo "C_INCLUDE_PATH=$HOME/local/include" >> $GITHUB_ENV | |
echo "LIBRARY_PATH=$HOME/local/lib" >> $GITHUB_ENV | |
echo "LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$HOME/local/lib" >> $GITHUB_ENV | |
- name: make | |
run: make -j | |
timeout-minutes: 5 | |
- uses: actions/upload-artifact@v2 | |
with: | |
path: build/ | |
name: builddir-${{ matrix.os }} | |
- name: make check | |
run: unbuffer make check | |
timeout-minutes: 10 | |