Skip to content

Commit e279907

Browse files
committed
ci:consolidate with composite
1 parent ac61a46 commit e279907

File tree

4 files changed

+24
-64
lines changed

4 files changed

+24
-64
lines changed

.github/workflows/ci.yml

Lines changed: 20 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -32,14 +32,9 @@ jobs:
3232
FC: gfortran-${{ matrix.gcc-version }}
3333

3434
steps:
35-
36-
- name: install ninja
37-
run: sudo apt install --no-install-recommends ninja-build
38-
3935
- uses: actions/checkout@v4
4036

41-
- run: cmake --workflow --preset debug
42-
- run: cmake --workflow --preset release
37+
- uses: ./.github/workflows/composite-unix
4338

4439

4540
valgrind-memory:
@@ -75,14 +70,27 @@ jobs:
7570
steps:
7671
- uses: actions/checkout@v4
7772

78-
- name: install ninja
79-
run: sudo apt install --no-install-recommends ninja-build
73+
- uses: ./.github/workflows/composite-unix
8074

81-
- run: cmake --workflow --preset debug
82-
- run: cmake --workflow --preset release
8375

84-
- run: cat build/CMakeFiles/CMakeConfigureLog.yaml
85-
if: ${{ failure() }}
76+
mac:
77+
# need Apple Silicon for exception handling try_compile detection to work
78+
runs-on: macos-14
79+
timeout-minutes: 10
80+
81+
strategy:
82+
matrix:
83+
c: [{cc: clang, cxx: clang++}, {cc: gcc-13, cxx: g++-13}]
84+
85+
env:
86+
FC: gfortran-13
87+
CC: ${{ matrix.c.cc }}
88+
CXX: ${{ matrix.c.cxx }}
89+
90+
steps:
91+
- uses: actions/checkout@v4
92+
93+
- uses: ./.github/workflows/composite-unix
8694

8795

8896
windows:

.github/workflows/ci_macos.yml

Lines changed: 0 additions & 40 deletions
This file was deleted.

.github/workflows/composite-unix/action.yml

Lines changed: 4 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -20,23 +20,16 @@ runs:
2020
- name: MacoS GCC workaround
2121
shell: bash
2222
run: sudo xcode-select --switch /Applications/Xcode_15.1.app
23-
if: runner.os == 'macOS' && ${{ env.CC == 'gcc-13' }}
23+
if: runner.os == 'macOS' && env.CC == 'gcc-13'
2424
# https://docs.brew.sh/Xcode
2525
# https://github.com/Homebrew/brew/blob/HEAD/Library/Homebrew/os/mac/xcode.rb#L20
2626

27-
- run: cmake --preset multi
27+
- run: cmake --workflow --preset debug
2828
shell: bash
2929

30-
- run: cat build/CMakeFiles/CMakeConfigureLog.yaml
31-
shell: bash
32-
if: ${{ failure() }}
33-
34-
- run: cmake --build --preset release
30+
- run: cmake --workflow --preset release
3531
shell: bash
3632

37-
- run: cmake --build --preset release --parallel 1
38-
shell: bash
33+
- run: cat build/CMakeFiles/CMakeConfigureLog.yaml
3934
if: ${{ failure() }}
40-
41-
- run: ctest --preset release
4235
shell: bash

README.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
# Interoperability examples between C, C++ and Fortran
22

33
[![ci](https://github.com/scivision/fortran-cpp-interface/actions/workflows/ci.yml/badge.svg)](https://github.com/scivision/fortran-cpp-interface/actions/workflows/ci.yml)
4-
[![ci_macos](https://github.com/scivision/fortran-cpp-interface/actions/workflows/ci_macos.yml/badge.svg)](https://github.com/scivision/fortran-cpp-interface/actions/workflows/ci_macos.yml)
54
[![oneapi-linux](https://github.com/scivision/fortran-cpp-interface/actions/workflows/oneapi-linux.yml/badge.svg)](https://github.com/scivision/fortran-cpp-interface/actions/workflows/oneapi-linux.yml)
65

76
Fortran subroutines and functions are easily called from C and C++.

0 commit comments

Comments
 (0)