-
Notifications
You must be signed in to change notification settings - Fork 35
75 lines (73 loc) · 2.37 KB
/
test.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
name: test
on:
- push
- pull_request
defaults:
run:
shell: bash
jobs:
test:
name: Julia ${{ matrix.version }} - ${{ matrix.os }} - ${{ matrix.arch }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
version:
- '1.6'
- '1.9'
- 'nightly'
os:
- ubuntu-latest
- macOS-latest
- windows-latest
arch:
- x64
steps:
- uses: actions/checkout@v2
- uses: julia-actions/setup-julia@v1
with:
version: ${{ matrix.version }}
# Mesa install copied from https://github.com/microsoft/OpticSim.jl
- name: Install Mesa (Windows only)
if: runner.os == 'Windows'
shell: cmd
working-directory: ${{ steps.setup-julia.outputs.julia-bindir }}
run: |
curl.exe -L --output mesa.7z --url https://github.com/pal1000/mesa-dist-win/releases/download/21.3.5/mesa3d-21.3.5-release-msvc.7z
"C:\Program Files\7-Zip\7z.exe" x mesa.7z
mklink opengl32.dll "x64\opengl32.dll"
mklink libglapi.dll "x64\libglapi.dll"
- name: Cache artifacts
uses: actions/cache@v1
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 }}-
- uses: julia-actions/julia-buildpkg@v1
- name: install-xfvb
if: runner.os == 'Linux'
run: sudo apt-get install xvfb libxkbcommon-x11-0
- name: test-linux
if: runner.os == 'Linux' && matrix.version != '1.6'
run: xvfb-run --auto-servernum julia --color=yes --check-bounds=yes --project -e 'using Pkg; Pkg.test(coverage=true)'
env:
XDG_RUNTIME_DIR: /tmp/runtime-runner
- name: test-win-mac
if: runner.os != 'Linux'
uses: julia-actions/julia-runtest@v1
- uses: julia-actions/julia-processcoverage@v1
env:
DISABLE_AMEND_COVERAGE_FROM_SRC: yes
- uses: codecov/codecov-action@v1
with:
file: ./lcov.info
fail_ci_if_error: false
- uses: domluna/JuliaFormatter-action@master
with:
args: -v .
continue-on-error: true