Skip to content

Commit

Permalink
Merge pull request #94 from Goddard-Fortran-Ecosystem/feature/mathomp…
Browse files Browse the repository at this point in the history
…4/update-ci-pflogger

Update CI
  • Loading branch information
tclune authored Jan 19, 2024
2 parents d82a8a4 + 941f17b commit 25a4865
Showing 1 changed file with 52 additions and 33 deletions.
85 changes: 52 additions & 33 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,23 +15,13 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-20.04, ubuntu-22.04, macos-11, macos-12]
compiler: [gfortran-9, gfortran-10, gfortran-11, gfortran-12]
os: [ubuntu-22.04, macos-11, macos-12]
compiler: [gfortran-10, gfortran-11, gfortran-12, gfortran-13]
exclude:
- os: ubuntu-20.04
compiler: gfortran-11
- os: ubuntu-20.04
compiler: gfortran-12
- os: ubuntu-22.04
compiler: gfortran-9
- os: macos-11
compiler: gfortran-12
- os: macos-12
compiler: gfortran-9
compiler: gfortran-13
- os: macos-12
compiler: gfortran-10
- os: macos-12
compiler: gfortran-12

# fail-fast if set to 'true' here is good for production, but when
# debugging, set to 'false'. fail-fast means if *any* ci test in the matrix fails
Expand All @@ -52,37 +42,43 @@ jobs:

name: ${{ matrix.os }} / ${{ matrix.compiler }}
steps:
- name: Install GCC 12 on Ubuntu 22.04
if: matrix.os == 'ubuntu-22.04' && matrix.compiler == 'gfortran-12'
run: |
sudo apt-get install gfortran-12 -y
- name: Compiler Versions
run: |
${FC} --version
cmake --version
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v4
with:
fetch-depth: 1

- name: Set all directories as git safe
run: |
git config --global --add safe.directory '*'
- name: Build GFE Prereqs
run: |
bash ./tools/ci-install-gfe.bash
- name: Build pFlogger
run: |
mkdir -p build
cd build
cmake .. -DCMAKE_Fortran_COMPILER=${FC} -DCMAKE_INSTALL_PREFIX=${HOME}/Software/pFlogger -DCMAKE_PREFIX_PATH=${HOME}/Software/GFE
make -j$(nproc)
- name: Build Tests
run: |
cd build
make -j$(nproc) tests
- name: Run Tests
run: |
cd build
ctest -j1 --output-on-failure --repeat until-pass:4
- name: Archive log files on failure
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v4
if: failure()
with:
name: logfiles
Expand All @@ -93,49 +89,72 @@ jobs:
runs-on: ubuntu-20.04

env:
FC: ifort
CC: icc
FC: ifx
CC: icx

name: Intel Fortran
steps:
- name: Install Intel compilers
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 1

- name: Set all directories as git safe
run: |
git config --global --add safe.directory '*'
- name: Setup Intel oneAPI repository
run: |
cd /tmp
wget https://apt.repos.intel.com/intel-gpg-keys/GPG-PUB-KEY-INTEL-SW-PRODUCTS.PUB
sudo apt-key add GPG-PUB-KEY-INTEL-SW-PRODUCTS.PUB
rm GPG-PUB-KEY-INTEL-SW-PRODUCTS.PUB
sudo add-apt-repository "deb https://apt.repos.intel.com/oneapi all main"
sudo apt install --no-install-recommends intel-oneapi-compiler-fortran intel-oneapi-mpi \
intel-oneapi-compiler-dpcpp-cpp-and-cpp-classic intel-oneapi-mpi-devel
sudo apt-get update
- name: Install Intel oneAPI compilers
timeout-minutes: 5
run: sudo apt-get install intel-oneapi-compiler-fortran intel-oneapi-compiler-dpcpp-cpp

# optional
- name: Install Intel MPI
timeout-minutes: 5
run: sudo apt-get install intel-oneapi-mpi intel-oneapi-mpi-devel

- name: Setup Intel oneAPI environment
run: |
source /opt/intel/oneapi/setvars.sh
printenv >> $GITHUB_ENV
- name: Compiler Versions
printenv | grep intel
- name: Versions
run: |
${FC} --version
${CC} --version
mpirun --version
cmake --version
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 1
- name: Build GFE Prereqs
run: |
bash ./tools/ci-install-gfe.bash
- name: Build pFlogger
run: |
mkdir -p build
cd build
cmake .. -DCMAKE_Fortran_COMPILER=${FC} -DCMAKE_INSTALL_PREFIX=${HOME}/Software/yaFyaml -DCMAKE_PREFIX_PATH=${HOME}/Software/GFE
cmake .. -DCMAKE_Fortran_COMPILER=${FC} -DCMAKE_INSTALL_PREFIX=${HOME}/Software/pFlogger -DCMAKE_PREFIX_PATH=${HOME}/Software/GFE
make -j$(nproc)
- name: Build Tests
run: |
cd build
make -j$(nproc) tests
- name: Run Tests
run: |
cd build
ctest -j1 --output-on-failure --repeat until-pass:4
- name: Archive log files on failure
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v4
if: failure()
with:
name: logfiles
Expand Down

0 comments on commit 25a4865

Please sign in to comment.