Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .github/build-ci/data/standard.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"gcc_compiler": "gcc@13.2.0",
"intel_compiler": "intel@2021.10.0",
"oneapi_compiler": "oneapi@2025.2.0",
"target": "x86_64"
}
10 changes: 10 additions & 0 deletions .github/build-ci/manifests/gcc-no-access3.spack.yaml.j2
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
spack:
specs:
- access-cice @git.{{ ref }} ~access3 io_type=PIO
packages:
all:
require:
- '%{{ gcc_compiler }} target={{ target}}'
concretizer:
unify: false
view: false
13 changes: 13 additions & 0 deletions .github/build-ci/manifests/intel-access3.spack.yaml.j2
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
spack:
specs:
- access-cice @git.{{ ref }} +access3 io_type=PIO
packages:
access3-share:
require:
- '@2025.03.2:' #needs https://github.com/ACCESS-NRI/access3-share/pull/9 to work on github runner
all:
require:
- '%{{ intel_compiler }} target={{ target }}'
concretizer:
unify: false
view: false
12 changes: 12 additions & 0 deletions .github/build-ci/manifests/intel-no-access3.spack.yaml.j2
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
spack:
specs:
- access-cice @git.{{ ref }} ~access3 io_type=PIO
- access-cice @git.{{ ref }} ~access3 io_type=NetCDF
- access-cice @git.{{ ref }} ~access3 io_type=Binary
packages:
all:
require:
- '%{{ intel_compiler }} target={{ target }}'
concretizer:
unify: false
view: false
17 changes: 17 additions & 0 deletions .github/build-ci/manifests/oneapi-access3.spack.yaml.j2
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
spack:
specs:
- access-cice @git.{{ ref }} +access3 io_type=PIO build_type=Debug
- access-cice @git.{{ ref }} +access3 io_type=PIO
packages:
access3-share:
require:
- '@2025.03.2:' #needs https://github.com/ACCESS-NRI/access3-share/pull/9 to work on github runner
gcc-runtime:
require:
- '%gcc target={{ target }}'
all:
require:
- '%{{ oneapi_compiler }} target={{ target }}'
concretizer:
unify: false
view: false
16 changes: 16 additions & 0 deletions .github/build-ci/manifests/oneapi-no-access3.spack.yaml.j2
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
spack:
specs:
- access-cice @git.{{ ref }} ~access3 io_type=PIO +openmp
- access-cice @git.{{ ref }} ~access3 io_type=PIO
- access-cice @git.{{ ref }} ~access3 io_type=NetCDF
- access-cice @git.{{ ref }} ~access3 io_type=Binary
packages:
gcc-runtime:
require:
- '%gcc target={{ target }}'
all:
require:
- '%{{ oneapi_compiler }} target={{ target }}'
concretizer:
unify: false
view: false
40 changes: 40 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: Build
on:
pull_request:
push:
branches:
- main
- CICE6.*
jobs:
pre-ci:
name: Pre-CI
runs-on: ubuntu-latest
outputs:
matrix: ${{ steps.set-matrix.outputs.matrix }}
steps:
- uses: actions/checkout@v4

- name: Set up matrix
id: set-matrix
# Find all relevant files under .github/build-ci/manifests
# then output them as a JSON array (minus the last comma)
run: |
files=$(find .github/build-ci/manifests/ -iname '*.j2' -printf '"%p",')
echo "matrix=[${files%,}]" >> $GITHUB_OUTPUT

ci:
name: CI
needs: pre-ci
strategy:
fail-fast: false
max-parallel: 5
matrix:
file: ${{ fromJson(needs.pre-ci.outputs.matrix) }}
uses: access-nri/build-ci/.github/workflows/ci.yml@v2
with:
spack-manifest-path: ${{ matrix.file }}
allow-ssh-into-spack-install: false # If true, PR author must ssh into instance to complete job
spack-manifest-data-path: .github/build-ci/data/standard.json
spack-packages-ref: 498242a86ca5db015403ef80fc0161e44d41223c
# spack-config-ref: main
# spack-ref: main
6 changes: 4 additions & 2 deletions configuration/scripts/cmake/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ if(CICE_ACCESS3)
message(FATAL_ERROR "ESMF interface missing from Access3Share package")
endif()
else()
find_package(MPI REQUIRED)
find_package(MPI REQUIRED COMPONENTS Fortran)
endif()

if(CICE_OPENMP)
Expand Down Expand Up @@ -130,9 +130,11 @@ set(CICE_CORE "${CMAKE_SOURCE_DIR}/../../../cicecore")
set(ICEPACK "${CMAKE_SOURCE_DIR}/../../../icepack")

add_fortran_library(cicelib mod STATIC)
target_compile_definitions(cicelib PRIVATE FORTRANUNDERSCORE)
target_link_libraries(cicelib PUBLIC MPI::MPI_Fortran)

if(CICE_IO MATCHES "^(NetCDF|PIO)$")
target_compile_definitions(cicelib PRIVATE FORTRANUNDERSCORE ncdf)
target_compile_definitions(cicelib PRIVATE ncdf)
target_compile_definitions(cicelib PRIVATE USE_NETCDF)
endif()
if(CICE_ACCESS3)
Expand Down
Loading