-
-
Notifications
You must be signed in to change notification settings - Fork 6
149 lines (136 loc) · 4.67 KB
/
Copy pathTest.yml
File metadata and controls
149 lines (136 loc) · 4.67 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
name: Test
on:
push:
branches:
- main
tags: ["*"]
workflow_dispatch:
jobs:
test:
name: Julia ${{ matrix.version }} - ${{ matrix.os }} - ${{ matrix.arch }} - ${{ github.event_name }}
runs-on: ${{ matrix.os }}
timeout-minutes: 80
strategy:
fail-fast: false
matrix:
version:
- '1.11'
- '1'
os:
- ubuntu-latest
build_is_production_build:
- true
arch:
- x64
include:
- os: windows-latest
arch: x64
version: 1
build_is_production_build: true
- os: macOS-latest
arch: aarch64
version: 1
build_is_production_build: true
steps:
- uses: actions/checkout@v6
- uses: julia-actions/setup-julia@v3
with:
version: ${{ matrix.version }}
arch: ${{ matrix.arch }}
- name: Prepare version-specific manifest
shell: bash
run: |
JULIA_VERSION=$(julia --version | awk '{print $3}' | cut -d'.' -f1,2)
DEFAULT="Manifest-v${JULIA_VERSION}.toml.default"
TARGET="Manifest-v${JULIA_VERSION}.toml"
if [ -f "$DEFAULT" ] && [ ! -f "$TARGET" ]; then
cp "$DEFAULT" "$TARGET"
echo "Copied $DEFAULT to $TARGET"
fi
- name: Install xvfb for headless GL rendering
if: runner.os == 'Linux'
run: sudo apt-get update && sudo apt-get install -y xvfb
- name: Start virtual framebuffer
if: runner.os == 'Linux'
run: |
Xvfb :99 -screen 0 1024x768x24 &
echo "DISPLAY=:99" >> $GITHUB_ENV
- uses: julia-actions/cache@v3
continue-on-error: true
- uses: julia-actions/julia-buildpkg@v1
- name: Resolve and instantiate test environment
shell: bash
run: |
JULIA_VERSION=$(julia --version | awk '{print $3}' | cut -d'.' -f1,2)
TEST_MANIFEST="test/Manifest-v${JULIA_VERSION}.toml"
TEST_TARGET="test/Manifest.toml"
if [ -f "$TEST_MANIFEST" ] && [ ! -f "$TEST_TARGET" ]; then
cp "$TEST_MANIFEST" "$TEST_TARGET"
echo "Copied $TEST_MANIFEST to $TEST_TARGET"
fi
julia --project=test -e "using Pkg; Pkg.resolve(); Pkg.instantiate()"
- uses: julia-actions/julia-runtest@v1
env:
BUILD_IS_PRODUCTION_BUILD: ${{ matrix.build_is_production_build }}
with:
coverage: false
test-with-code-coverage:
name: Julia ${{ matrix.julia_version }} - ${{ matrix.os }} - ${{ matrix.julia_arch }} - with code coverage
timeout-minutes: 80
strategy:
fail-fast: false
matrix:
julia_version:
- "1.11"
julia_arch:
- x64
os:
- ubuntu-latest
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v6
- uses: julia-actions/setup-julia@v3
with:
arch: ${{ matrix.julia_arch }}
version: ${{ matrix.julia_version }}
- name: Prepare version-specific manifest
shell: bash
run: |
JULIA_VERSION=$(julia --version | awk '{print $3}' | cut -d'.' -f1,2)
DEFAULT="Manifest-v${JULIA_VERSION}.toml.default"
TARGET="Manifest-v${JULIA_VERSION}.toml"
if [ -f "$DEFAULT" ] && [ ! -f "$TARGET" ]; then
cp "$DEFAULT" "$TARGET"
echo "Copied $DEFAULT to $TARGET"
fi
- name: Install xvfb for headless GL rendering
if: runner.os == 'Linux'
run: sudo apt-get update && sudo apt-get install -y xvfb
- name: Start virtual framebuffer
if: runner.os == 'Linux'
run: |
Xvfb :99 -screen 0 1024x768x24 &
echo "DISPLAY=:99" >> $GITHUB_ENV
- uses: julia-actions/cache@v3
continue-on-error: true
- uses: julia-actions/julia-buildpkg@v1
- name: Resolve and instantiate test environment
shell: bash
run: |
JULIA_VERSION=$(julia --version | awk '{print $3}' | cut -d'.' -f1,2)
TEST_MANIFEST="test/Manifest-v${JULIA_VERSION}.toml"
TEST_TARGET="test/Manifest.toml"
if [ -f "$TEST_MANIFEST" ] && [ ! -f "$TEST_TARGET" ]; then
cp "$TEST_MANIFEST" "$TEST_TARGET"
echo "Copied $TEST_MANIFEST to $TEST_TARGET"
fi
julia --project=test -e "using Pkg; Pkg.resolve(); Pkg.instantiate()"
- uses: julia-actions/julia-runtest@v1
env:
BUILD_IS_PRODUCTION_BUILD: false
- uses: julia-actions/julia-processcoverage@v1
- uses: codecov/codecov-action@v6
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: lcov.info
continue-on-error: true