Skip to content

fix: Permissions for config.ini #509

fix: Permissions for config.ini

fix: Permissions for config.ini #509

Workflow file for this run

# Copyright (c) 2023, DyssolTEC.
# All rights reserved. This file is part of Dyssol. See LICENSE file for license information.
# A workflow for testing on Linux
name: Linux
on: [push]
jobs:
build:
name: ${{ matrix.name }}
runs-on: ubuntu-latest
strategy:
matrix:
include:
- name: linux-gcc
os: linux
cxx: g++
cxxflags: ""
linker_flags: ""
build_type: Release
- name: linux-gcc-san
os: linux
cxx: g++
cxxflags: "-fno-omit-frame-pointer -fsanitize=address -fsanitize=undefined -fsanitize=leak"
linker_flags: "-fno-omit-frame-pointer -fsanitize=address -fsanitize=leak"
build_type: RelWithDebInfo
- name: linux-clang
os: linux
cxx: clang++
cxxflags: ""
linker_flags: ""
build_type: Release
- name: linux-clang-san
os: linux
cxx: clang++
cxxflags: "-fno-omit-frame-pointer -fsanitize=address -fsanitize=undefined -fsanitize=leak"
linker_flags: "-fno-omit-frame-pointer -fsanitize=address -fsanitize=leak"
build_type: RelWithDebInfo
steps:
- uses: actions/checkout@v4
- name: Install build dependencies
run: sudo add-apt-repository ppa:gladky-anton/sundials && sudo apt-get install build-essential libsundials-dev libhdf5-serial-dev libqt5opengl5-dev libgraphviz-dev
- name: Create build environment
run: cmake -E make_directory ${{github.workspace}}/build
- name: Create install environment
run: cmake -E make_directory ${{github.workspace}}/install
- name: Configure CMake
shell: bash
working-directory: ${{github.workspace}}/build
run: cmake $GITHUB_WORKSPACE -DCMAKE_CXX_COMPILER=${{ matrix.cxx }} -DCMAKE_BUILD_TYPE=${{ matrix.build_type }} -DCMAKE_CXX_FLAGS="${{ matrix.cxxflags }}" -DCMAKE_EXE_LINKER_FLAGS="${{ matrix.linker_flags }}" -DCMAKE_SHARED_LINKER_FLAGS="${{ matrix.linker_flags }}" -DCMAKE_INSTALL_PREFIX=${{github.workspace}}/install -DBUILD_DOCS=NO
- name: Build
working-directory: ${{github.workspace}}/build
shell: bash
run: cmake --build . --parallel $(nproc)
- name: Install
working-directory: ${{github.workspace}}/build
shell: bash
run: make install
- name: Test
working-directory: ${{github.workspace}}/build
shell: bash
run: CTEST_OUTPUT_ON_FAILURE=1 make test ARGS=-j$(nproc)
docs:
name: Docs
runs-on: ubuntu-latest
needs: build
steps:
- uses: actions/checkout@v4
- name: Install build doc dependencies
run: sudo apt-get install doxygen graphviz python3-sphinx python3-sphinx-rtd-theme python3-breathe texlive-latex-extra
- name: Create build environment
run: cmake -E make_directory ${{github.workspace}}/build
- name: Create install environment
run: cmake -E make_directory ${{github.workspace}}/install
- name: Configure CMake
shell: bash
working-directory: ${{github.workspace}}/build
run: cmake $GITHUB_WORKSPACE -DCMAKE_INSTALL_PREFIX=${{github.workspace}}/install -DBUILD_BINARIES=NO -DBUILD_TESTS=NO
- name: Build docs
working-directory: ${{github.workspace}}/build
shell: bash
run: make doc
- name: Install docs
if: ${{ github.ref == 'refs/heads/master' }}
working-directory: ${{github.workspace}}/build
shell: bash
run: make install
- name: Deploy docs
if: ${{ github.ref == 'refs/heads/master' }}
uses: JamesIves/github-pages-deploy-action@v4
with:
branch: gh-pages # The branch the action should deploy to.
folder: ${{github.workspace}}/install/share/Dyssol/docs/sphinx/html # The folder the action should deploy.
single-commit: true