116 lines
2.5 KiB
YAML
116 lines
2.5 KiB
YAML
|
|
name: CI
|
|
|
|
on:
|
|
push:
|
|
branches: [ master ]
|
|
pull_request:
|
|
branches: [ master ]
|
|
|
|
jobs:
|
|
build:
|
|
runs-on: ubuntu-latest
|
|
env:
|
|
WITH_CURRENT_SHELL: "nix-shell --argstr compiler ${{matrix.compiler}} --run"
|
|
WITH_SHELL: "nix-shell ../../shell.nix --argstr compiler ${{matrix.compiler}} --run"
|
|
|
|
|
|
strategy:
|
|
matrix:
|
|
compiler:
|
|
- gcc11
|
|
- gcc10
|
|
- gcc9
|
|
- gcc8
|
|
- gcc7
|
|
- gcc6
|
|
- clang13
|
|
- clang12
|
|
- clang11
|
|
- clang10
|
|
- clang9
|
|
- clang8
|
|
- clang7
|
|
- clang6
|
|
- clang5
|
|
|
|
steps:
|
|
- uses: actions/checkout@v2.3.4
|
|
|
|
- name: Install Nix
|
|
uses: cachix/install-nix-action@v15
|
|
with:
|
|
nix_path: nixpkgs=channel:nixos-unstable
|
|
|
|
- name: Install nix dependencies
|
|
run: $WITH_CURRENT_SHELL 'env'
|
|
|
|
- name: Make configure script
|
|
run: $WITH_CURRENT_SHELL 'autoreconf -sfiv'
|
|
|
|
- name: Configure (${{matrix.compiler}})
|
|
run: |
|
|
mkdir -p build/${{matrix.compiler}}
|
|
cd build/${{matrix.compiler}}
|
|
$WITH_SHELL '../../configure'
|
|
|
|
- name: CTF (${{matrix.compiler}})
|
|
run: |
|
|
mkdir -p build/${{matrix.compiler}}
|
|
cd build/${{matrix.compiler}}
|
|
$WITH_SHELL 'make ctf'
|
|
|
|
- name: Make main (${{matrix.compiler}})
|
|
run: |
|
|
mkdir -p build/${{matrix.compiler}}
|
|
cd build/${{matrix.compiler}}
|
|
$WITH_SHELL 'make'
|
|
$WITH_SHELL 'make -C test'
|
|
|
|
- name: Run unit tests (${{matrix.compiler}})
|
|
run: |
|
|
cd build/${{matrix.compiler}}/test
|
|
./main
|
|
|
|
|
|
documentation:
|
|
runs-on: ubuntu-latest
|
|
needs: build
|
|
env:
|
|
WITH_SHELL: "nix-shell --argstr compiler gcc6 --run"
|
|
steps:
|
|
- uses: actions/checkout@v2.3.4
|
|
- name: Install Nix
|
|
uses: cachix/install-nix-action@v15
|
|
with:
|
|
nix_path: nixpkgs=channel:nixos-unstable
|
|
|
|
- name: Configure
|
|
run: |
|
|
${WITH_SHELL} 'autoreconf -sfiv'
|
|
${WITH_SHELL} './configure --enable-docs'
|
|
${WITH_SHELL} 'emacs --version'
|
|
${WITH_SHELL} 'python --version'
|
|
${WITH_SHELL} 'sphinx-build --version'
|
|
|
|
- name: doxygen
|
|
run: |
|
|
cd docs
|
|
${WITH_SHELL} 'make doxygen'
|
|
|
|
- name: sphinx
|
|
run: |
|
|
cd docs
|
|
${WITH_SHELL} 'make sphinx'
|
|
|
|
- name: nojekyll
|
|
run: |
|
|
cd docs/build
|
|
touch .nojekyll
|
|
|
|
- name: Deploy
|
|
uses: JamesIves/github-pages-deploy-action@4.1.0
|
|
with:
|
|
branch: gh-pages
|
|
folder: ./docs/build
|