forked from scala-native/scala-native
-
Notifications
You must be signed in to change notification settings - Fork 0
176 lines (167 loc) · 6.17 KB
/
run-tests-windows.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
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
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
name: Run tests Windows
on:
workflow_call:
pull_request:
schedule:
# Every day at 2 AM UTC
- cron: "0 2 * * *"
concurrency:
group: windows-${{ github.head_ref }}-${{ github.event_name }}
cancel-in-progress: true
jobs:
test-runtime:
name: Test runtime
if: "github.event_name == 'pull_request' || ((github.event_name == 'schedule' || github.event_name == 'workflow_call') && github.repository == 'scala-native/scala-native')"
runs-on: windows-2022
env:
ENABLE_EXPERIMENTAL_COMPILER: true
strategy:
fail-fast: false
matrix:
scala: [3]
gc: [none, boehm, immix, commix]
include:
- scala: 3-next
gc: immix
- scala: 2.13
gc: immix
- scala: 2.12
gc: immix
steps:
# Disable autocrlf setting, otherwise scalalib patches might not be possible to apply
- name: Setup git config
run: git config --global core.autocrlf false
- uses: actions/checkout@v4
- uses: ./.github/actions/windows-setup-env
id: setup
with:
scala-version: ${{matrix.scala}}
# None GC takes too much memory on Windows to execute partest JUnit tests
# leading to spurious failures in the CI. Perform subset of tests instead
# Execution with enabled multithreading increases memory usage, run only minimal tests
- name: Test runtime None GC
if: matrix.gc == 'none'
timeout-minutes: 45
run: >
set SCALANATIVE_GC=${{matrix.gc}}&
set SCALANATIVE_INCLUDE_DIRS=${{steps.setup.outputs.vcpkg-dir}}\include&
set SCALANATIVE_LIB_DIRS=${{steps.setup.outputs.vcpkg-dir}}\lib&
set SCALANATIVE_TEST_PREFETCH_DEBUG_INFO=1&
set SCALANATIVE &
sbt
sandbox${{env.project-version}}/run
testsExt${{env.project-version}}/test
"scalaPartestTests${{env.project-version}}/testOnly -- --showDiff neg/abstract.scala pos/abstract.scala run/Course-2002-01.scala"
shell: cmd
- name: Test runtime
if: matrix.gc != 'none'
timeout-minutes: 45
run: >
set SCALANATIVE_GC=${{matrix.gc}}&
set SCALANATIVE_INCLUDE_DIRS=${{steps.setup.outputs.vcpkg-dir}}\include&
set SCALANATIVE_LIB_DIRS=${{steps.setup.outputs.vcpkg-dir}}\lib&
set SCALANATIVE_TEST_PREFETCH_DEBUG_INFO=1&
set SCALANATIVE &
sbt
"test-runtime ${{matrix.scala}}"
"scalaPartestTests${{env.project-version}}/testOnly -- --showDiff neg/abstract.scala pos/abstract.scala run/Course-2002-01.scala"
shell: cmd
run-scripted-tests:
name: Scripted tests
if: "github.event_name == 'pull_request' || ((github.event_name == 'schedule' || github.event_name == 'workflow_call') && github.repository == 'scala-native/scala-native')"
runs-on: windows-2022
strategy:
fail-fast: false
matrix:
scala: [2.12, 3]
steps:
# Disable autocrlf setting, otherwise scalalib patches might not be possible to apply
- name: Setup git config
run: git config --global core.autocrlf false
- uses: actions/checkout@v4
- uses: ./.github/actions/windows-setup-env
with:
scala-version: ${{matrix.scala}}
- name: Test scripted
run: sbt "test-scripted ${{matrix.scala}}"
shell: cmd
test-runtime-ext:
name: Test runtime extension
if: "(github.event_name == 'schedule' || github.event_name == 'workflow_call') && github.repository == 'scala-native/scala-native'"
runs-on: windows-2022
env:
ENABLE_EXPERIMENTAL_COMPILER: true
needs: [test-runtime]
strategy:
fail-fast: false
matrix:
scala: [3, 3-next, 2.13]
build-mode: [debug, release-fast]
lto: [none, thin]
gc: [boehm, immix, commix]
exclude:
# Covered in basic test-runtime
- scala: 3
build-mode: debug
- scala: 2.13
build-mode: debug
gc: immix
- build-mode: release-fast
lto: none
include:
- scala: 3
build-mode: release-size
lto: thin
gc: immix
# ReleaseFull is flaky
# - scala: 3
# build-mode: release-full
# lto: thin
# gc: commix
steps:
# Disable autocrlf setting, otherwise scalalib patches might not be possible to apply
- name: Setup git config
run: git config --global core.autocrlf false
- uses: actions/checkout@v4
- uses: ./.github/actions/windows-setup-env
id: setup
with:
scala-version: ${{matrix.scala}}
- name: Run tests
timeout-minutes: 45
run: >
set SCALANATIVE_GC=${{matrix.gc}}&
set SCALANATIVE_MODE=${{matrix.build-mode}}&
set SCALANATIVE_LTO=${{matrix.lto}}&
set SCALANATIVE_INCLUDE_DIRS=${{steps.setup.outputs.vcpkg-dir}}\include&
set SCALANATIVE_LIB_DIRS=${{steps.setup.outputs.vcpkg-dir}}\lib&
set SCALANATIVE_TEST_PREFETCH_DEBUG_INFO=1&
set SCALANATIVE &
sbt "test-runtime ${{matrix.scala}}"
shell: cmd
test-llvm-versions:
runs-on: windows-2022
if: "(github.event_name == 'schedule' || github.event_name == 'workflow_call') && github.repository == 'scala-native/scala-native'"
strategy:
fail-fast: false
matrix:
scala: [3]
llvm: ["16.0.6", "17.0.6"] # Last 2 stable versions, LLVM 16 is minimal version able to compile current Windows SDK
steps:
- name: Setup git config
run: git config --global core.autocrlf false
- uses: actions/checkout@v4
- uses: ./.github/actions/windows-setup-env
id: setup
with:
scala-version: ${{matrix.scala}}
llvm-version: ${{ matrix.llvm }}
java-version: 8
- name: Run tests
shell: cmd
timeout-minutes: 45
run: >
set SCALANATIVE_INCLUDE_DIRS=${{steps.setup.outputs.vcpkg-dir}}\include&
set SCALANATIVE_LIB_DIRS=${{steps.setup.outputs.vcpkg-dir}}\lib&
set SCALANATIVE &
sbt "show tests3/nativeConfig" "test-runtime ${{matrix.scala}}"