diff --git a/.github/build-ci/data/standard.json b/.github/build-ci/data/standard.json new file mode 100644 index 0000000..616c3c3 --- /dev/null +++ b/.github/build-ci/data/standard.json @@ -0,0 +1,5 @@ +{ + "gcc_compiler": "gcc@13.2.0", + "intel_compiler": "intel@2021.10.0", + "target": "x86_64" +} diff --git a/.github/build-ci/manifests/intel-libaccessom2.spack.yaml.j2 b/.github/build-ci/manifests/intel-libaccessom2.spack.yaml.j2 new file mode 100644 index 0000000..897f108 --- /dev/null +++ b/.github/build-ci/manifests/intel-libaccessom2.spack.yaml.j2 @@ -0,0 +1,30 @@ +# Building OASIS3-mct stand-alone using access-esm1.5 spack version +spack: + specs: + - 'libaccessom2@git.{{ ref }}=access-om2' + packages: + oasis3-mct: + require: + - '@git.2023.11.09=access-om2' + openmpi: + require: + - '@4.0.2' + netcdf-c: + require: + - '@4.7.4' + netcdf-fortran: + require: + - '@4.5.2' + parallelio: + require: + - '@2.5.2' + gcc-runtime: + require: + - '%gcc target={{ target }}' + all: + require: + - '%{{ intel_compiler }}' + - 'target={{ target }}' + concretizer: + unify: false + view: false \ No newline at end of file diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..291304f --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,39 @@ +name: Build +on: + pull_request: + push: + branches: + - main +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: main + # spack-config-ref: main + # spack-ref: releases/v0.22 \ No newline at end of file diff --git a/.github/workflows/model-build-test-ci.yml b/.github/workflows/model-build-test-ci.yml deleted file mode 100644 index eda2217..0000000 --- a/.github/workflows/model-build-test-ci.yml +++ /dev/null @@ -1,15 +0,0 @@ -name: Test model build - -on: - workflow_dispatch: - pull_request: - push: - branches: - - "master" - -jobs: - build: - name: Build ${{ github.repository }} via spack - uses: access-nri/build-ci/.github/workflows/model-1-build.yml@main - permissions: - packages: read diff --git a/.gitignore b/.gitignore index 7170d46..e75fed9 100644 --- a/.gitignore +++ b/.gitignore @@ -4,7 +4,6 @@ __pycache__ *.pyc .swo .cache -build* building-errors.log debug.root.01 debug.01.000000 diff --git a/.gitmodules b/.gitmodules deleted file mode 100644 index e69de29..0000000