Repository navigation
156 lines (138 loc) · 4.53 KB
/
Copy pathCI.yml
File metadata and controls
156 lines (138 loc) · 4.53 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
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
name: CI
on:
workflow_dispatch:
push:
branches:
- master
- main
tags: ['*']
pull_request:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ startswith(github.ref, 'refs/pull/') }}
env:
JULIA_PKG_SERVER: ""
JULIA_NUM_THREADS: 1
JULIA_PKG_PRECOMPILE_AUTO: 0
# headless GR/Plots
GKSwstype: "100"
# non-interactive Matplotlib for PyPlot
MPLBACKEND: "Agg"
# force Conda.jl rather than a system Python
PYTHON: ""
jobs:
test:
name: Julia ${{ matrix.version }} - ${{ matrix.os }} - ${{ matrix.group }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
include:
- os: ubuntu-latest
arch: x64
version: '1.12'
group: CUDA
- os: macOS-latest
arch: aarch64
version: '1.12'
group: Metal
steps:
- uses: actions/checkout@v4
- name: Check out ContinuousWavelets.jl
uses: actions/checkout@v4
with:
repository: JaredW40/ContinuousWavelets.jl
ref: master
path: deps/ContinuousWavelets.jl
- name: Check out FourierFilterFlux.jl
uses: actions/checkout@v4
with:
repository: JaredW40/FourierFilterFlux.jl
ref: master
path: deps/FourierFilterFlux.jl
- name: Check out MonogenicFilterFlux.jl
uses: actions/checkout@v4
with:
repository: JaredW40/MonogenicFilterFlux.jl
ref: main
path: deps/MonogenicFilterFlux.jl
- uses: julia-actions/setup-julia@v2
with:
version: ${{ matrix.version }}
arch: ${{ matrix.arch }}
- uses: julia-actions/cache@v2
- name: Configure Git to use HTTPS
run: git config --global url."https://github.com/".insteadOf "git@github.com:"
- name: Add Registries
shell: julia --color=yes {0}
run: |
using Pkg
Pkg.Registry.add("General")
Pkg.Registry.add(RegistrySpec(url="https://github.com/UCD4IDS/TetrapodsRegistry"))
- name: Generate the CI environment
run: |
julia --project=ci -e '
using Pkg
Pkg.develop([
PackageSpec(path = "deps/ContinuousWavelets.jl"),
PackageSpec(path = "deps/FourierFilterFlux.jl"),
PackageSpec(path = "deps/MonogenicFilterFlux.jl"),
PackageSpec(path = "."),
])
Pkg.add([
PackageSpec(name = "Test"),
PackageSpec(name = "Wavelets"),
PackageSpec(name = "Zygote"),
PackageSpec(name = "Flux"),
PackageSpec(name = "FFTW"),
PackageSpec(name = "AbstractFFTs"),
PackageSpec(name = "Functors"),
PackageSpec(name = "Adapt"),
PackageSpec(name = "MLDataDevices"),
PackageSpec(name = "LinearAlgebra"),
PackageSpec(name = "Logging"),
PackageSpec(name = "Random"),
])'
- name: Add the CUDA stack (Linux only)
if: runner.os == 'Linux'
run: |
julia --project=ci -e '
using Pkg
Pkg.add([
PackageSpec(name = "CUDA"),
PackageSpec(name = "cuFFT"),
])'
- name: Add Metal (macOS only)
if: runner.os == 'macOS'
run: julia --project=ci -e 'using Pkg; Pkg.add("Metal")'
- name: Precompile
run: julia --project=ci -e 'using Pkg; Pkg.precompile()'
- name: Environment status
run: julia --project=ci -e 'using Pkg; Pkg.status()'
- name: Report GPU availability
continue-on-error: true
run: |
julia --project=ci -e '
if Sys.islinux()
using CUDA
@info "CUDA backend" functional = CUDA.functional()
elseif Sys.isapple()
using Metal
@info "Metal backend" functional = Metal.functional()
end'
- name: Run tests
env:
GROUP: ${{ matrix.group }}
run: julia --project=ci --code-coverage=user -e 'include("test/runtests.jl")'
- uses: julia-actions/julia-processcoverage@v1
- uses: actions/upload-artifact@v4
if: always()
with:
name: lcov-${{ matrix.os }}-${{ matrix.group }}
path: lcov.info
if-no-files-found: warn
- uses: codecov/codecov-action@v4
with:
files: lcov.info
token: ${{ secrets.CODECOV_TOKEN }}
fail_ci_if_error: false