C interface #173
Workflow file for this run
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: CMake build | |
on: [push, pull_request] | |
permissions: | |
contents: read | |
jobs: | |
cmake-main: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [ubuntu-latest, macos-latest] | |
toolchain: | |
- {compiler: gcc, version: 11, cflags: '-Wall -Werror', fflags: '-Wall -Wextra -Wpedantic -pedantic -fimplicit-none -frecursive -fcheck=all -fstack-check -Wno-function-elimination'} | |
- {compiler: intel-classic, version: '2021.9', cflags: '-diag-disable=10441', fflags: '-warn all -debug extended -fimplicit-none -standard-semantics -assume recursion'} | |
include: | |
- os: ubuntu-latest | |
toolchain: {compiler: intel, version: '2023.1', cflags: '', fflags: '-warn all -debug extended -fimplicit-none -standard-semantics -assume recursion'} | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: awvwgk/setup-fortran@v1 | |
id: setup-fortran | |
with: | |
compiler: ${{ matrix.toolchain.compiler }} | |
version: ${{ matrix.toolchain.version }} | |
- name: Build | |
run: | | |
cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo -DCMAKE_INSTALL_PREFIX=. -LAH -DCMAKE_C_FLAGS="${{ matrix.toolchain.cflags }}" -DCMAKE_Fortran_FLAGS="${{ matrix.toolchain.fflags }}" . | |
cmake --build . --target install --parallel 4 | |
ctest --output-on-failure -V | |
env: | |
FC: ${{ steps.setup-fortran.outputs.fc }} | |
cmake-other: | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
toolchain: | |
- {compiler: aflang, cflags: '-Wall', fflags: '-pedantic -Weverything -Wall -Wextra -Minform=warn -Mstandard -Mrecursive'} | |
- {compiler: nvfortran, cflags: '-Wall', fflags: '-C -Wall -Wextra -Minform=warn -Mstandard -Mrecursive -Mbounds -Mchkstk -Mchkptr'} | |
- {compiler: flang, cflags: '-Wall', fflags: '-pedantic -Weverything -Wall -Wextra'} | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
submodules: true | |
- name: Install AOCC | |
if: ${{ matrix.toolchain.compiler == 'aflang' }} | |
run: bash .github/scripts/install_aocc | |
- name: Install nvfortran | |
if: ${{ matrix.toolchain.compiler == 'nvfortran' }} | |
run: bash .github/scripts/install_nvfortran | |
- name: Install Flang | |
if: ${{ matrix.toolchain.compiler == 'flang' }} | |
run: bash .github/scripts/install_flang | |
- name: Build | |
run: | | |
cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo -DCMAKE_INSTALL_PREFIX=. -LAH -DCMAKE_C_FLAGS="${{ matrix.toolchain.cflags }}" -DCMAKE_Fortran_FLAGS="${{ matrix.toolchain.fflags }}" . | |
cmake --build . --target install --parallel 4 | |
# cobyla test does not pass on AOCC: https://github.com/libprima/prima/issues/41 | |
ctest --output-on-failure -V -E cobyla | |
env: | |
FC: ${{ matrix.toolchain.compiler }} |