Skip to content

Commit

Permalink
Trying to located gfortran
Browse files Browse the repository at this point in the history
  • Loading branch information
makepath-alex committed Nov 27, 2024
1 parent 5148c2d commit 917ebc6
Showing 1 changed file with 14 additions and 16 deletions.
30 changes: 14 additions & 16 deletions .github/workflows/continuous-integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,7 @@ jobs:
- {compiler: gcc, version: 12}
fpmodel: [DP, SP]
env:
# Core variables:
FCFLAGS: "-ffree-line-length-none -m64 -std=f2008 -march=native -fbounds-check -fmodule-private -fimplicit-none -finit-real=nan -g -DRTE_USE_CBOOL"
FP_MODEL: ${{ matrix.fpmodel }}
RTE_KERNELS: default
RRTMGP_DATA_VERSION: v1.8.2
FAILURE_THRESHOLD: 7.e-4
Expand All @@ -43,14 +41,6 @@ jobs:
with:
compiler: ${{ matrix.toolchain.compiler }}
version: ${{ matrix.toolchain.version }}

- name: Add gfortran to PATH
run: |
# Locate gfortran (example assumes MinGW installation)
GFORTRAN_PATH=$(dirname "$(which gfortran)")
echo "Adding gfortran path: $GFORTRAN_PATH"
echo "$GFORTRAN_PATH" >> $GITHUB_PATH
gfortran --version
#
# Relax failure thresholds for single precision
#
Expand Down Expand Up @@ -89,20 +79,28 @@ jobs:
- name: Install dependencies
run: |
conda install -c conda-forge netcdf-fortran -y
- name: Add gfortran's full path
run: |
GFORTRAN_PATH=$(dirname "$(which gfortran)")
echo "FC=$GFORTRAN_PATH/gfortran" >> $GITHUB_ENV
echo "env.FC=$GFORTRAN_PATH/gfortran" >> $GITHUB_ENV
echo "gfortran: ${{ env.FC }}"
${{ env.FC }} --version
#
# Build libraries, examples, and tests
#
- name: Build libraries and tests
run: |
echo "${{ env.FC }}" >> $GITHUB_PATH
cmake -S . -B build \
-DCMAKE_Fortran_COMPILER="${{ env.FC }}" \
-DCMAKE_Fortran_FLAGS="$FCFLAGS" \
-DRRTMGP_DATA_VERSION=$RRTMGP_DATA_VERSION \
-DFP_MODEL=$FP_MODEL \
-DRTE_KERNEL_MODE=$RTE_KERNELS \
-DCMAKE_Fortran_FLAGS="${{ env.FCFLAGS }}" \
-DRRTMGP_DATA_VERSION=${{ env.RRTMGP_DATA_VERSION }} \
-DFP_MODEL=${{ matrix.fpmodel }} \
-DRTE_KERNEL_MODE=${{ env.RTE_KERNELS }} \
-DENABLE_TESTS=ON \
-DFAILURE_THRESHOLD=$FAILURE_THRESHOLD
-DFAILURE_THRESHOLD=${{ env.FAILURE_THRESHOLD }}
cmake --build build --config Release -- -j8
#
# Run examples, tests and checks
Expand Down

0 comments on commit 917ebc6

Please sign in to comment.