atrip/.github/workflows/main.yml

102 lines
2.2 KiB
YAML

name: CI
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
build:
runs-on: ubuntu-latest
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
env:
WITH_SHELL: "nix-shell --argstr compiler ${{matrix.compiler}} --run"
run: ${WITH_SHELL} 'env'
- name: Make configure script
env:
WITH_SHELL: "nix-shell --argstr compiler ${{matrix.compiler}} --run"
run: ${WITH_SHELL} 'autoreconf -sfiv'
- name: Compiler ${{matrix.compiler}}
env:
WITH_SHELL: "nix-shell ../../shell.nix --argstr compiler ${{matrix.compiler}} --run"
run: |
mkdir -p build/${{matrix.compiler}}
cd build/${{matrix.compiler}}
$WITH_SHELL '../../configure'
$WITH_SHELL 'make ctf'
$WITH_SHELL 'make'
documentation:
runs-on: ubuntu-latest
needs: build
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
env:
WITH_SHELL: "nix-shell --argstr compiler gcc6 --run"
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
nix-shell --run 'make doxygen'
- name: sphinx
run: |
cd docs
nix-shell --run '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