Skip to content

Cross species collisions #2428

Cross species collisions

Cross species collisions #2428

Workflow file for this run

# Based on example from https://github.com/julia-actions/julia-runtest
name: Check examples
on: [push, pull_request, workflow_dispatch]
jobs:
examples:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, macOS-latest]
fail-fast: false
timeout-minutes: 35
steps:
- uses: actions/checkout@v4
- uses: julia-actions/setup-julia@latest
with:
version: '1.10'
- uses: julia-actions/cache@v1
- name: Test examples
run: |
touch Project.toml
julia -O3 --project -e 'import Pkg; Pkg.develop(path="moment_kinetics/"); Pkg.add("NCDatasets"); Pkg.precompile()'
# Reduce nstep for each example to 10 to avoid the CI job taking too long
julia -O3 --project -e 'using moment_kinetics; for (root, dirs, files) in walkdir("examples") for file in files if endswith(file, ".toml") filename = joinpath(root, file); println(filename); input = moment_kinetics.moment_kinetics_input.read_input_file(filename); t_input = get(input, "timestepping", Dict{String,Any}()); t_input["nstep"] = 10; t_input["dt"] = 1.0e-10; pop!(input, "z_nelement_local", ""); pop!(input, "r_nelement_local", ""); run_moment_kinetics(input) end end end'