Skip to content

Commit

Permalink
Add configurations
Browse files Browse the repository at this point in the history
  • Loading branch information
martin-frbg authored Feb 15, 2024
1 parent 4d375cb commit 478f3bf
Showing 1 changed file with 12 additions and 4 deletions.
16 changes: 12 additions & 4 deletions .github/workflows/apple_m.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,10 @@ jobs:
fail-fast: false
matrix:
build: [cmake, make]


fortran: [gfortran, flang-new]
openmp: [0, 1]
ilp64: [0, 1]

steps:
- name: Checkout repository
uses: actions/checkout@v3
Expand All @@ -43,6 +45,10 @@ jobs:
# It looks like "gfortran" isn't working correctly unless "gcc" is re-installed.
brew reinstall gcc
brew install coreutils cmake ccache
brew install llvm
- export PATH=/opt/homebrew/opt/llvm/bin:$PATH
- export LDFLAGS="-L/opt/homebrew/opt/llvm/lib"
- export CPPFLAGS="-I/opt/homebrew/opt/llvm/include"
else
echo "::error::$RUNNER_OS not supported"
exit 1
Expand All @@ -60,7 +66,7 @@ jobs:
key: ccache-${{ runner.os }}-${{ matrix.build }}-${{ matrix.fortran }}-${{ github.ref }}-${{ github.sha }}
# Restore a matching ccache cache entry. Prefer same branch and same Fortran compiler.
restore-keys: |
ccache-${{ runner.os }}-${{ matrix.build }}-${{ github.ref }}
ccache-${{ runner.os }}-${{ matrix.build }}-${{{matrix.fortran }}-${{ github.ref }}
ccache-${{ runner.os }}-${{ matrix.build }}
- name: Configure ccache
Expand All @@ -86,11 +92,13 @@ jobs:
run: |
case "${{ matrix.build }}" in
"make")
make -j$(nproc) DYNAMIC_ARCH=1 USE_OPENMP=0 FC="ccache ${{ matrix.fortran }}"
make -j$(nproc) DYNAMIC_ARCH=1 USE_OPENMP=${{matrix.openmp}} INTERFACE64=${{matrix.ilp64}} FC="ccache ${{ matrix.fortran }}"
;;
"cmake")
mkdir build && cd build
cmake -DDYNAMIC_ARCH=1 \
-DUSE_OPENMP=${{matrix.openmp}}
-DINTERFACE64=${{matrix.ilp64}}
-DNOFORTRAN=0 \
-DBUILD_WITHOUT_LAPACK=0 \
-DCMAKE_VERBOSE_MAKEFILE=ON \
Expand Down

0 comments on commit 478f3bf

Please sign in to comment.