File tree 2 files changed +32
-7
lines changed
2 files changed +32
-7
lines changed Original file line number Diff line number Diff line change 1
1
name : CI
2
2
# Run on master, tags, or any pull request
3
3
on :
4
- schedule :
5
- - cron : ' 0 2 * * *' # Daily at 2 AM UTC (8 PM CST)
6
4
push :
7
- branches : [master]
8
- tags : ["*"]
5
+ branches :
6
+ - master
7
+ tags : ['*']
9
8
pull_request :
10
-
9
+ workflow_dispatch :
10
+ concurrency :
11
+ # Skip intermediate builds: always.
12
+ # Cancel intermediate builds: only if it is a pull request build.
13
+ group : ${{ github.workflow }}-${{ github.ref }}
14
+ cancel-in-progress : ${{ startsWith(github.ref, 'refs/pull/') }}
11
15
jobs :
12
16
test :
13
17
name : Julia ${{ matrix.version }} - ${{ matrix.os }} - ${{ matrix.arch }}
69
73
steps :
70
74
- uses : actions/checkout@v4
71
75
- uses : julia-actions/setup-julia@latest
72
- - uses : julia-actions/julia-format@v3
76
+ - uses : extractions/setup-just@v1 # or taiki-e/install-action@just
77
+
78
+ # Adapted from:
79
+ # github.com/FluxML/Flux.jl/blob/7be1ca7a/.github/workflows/JuliaFormatter.yml
80
+ - uses : dorny/paths-filter@v3
81
+ id : filter
82
+ with :
83
+ filters : |
84
+ julia_file_change:
85
+ - added|modified: '**/*.jl'
86
+ - name : Apply JuliaFormatter
87
+ run : |
88
+ just fmt
89
+ - name : Check formatting diff
90
+ if : steps.filter.outputs.julia_file_change == 'true'
91
+ run : |
92
+ git diff --color=always --exit-code
73
93
74
94
perf :
75
95
name : Performance
Original file line number Diff line number Diff line change @@ -44,7 +44,7 @@ bench: (instantiate-dev bench_dir)
44
44
45
45
# Check formatting with blue style
46
46
[group : ' ci' ]
47
- fmt :
47
+ fmt : install-package JuliaFormatter
48
48
# https://github.com/invenia/BlueStyle
49
49
julia --project=@JuliaFormatter -e ' using JuliaFormatter; format("{{ project_dir}} ", style=BlueStyle())'
50
50
@@ -56,3 +56,8 @@ instantiate:
56
56
[private ]
57
57
instantiate-dev dev_project_dir :
58
58
julia --project={{ dev_project_dir}} -e ' {{ dev_instantiate_code}} '
59
+
60
+ # Install a package to a (temporary) package-specific project
61
+ [private ]
62
+ install-package package :
63
+ julia --project=@{{ package}} -e ' import Pkg; Pkg.add("{{ package}} ")'
You can’t perform that action at this time.
0 commit comments