-
Notifications
You must be signed in to change notification settings - Fork 8
114 lines (108 loc) · 3.62 KB
/
test.yml
File metadata and controls
114 lines (108 loc) · 3.62 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
name: build
on:
push:
branches: [main]
pull_request:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
github:
runs-on: ${{ matrix.os }}
strategy:
matrix:
julia-version: ['lts', '1']
julia-arch: [x64]
os: [ubuntu-latest,macos-latest,windows-latest]
steps:
- uses: actions/checkout@v2
- uses: julia-actions/setup-julia@latest
with:
version: ${{ matrix.julia-version }}
- uses: julia-actions/cache@v3
- uses: julia-actions/julia-buildpkg@latest
- name: Add OpenCL.jl to test environment
run: |
julia --startup-file=no --project=test -e 'using Pkg; Pkg.add(["OpenCL", "pocl_jll"])'
- uses: julia-actions/julia-runtest@latest
env:
EXAMODELS_TEST_POCL: 1
- uses: julia-actions/julia-processcoverage@v1
if: matrix.julia-version == '1' && matrix.os == 'ubuntu-latest'
- uses: codecov/codecov-action@v5
if: matrix.julia-version == '1' && matrix.os == 'ubuntu-latest'
with:
files: lcov.info
gpu:
strategy:
matrix:
julia-version: ['lts', '1']
julia-arch: [x64]
os: [ubuntu-latest]
backend: ['cuda', 'amdgpu', 'oneapi']
runs-on: ['self-hosted', 'gpu', '${{ matrix.backend }}']
env:
# oneAPI specific variables
OverrideDefaultFP64Settings: ${{ matrix.backend == 'oneapi' && '1' || '' }}
IGC_EnableDPEmulation: ${{ matrix.backend == 'oneapi' && '1' || '' }}
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Setup Julia
uses: julia-actions/setup-julia@latest
with:
version: ${{ matrix.julia-version }}
- name: Setup tests
run: |
julia --startup-file=no --color=yes --project=./test -e '
using Pkg
Pkg.Registry.update()
Pkg.develop(path=".")
Pkg.instantiate()'
- name: Add AMDGPU.jl to test environment
if: matrix.backend == 'amdgpu'
run: |
julia --startup-file=no --project=test -e 'using Pkg; Pkg.add("AMDGPU")'
- name: Add CUDA.jl to test environment
if: matrix.backend == 'cuda'
run: |
julia --startup-file=no --project=test -e 'using Pkg; Pkg.add("CUDA")'
- name: Add oneAPI.jl to test environment
if: matrix.backend == 'oneapi'
run: |
julia --startup-file=no --project=test -e 'using Pkg; Pkg.add("oneAPI")'
- name: Run tests
run: |
julia --startup-file=no --color=yes --project=./test -e 'include("test/runtests.jl")'
metal:
strategy:
matrix:
julia-version: ['lts', '1']
julia-arch: [aarch64]
os: [macos-latest]
backend: ['metal']
runs-on: ['self-hosted', 'gpu', '${{ matrix.backend }}']
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup Julia
uses: julia-actions/setup-julia@latest
with:
version: ${{ matrix.julia-version }}
- name: Setup tests
run: |
julia --startup-file=no --color=yes --project=./test -e '
using Pkg
Pkg.Registry.update()
Pkg.develop(path=".")
Pkg.instantiate()'
- name: Add Metal.jl to test environment
run: |
julia --startup-file=no --project=test -e 'using Pkg; Pkg.add("Metal")'
- name: Show platform info
run: |
uname -a
julia --startup-file=no -e 'println(Sys.ARCH); println(Sys.KERNEL)'
- name: Run tests
run: |
julia --startup-file=no --color=yes --project=./test -e 'include("test/runtests.jl")'