-
Notifications
You must be signed in to change notification settings - Fork 25
106 lines (105 loc) · 3.63 KB
/
Copy pathci_mribase.yml
File metadata and controls
106 lines (105 loc) · 3.63 KB
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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
name: MRIBase
on:
pull_request:
branches:
- master
paths:
- 'MRIBase/**'
push:
branches:
- master
- '*'
tags: '*'
paths:
- 'MRIBase/**'
jobs:
test:
name: Julia ${{ matrix.version }} - ${{ matrix.os }} - ${{ matrix.arch }} - ${{ github.event_name }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
version:
- '1' # Leave this line unchanged. '1' will automatically expand to the latest stable 1.x release of Julia.
- '1.10' #LTS
#- 'nightly'
os:
- ubuntu-latest
- macos-latest
- windows-latest
arch:
- x64
steps:
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
- uses: julia-actions/setup-julia@4c0cb0fce8556fdb04a90347310e5db8b1f98fb9 # v2.7.0
with:
version: ${{ matrix.version }}
arch: ${{ matrix.arch }}
- uses: actions/cache@668228422ae6a00e4ad889ee87cd7109ec5666a7 # v5.0.4
env:
cache-name: cache-artifacts
with:
path: ~/.julia/artifacts
key: ${{ runner.os }}-test-${{ env.cache-name }}-${{ hashFiles('**/Project.toml') }}
restore-keys: |
${{ runner.os }}-test-${{ env.cache-name }}-
${{ runner.os }}-test-
${{ runner.os }}-
- name: Install MRIBase
shell: julia --color=yes --project=. {0}
run: |
using Pkg
Pkg.develop([PackageSpec(path=pwd(), subdir="MRIBase")])
- uses: julia-actions/julia-buildpkg@e3eb439fad4f9aba7da2667e7510e4a46ebc46e1 # v1.7.0
- name: Run MRIBase tests
shell: julia --color=yes --project=. {0}
run: |
using Pkg
Pkg.test("MRIBase", coverage = true)
- uses: julia-actions/julia-processcoverage@03114f09f119417c3242a9fb6e0b722676aedf38 # v1.2.2
with:
directories: MRIBase/src
- uses: codecov/codecov-action@1af58845a975a7985b0beb0cbe6fbbb71a41dbad # v5.5.3
with:
file: lcov.info
token: ${{ secrets.CODECOV_TOKEN }}
flags: MRIBase
# Based on https://github.com/SciML/OrdinaryDiffEq.jl/blob/master/.github/workflows/Downstream.yml
breakage:
name: Breakage ${{ matrix.package }} (Julia ${{ matrix.julia-version}})
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
julia-version:
- '1.10'
os:
- ubuntu-latest
package:
- MRIOperators
- MRISimulation
- MRICoilSensitivities
- MRISampling
- MRIFiles
- MRIReco
steps:
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
- uses: julia-actions/setup-julia@4c0cb0fce8556fdb04a90347310e5db8b1f98fb9 # v2.7.0
with:
version: ${{ matrix.julia-version }}
arch: x64
- name: Test Breakage ${{ matrix.package }}
env:
BREAK_PKG: ${{ matrix.package }}
shell: julia --color=yes {0}
run: |
using Pkg
try
Pkg.add(ENV["BREAK_PKG"]) # Add for release version
Pkg.develop([PackageSpec(path=pwd(), subdir="MRIBase")])
Pkg.test(ENV["BREAK_PKG"], coverage=true) # resolver may fail with test time depsAdd commentMore actions
catch err
err isa Pkg.Resolve.ResolverError || rethrow()
@info "Not compatible with this release. No need to check for breakage" exception=err
exit(0)
end