Skip to content

Add OS Papa with OSPapaPrescribedAtmosphere and OSPapaPrescribedFluxes #705

Add OS Papa with OSPapaPrescribedAtmosphere and OSPapaPrescribedFluxes

Add OS Papa with OSPapaPrescribedAtmosphere and OSPapaPrescribedFluxes #705

Workflow file for this run

name: CI
on:
pull_request:
paths: &paths
- ".github/workflows/ci.yml"
- "ext/**"
- "src/**"
- "test/**"
- "Project.toml"
push:
paths: *paths
branches:
- main
tags: "*"
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
# needed to allow julia-actions/cache to delete old caches that it has created
permissions:
actions: write
contents: read
env:
ECCO_USERNAME: ${{ secrets.ECCO_USERNAME }}
ECCO_WEBDAV_PASSWORD: ${{ secrets.ECCO_WEBDAV_PASSWORD }}
COPERNICUS_USERNAME: ${{ secrets.COPERNICUS_SERVICE_USERNAME }}
COPERNICUS_PASSWORD: ${{ secrets.COPERNICUS_USERNAME_PASSWORD }}
CDSAPI_URL: "https://cds.climate.copernicus.eu/api"
CDSAPI_KEY: ${{ secrets.CDSAPI_KEY }}
DATADEPS_ALWAYS_ACCEPT: true
JULIA_PKG_SERVER_REGISTRY_PREFERENCE: 'eager'
#####
##### CPU tests (GitHub-hosted runners)
#####
jobs:
cpu_tests:
name: (CPU) - Julia ${{ matrix.version }}
runs-on: ${{ matrix.os }}
timeout-minutes: 120
strategy:
fail-fast: false
matrix:
version:
- "1.12.5"
os:
- ubuntu-latest
arch:
- "default"
steps:
- name: Show available storage before cleanup
run: |
echo " --> df -h /"
df -h /
echo " --> df -a /"
df -a /
- name: Free Disk Space
uses: jlumbroso/free-disk-space@54081f138730dfa15788a46383842cd2f914a1be # v1.3.1
with:
tool-cache: true
large-packages: false
- name: Cleanup /opt
run: |
sudo rm -rf /opt/*
- name: Show available storage after cleanup
run: |
echo " --> df -h /"
df -h /
echo " --> df -a /"
df -a /
- uses: actions/checkout@v6
- uses: julia-actions/setup-julia@v2
with:
version: ${{ matrix.version }}
arch: ${{ matrix.arch }}
- uses: julia-actions/cache@v3
with:
cache-scratchspaces: false
- uses: julia-actions/julia-runtest@v1
with:
test_args: '--verbose'
- uses: julia-actions/julia-processcoverage@v1
- uses: codecov/codecov-action@v5
with:
files: lcov.info
token: ${{ secrets.CODECOV_TOKEN }}
#####
##### GPU tests (AWS self-hosted runners with Docker)
#####
gpu_tests:
name: (GPU)
runs-on: aws-linux-nvidia-gpu-l4
container:
image: ghcr.io/numericalearth/numerical-earth-docker-images:test-julia_1.12.5
options: --gpus=all
volumes:
# Mount host `/usr/local` so that we can delete some stuff afterwards
- /usr/local:/host-usr-local
timeout-minutes: 120
strategy:
fail-fast: false
env:
GPU_TEST: "true"
OPENBLAS_NUM_THREADS: 1
# Redirect temp to the workspace volume (bind-mounted from the
# host's EBS disk) to avoid filling the container's overlay filesystem with
# large data downloads and compiled artifacts.
TMPDIR: /__w/_temp
JULIA_DEPOT_PATH: '/__w/_temp/depot:/usr/local/share/julia:'
steps:
- uses: actions/checkout@v6
- name: Create workspace temp directories
run: mkdir -p "${TMPDIR}"
- name: Configure git safe directory
run: git config --global --add safe.directory ${PWD}
- name: Copy LocalPreferences
run: cp -v /usr/local/share/julia/environments/numericalearth/LocalPreferences.toml test/.
- name: df before cleanup
run: |
df -hT
- name: Clean up old CUDA toolkits
# Save storage by deleting old CUDA toolkits, we'll use v13
run: |
rm -rf /host-usr-local/cuda-12.*
- name: df after cleanup
run: |
df -hT
- name: Update registry
shell: julia --color=yes {0}
run: |
using Pkg
Pkg.Registry.rm("General")
Pkg.Registry.add("General")
Pkg.Registry.update()
- name: Run tests
run: |
earlyoom -m 3 -s 100 -r 300 --prefer 'julia' &
julia --project --color=yes --check-bounds=yes -e '
using Pkg;
Pkg.test(; coverage=true,
julia_args=["--check-bounds=yes", "--compiled-modules=yes", "-O0"],
test_args=["--verbose"])
'
- uses: julia-actions/julia-processcoverage@v1
- uses: codecov/codecov-action@v5
with:
files: lcov.info
token: ${{ secrets.CODECOV_TOKEN }}
#####
##### Specialized tests (GitHub-hosted runners)
#####
cds_downloading:
name: Data Downloading - Julia ${{ matrix.version }} - ${{ matrix.os }} - ${{ matrix.arch }} - ${{ github.event_name }}
runs-on: ${{ matrix.os }}
timeout-minutes: 60
strategy:
fail-fast: false
matrix:
version:
- "1.12.5"
os:
- ubuntu-latest
arch:
- default
include:
- os: macOS-latest
arch: aarch64
version: "1.12.5"
steps:
- uses: actions/checkout@v6
- uses: julia-actions/setup-julia@v2
with:
version: ${{ matrix.version }}
arch: ${{ matrix.arch }}
- uses: julia-actions/cache@v3
with:
cache-scratchspaces: false
- name: Run tests
run: |
julia --project --color=yes --check-bounds=yes -e '
using Pkg;
Pkg.test(; coverage=true,
julia_args=["--check-bounds=yes", "--compiled-modules=yes", "-O0"],
test_args=["--verbose", "test_cds_downloading", "test_downloading"])
'
- uses: julia-actions/julia-processcoverage@v1
- uses: codecov/codecov-action@v5
with:
files: lcov.info
token: ${{ secrets.CODECOV_TOKEN }}
reactant:
name: Reactant extension - Julia ${{ matrix.version }} - ${{ matrix.os }} - ${{ matrix.arch }} - ${{ github.event_name }}
runs-on: ${{ matrix.os }}
timeout-minutes: 80
strategy:
fail-fast: false
matrix:
version:
- "1.11.9"
os:
- ubuntu-latest
arch:
- default
steps:
- uses: actions/checkout@v6
- uses: julia-actions/setup-julia@v2
with:
version: ${{ matrix.version }}
arch: ${{ matrix.arch }}
- uses: julia-actions/cache@v3
with:
cache-scratchspaces: false
- name: Run tests
run: |
julia --project --color=yes --check-bounds=yes -e '
using Pkg;
Pkg.test(; coverage=true,
julia_args=["--check-bounds=yes", "--compiled-modules=yes", "-O0"],
test_args=["--verbose", "test_reactant"])
'
- uses: julia-actions/julia-processcoverage@v1
- uses: codecov/codecov-action@v5
with:
files: lcov.info
token: ${{ secrets.CODECOV_TOKEN }}
#####
##### Distributed MPI tests (GitHub-hosted runners)
#####
# distributed_tests:
# name: Distributed MPI tests (4 ranks)
# runs-on: ubuntu-latest
# timeout-minutes: 60
# env:
# OPENBLAS_NUM_THREADS: 1
# JULIA_NUM_PRECOMPILE_TASKS: 8
# steps:
# - uses: actions/checkout@v6
# - uses: julia-actions/setup-julia@v2
# with:
# version: '1.12.5'
# - name: Instantiate and precompile
# shell: julia --project --color=yes {0}
# run: |
# using Pkg
# Pkg.instantiate(verbose=true)
# Pkg.precompile(strict=true)
# - name: Install mpiexecjl
# run: julia --project --color=yes -e 'using MPI; MPI.install_mpiexecjl(destdir=".")'
# - name: Run distributed tests
# env:
# TEST_GROUP: distributed
# run: ./mpiexecjl -np 4 julia --project --color=yes -e 'using Pkg; Pkg.test()'
#####
##### The final test (a final check)
#####
ci:
name: CI
needs:
- cpu_tests
- gpu_tests
- cds_downloading
- reactant
runs-on: ubuntu-latest
if: ${{ success() }}
steps:
- run: echo "All CI jobs passed successfully."