Skip to content

cmake: use ${CMAKE_CURRENT_SOURCE_DIR} where possible #44

cmake: use ${CMAKE_CURRENT_SOURCE_DIR} where possible

cmake: use ${CMAKE_CURRENT_SOURCE_DIR} where possible #44

Workflow file for this run

name: test
on: [push, pull_request]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: cachix/install-nix-action@v22
with:
nix_path: nixpkgs=channel:nixos-unstable
- uses: cachix/cachix-action@v12
with:
name: arximboldi
signingKey: '${{ secrets.CACHIX_SIGNING_KEY }}'
- run: nix-build
docs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
submodules: true
- uses: cachix/install-nix-action@v22
with:
nix_path: nixpkgs=channel:nixos-unstable
- uses: cachix/cachix-action@v12
with:
name: arximboldi
signingKey: '${{ secrets.CACHIX_SIGNING_KEY }}'
- run: nix-shell --run "mkdir build"
- run: nix-shell --run "cd build && cmake .."
- run: nix-shell --run "cd build && make docs"
- uses: shimataro/ssh-key-action@v2
if: github.ref == 'refs/heads/master'
with:
key: ${{ secrets.SINUSOIDES_SSH_KEY }}
known_hosts: ${{ secrets.SINUSOIDES_KNOWN_HOSTS }}
- run: nix-shell --run "cd build && make upload-docs"
if: github.ref == 'refs/heads/master'
check:
strategy:
matrix:
type: [Debug, Release]
compiler: [gcc, clang]
opts: [[]]
include:
- type: Debug
compiler: gcc
opts: ['coverage']
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: cachix/install-nix-action@v22
with:
nix_path: nixpkgs=channel:nixos-unstable
- uses: cachix/cachix-action@v12
with:
name: arximboldi
signingKey: '${{ secrets.CACHIX_SIGNING_KEY }}'
- run: nix-shell --argstr compiler ${{ matrix.compiler }} --run "mkdir build"
- name: configure cmake
run: |
nix-shell --argstr compiler ${{ matrix.compiler }} --run "
cd build && cmake .. \
-DCMAKE_BUILD_TYPE=${{ matrix.type }} \
-DENABLE_COVERAGE=${{ contains(matrix.opts, 'coverage') }}
"
- run: nix-shell --argstr compiler ${{ matrix.compiler }} --run "cd build && make check -j`nproc`"
- run: nix-shell --argstr compiler ${{ matrix.compiler }} --run "bash <(curl -s https://codecov.io/bash)"
if: ${{ contains(matrix.opts, 'coverage') }}