-
Notifications
You must be signed in to change notification settings - Fork 78
114 lines (107 loc) · 3.63 KB
/
ci.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
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
name: CI
on:
push:
branches:
- master
pull_request:
workflow_dispatch:
jobs:
test:
name: Julia ${{ matrix.version }} - ${{ matrix.os }} - ${{ matrix.arch }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
version: ['1.10', 'pre', 'nightly']
os: [ubuntu-latest, macOS-latest, windows-latest]
arch: [x64]
steps:
- uses: actions/checkout@v4
- uses: julia-actions/setup-julia@v2
with:
version: ${{ matrix.version }}
arch: ${{ matrix.arch }}
- uses: julia-actions/cache@v2
- name: Develop subpackages
run: |
julia --project -e "
using Pkg
Pkg.develop([PackageSpec(; name=basename(path), path) for path in ARGS])
" lib/GPUArraysCore lib/JLArrays
- uses: julia-actions/julia-runtest@v1
continue-on-error: ${{ matrix.version == 'nightly' }}
- uses: julia-actions/julia-processcoverage@v1
with:
directories: src,lib
- uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}
fail_ci_if_error: false
file: lcov.info
opencl:
name: OpenCL.jl
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: julia-actions/setup-julia@v2
with:
version: '1.10'
arch: x64
- uses: julia-actions/cache@v2
- name: Run tests
run: |
julia -e 'using Pkg
gpuarrays = pwd()
gpuarrayscore = joinpath(gpuarrays, "lib", "GPUArraysCore")
devdir = mktempdir()
package = joinpath(devdir, "OpenCL")
println("--- :julia: Installing TestEnv")
Pkg.activate(; temp=true)
Pkg.add("TestEnv")
using TestEnv
println("--- :julia: Installing OpenCL.jl")
withenv("JULIA_PKG_PRECOMPILE_AUTO" => 0,
"JULIA_PKG_DEVDIR" => devdir) do
Pkg.develop("OpenCL")
Pkg.activate(package)
try
Pkg.develop([PackageSpec(path=gpuarrays), PackageSpec(path=gpuarrayscore)])
TestEnv.activate()
catch err
@error "Could not install OpenCL.jl" exception=(err,catch_backtrace())
exit(0)
finally
Pkg.activate(package)
end
end
println("+++ :julia: Running tests")
Pkg.test(; coverage=true)'
- uses: julia-actions/julia-processcoverage@v1
with:
directories: src,lib
- uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}
fail_ci_if_error: false
file: lcov.info
docs:
name: Documentation
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: julia-actions/setup-julia@v2
with:
version: '1.10'
- name: Develop packages
run: |
julia -e "
using Pkg
Pkg.develop([PackageSpec(; name=basename(splitext(path)[1]), path) for path in ARGS])
" ../GPUArrays.jl lib/GPUArraysCore
- name: Install dependencies
run: julia --project=docs/ -e 'using Pkg; Pkg.instantiate()'
- name: Build and deploy
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
DOCUMENTER_KEY: ${{ secrets.DOCUMENTER_KEY }}
run: julia --project=docs/ docs/make.jl