forked from apache/fury
-
Notifications
You must be signed in to change notification settings - Fork 0
252 lines (242 loc) · 7.36 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
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
name: Fury CI
on:
push:
branches:
- main
- go_magic_number
- 'releases/**'
- 'deploy/**'
- 'test*'
tags:
- v*
pull_request:
paths-ignore:
- '**/*.md'
- 'docs/**'
- 'LICENSE'
- '.vscode/**'
- '.gitignore'
- 'licenses/**'
- 'DISCLAIMER'
- 'NOTICE'
types: ['opened', 'reopened', 'synchronize']
jobs:
java:
name: Java CI
runs-on: ubuntu-latest
env:
MY_VAR: "PATH"
strategy:
matrix:
java-version: ["8", "11", "17", "21"]
steps:
- uses: actions/checkout@v4
- name: Set up JDK ${{ matrix.java-version }}
uses: actions/setup-java@v4
with:
java-version: ${{ matrix.java-version }}
distribution: 'temurin'
- name: Install bazel
run: ./ci/run_ci.sh install_bazel
- name: Install python
run: ./ci/run_ci.sh install_python
- name: Install pyfury
run: ./ci/run_ci.sh install_pyfury
- name: Run CI with Maven
run: ./ci/run_ci.sh java${{ matrix.java-version }}
openj9:
name: Openj9 Java CI
runs-on: ubuntu-latest
env:
MY_VAR: "PATH"
strategy:
matrix:
# String in openj9 1.8 share byte array by offset, fury doesn't allow it.
java-version: ["21"]
steps:
- uses: actions/checkout@v4
- name: Set up JDK ${{ matrix.java-version }}
uses: actions/setup-java@v4
with:
java-version: ${{ matrix.java-version }}
distribution: 'adopt-openj9'
- name: Install bazel
run: ./ci/run_ci.sh install_bazel
- name: Install python
run: ./ci/run_ci.sh install_python
- name: Install pyfury
run: ./ci/run_ci.sh install_pyfury
- name: Run CI with Maven
run: ./ci/run_ci.sh java${{ matrix.java-version }}
graalvm:
name: GraalVM CI
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: graalvm/setup-graalvm@v1
with:
java-version: '21'
distribution: 'graalvm'
github-token: ${{ secrets.GITHUB_TOKEN }}
native-image-job-reports: 'true'
- name: Build native image and run
run: ./ci/run_ci.sh graalvm_test
scala:
name: Scala CI
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up JDK8
uses: actions/setup-java@v4
with:
java-version: 8
distribution: 'temurin'
- name: Install fury java
run: cd java && mvn -T10 --no-transfer-progress clean install -DskipTests && cd -
- name: Test
run: |
# Avoid sbt download jackson-databind error
rm -rf /home/runner/.m2/repository/com/fasterxml/jackson/
cd scala && sbt +test && cd -
integration_tests:
name: Integration Tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up JDK8
uses: actions/setup-java@v4
with:
java-version: 8
distribution: 'temurin'
- name: Run CI
run: ./ci/run_ci.sh integration_tests
javascript:
name: JavaScript CI
strategy:
matrix:
node-version: [14.x, 16.x, 18.x, 20.x]
os: [ubuntu-latest, macos-latest, windows-2022]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
- name: Upgrade npm
run: npm install -g npm@8
# node-gyp needs to use python and relies on the distutils module.
# The distutils module has been removed starting from python 3.12
# (see https://docs.python.org/3.10/library/distutils.html). Some
# OS (such as macos -latest) uses python3.12 by default, so python 3.8
# is used here to avoid this problem.
- name: Set up Python3.8
uses: actions/setup-python@v5
with:
python-version: 3.8
- name: Run CI with NodeJS
run: python ./ci/run_ci.py javascript
rust:
name: Rust CI
strategy:
matrix:
os: [ubuntu-latest, macos-12, macos-14] # macos-12: x86, macos-14: arm64
runs-on: ${{ matrix.os }}
timeout-minutes: 45
steps:
- uses: actions/checkout@v4
- name: Set up Python 3.11
uses: actions/setup-python@v5
with:
python-version: 3.11
- uses: dtolnay/rust-toolchain@nightly
- name: Run Rust CI
run: python ./ci/run_ci.py rust
cpp:
name: C++ CI
strategy:
matrix:
os: [ubuntu-latest, macos-12, macos-14] # macos-12: x86, macos-14: arm64
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- name: Set up Python 3.11
uses: actions/setup-python@v5
with:
python-version: 3.11
- name: Run C++ CI with Bazel
run: python ./ci/run_ci.py cpp
python:
name: Python CI
# Fix python 3.6 install issue, see
# https://github.com/rwth-i6/returnn/commit/38ecab17d781c4b74db6a174c8097187380b4ddc
runs-on: ubuntu-20.04
strategy:
matrix:
python-version: [3.7, 3.12]
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install bazel
run: ./ci/run_ci.sh install_bazel
- name: Run Python CI
run: ./ci/run_ci.sh python
go:
name: Golang CI
runs-on: ubuntu-latest
strategy:
matrix:
go-version: [ '1.13', '1.18' ]
steps:
- uses: actions/checkout@v4
- name: Setup Go ${{ matrix.go-version }}
uses: actions/setup-go@v4
with:
go-version: ${{ matrix.go-version }}
- name: Display Go version
run: go version
- name: Install bazel
run: ./ci/run_ci.sh install_bazel
- name: Install python
run: ./ci/run_ci.sh install_python
- name: Install pyfury
run: ./ci/run_ci.sh install_pyfury
- name: Run Golang CI
run: ./ci/run_ci.sh go
lint:
name: Code Style Check
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up JDK ${{ matrix.java-version }}
uses: actions/setup-java@v4
with:
java-version: 21
distribution: 'oracle'
- name: Check License Header
uses: korandoru/hawkeye@v3
- name: Set up Python 3.8
uses: actions/setup-python@v5
with:
python-version: 3.8
- name: Check code style
run: ./ci/run_ci.sh format