-
Notifications
You must be signed in to change notification settings - Fork 71
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Ubuntu/gfortran CI for debugging; separate Conda-style builds (#360)
Sets up mutli-platform CI for builds using gfortran from conda to mimic conda-build; simplifies Ubuntu CI but still exercises double/single precision and default/accelerator kernels. Closes #358, #359, #362
- Loading branch information
1 parent
0c51fa2
commit e698a9e
Showing
5 changed files
with
112 additions
and
109 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,84 @@ | ||
name: Conda-compatible builds | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
pull_request: | ||
workflow_dispatch: | ||
|
||
defaults: | ||
run: | ||
# Enable Conda environment by using the login shell: | ||
shell: bash -leo pipefail {0} | ||
|
||
jobs: | ||
CI: | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
os: [ubuntu-24.04, macos-13, macos-latest, windows-2022] | ||
build-type: [RelWithDebugInfo] | ||
env: | ||
FC: gfortran | ||
CMAKE_BUILD_PARALLEL_LEVEL: 8 | ||
VERBOSE: | ||
CTEST_PARALLEL_LEVEL: 8 | ||
CTEST_OUTPUT_ON_FAILURE: 1 | ||
runs-on: ${{ matrix.os }} | ||
steps: | ||
# | ||
# Check out repository under $GITHUB_WORKSPACE | ||
# | ||
- name: Check out code | ||
uses: actions/checkout@v4 | ||
# | ||
# Cache Conda packages | ||
# | ||
- name: Cache Conda packages | ||
uses: actions/cache@v4 | ||
with: | ||
path: ~/conda_pkgs_dir | ||
key: conda-pkgs-${{ matrix.os }} | ||
# | ||
# Set up Conda | ||
# | ||
- name: Set up Conda (testing scripts only) | ||
uses: conda-incubator/setup-miniconda@v3 | ||
with: | ||
miniforge-version: latest | ||
activate-environment: rte_rrtmgp_test | ||
environment-file: environment-noplots.yml | ||
python-version: 3.11 | ||
auto-activate-base: false | ||
conda-remove-defaults: true | ||
# Use the cache properly: | ||
use-only-tar-bz2: false | ||
# | ||
# Install compiler and dependencies | ||
# | ||
- name: Install compiler, dependencies | ||
run: | | ||
conda install -c conda-forge "${FC}" netcdf-fortran ninja -y | ||
# | ||
# Adjust toolchain | ||
# | ||
- name: Adjust Windows toolchain | ||
if: matrix.os == 'windows-2022' | ||
run: echo "FC=${FC}.exe" >> "$GITHUB_ENV" | ||
# | ||
# Build libraries, examples, and tests | ||
# | ||
- name: Build libraries and tests | ||
run: | | ||
cmake -S . -B build -G "Ninja" \ | ||
-DCMAKE_BUILD_TYPE=${{ matrix.build-type}} \ | ||
-DRTE_ENABLE_SP=OFF \ | ||
-DBUILD_TESTING=ON | ||
cmake --build build | ||
# | ||
# Run examples, tests and checks | ||
# | ||
- name: Run examples, tests and checks | ||
working-directory: build | ||
run: ctest |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters