-
Notifications
You must be signed in to change notification settings - Fork 4
30 lines (27 loc) · 1.15 KB
/
examples.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
# Based on example from https://github.com/julia-actions/julia-runtest
name: Check examples
on: [push, pull_request]
jobs:
examples:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, macOS-latest]
fail-fast: false
timeout-minutes: 25
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
- uses: julia-actions/setup-julia@v1
with:
version: '1.8'
arch: x64
- uses: julia-actions/julia-buildpkg@v1
env:
# Use the system Python for PyCall - avoids library linking error on macOS
PYTHON: "${{ env.pythonLocation }}/bin/python"
- name: Test examples
run: |
pip3 install --user matplotlib
# Reduce nstep for each example to 10 to avoid the CI job taking too long
julia --project -O3 -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); input["nstep"] = 10; run_moment_kinetics(input) end end end'