-
Notifications
You must be signed in to change notification settings - Fork 238
159 lines (151 loc) · 3.66 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
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
name: CI
on:
push:
branches:
- main
tags:
- "v*"
pull_request:
jobs:
examples:
runs-on: ${{ matrix.OS }}
strategy:
fail-fast: false
matrix:
OS: ["ubuntu-latest", "windows-latest"]
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
submodules: true
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.10"
- name: Install python dependencies
run: |
python -m pip install --upgrade pip
pip install -r examples/requirements.txt --no-dependencies
- uses: coursier/setup-action@v1.3
with:
jvm: 8
- run: ./mill -i scala.examples.test
shell: bash
test:
runs-on: ${{ matrix.OS }}
strategy:
fail-fast: false
matrix:
OS: [ubuntu-latest]
JDK: [8]
SCALA: [2.12.18, 2.12.19, 2.13.13, 2.13.14, 3.3.3, 3.4.2]
include:
- OS: windows-latest
JDK: 8
SCALA: 2.13.14
- OS: macos-12
JDK: 8
SCALA: 2.13.14
- OS: ubuntu-latest
JDK: 17
SCALA: 2.13.14
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
submodules: true
- uses: coursier/setup-action@v1.3
with:
jvm: ${{ matrix.JDK }}
apps:
- run: ./mill -i "__[$SCALA].test"
shell: bash
env:
SCALA: ${{ matrix.SCALA }}
integration-tests:
runs-on: ${{ matrix.OS }}
timeout-minutes: 60
strategy:
fail-fast: false
matrix:
OS: ["ubuntu-22.04", macos-12, windows-latest]
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
submodules: true
- uses: coursier/setup-action@v1.3
with:
jvm: 8
apps: scala-cli
- run: .github/scripts/run/run-its.sh
shell: bash
bincompat:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
submodules: true
- uses: coursier/setup-action@v1.3
with:
jvm: 8
- run: ./mill __.mimaReportBinaryIssues
shell: bash
website:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
submodules: true
- uses: coursier/setup-action@v1.3
with:
jvm: 17
apps: cs
- run: ./mill docs.generate
shell: bash
format:
timeout-minutes: 15
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
submodules: true
- uses: coursier/setup-action@v1.3
with:
jvm: "temurin:17"
apps: scalafmt
- run: scalafmt --check
publishLocal:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
submodules: true
- uses: coursier/setup-action@v1.3
with:
jvm: 8
apps:
- run: |
mv .mill-jvm-opts .mill-jvm-opts.bak
echo "-Xmx2g" > .mill-jvm-opts
cat .mill-jvm-opts.bak | grep -v Xmx >> .mill-jvm-opts
# sometimes running into memory issues when attempting __.publishLocal upfront
for SV in $(./mill dev.scalaVersions); do
./mill -i '__['"$SV"'].compile'
./mill -i '__['"$SV"'].docJar'
./mill -i '__['"$SV"'].publishLocal'
done
./mill -i __.publishLocal
shell: bash
# job whose name doesn't change when we bump Scala versions, add OSes, …
# We require this job for auto-merge.
all-tests:
needs: [examples, bincompat, test, integration-tests, website, publishLocal]
runs-on: ubuntu-latest
steps:
- run: true
shell: bash