From e2e44afabbb3211f01bbd4026fd07cee86964729 Mon Sep 17 00:00:00 2001 From: Matthew Thompson Date: Wed, 4 Sep 2024 11:52:37 -0400 Subject: [PATCH] Add flang to CI --- .github/workflows/main.yml | 52 ++++++++++++++++++++++++++++++++++++++ ChangeLog.md | 1 + 2 files changed, 53 insertions(+) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 07b6174..b74c3d7 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -211,3 +211,55 @@ jobs: path: | build/**/*.log + Flang: + runs-on: ubuntu-latest + container: gmao/llvm-flang:latest + env: + FC: flang-new + + name: Flang + steps: + - name: Versions + run: | + ${FC} --version + cmake --version + + - 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: Add python-is-python3 package + run: | + apt-get update + apt-get install -y python-is-python3 + + - name: Build gFTL-shared + run: | + mkdir -p build + cd build + cmake .. -DCMAKE_Fortran_COMPILER=${FC} + make -j4 + + - name: Build Tests + run: | + cd build + make -j4 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@v4 + if: failure() + with: + name: logfiles + path: | + build/**/*.log + diff --git a/ChangeLog.md b/ChangeLog.md index d114539..c960faf 100644 --- a/ChangeLog.md +++ b/ChangeLog.md @@ -13,6 +13,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Update CI to have `gfortran-10` and `gfortran-11` only on `ubuntu-22.04` - Update CI NVIDIA to NVHPC 24.7 +- Add Flang to CI ## [1.9.0] - 2024-07-09