-
Notifications
You must be signed in to change notification settings - Fork 1
66 lines (62 loc) · 1.73 KB
/
julia.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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
name: Julia
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
env:
JULIA_CI: "true"
JULIA_COLOR: "yes"
on:
push:
branches:
- main
- epic/*
- "[0-9]+.[0-9]+.x"
paths:
- "**.jl"
- "**/Manifest.toml"
- "**/Project.toml"
- "!**/exportnotebooks.jl"
pull_request:
branches:
- main
- epic/*
- "[0-9]+.[0-9]+.x"
paths:
- "**.jl"
- "**/Manifest.toml"
- "**/Project.toml"
- "!**/exportnotebooks.jl"
jobs:
build:
name: Run scripts
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4
- name: Extract locked Julia version
id: extract-version
run: |
VERSION=$(grep 'julia_version = ' julia/Manifest.toml | head -n 1 | cut -d '"' -f 2)
echo "version=$VERSION" | tee -a $GITHUB_OUTPUT
- uses: julia-actions/setup-julia@v2
with:
version: ${{ steps.extract-version.outputs.version }}
- name: Fetch Julia cache
uses: actions/cache@v4
with:
key: |
julia-${{hashFiles('julia/Manifest.toml')}}-${{hashFiles('**/*.jl')}}
restore-keys: |
julia-${{hashFiles('julia/Manifest.toml')}}
julia
path: |
./julia-*/
~/.julia/
- run: julia --project=. -e 'using Pkg; Pkg.instantiate()'
working-directory: julia/
- name: Run scripts in julia directory
run: |
for script in notebooks/*.jl scripts/*.jl; do
echo -e "\n\n\033[34m--== Running $script ==--\033[0m\n"
julia --color=yes --project=. "$script" && echo -e "\033[32m SUCCESS\033[0m"
done
working-directory: julia/