-
Notifications
You must be signed in to change notification settings - Fork 3
296 lines (263 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
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
name: Main
on:
push:
branches:
- master
pull_request:
workflow_dispatch:
inputs:
generate_release:
description: Generate release
required: true
type: boolean
version:
required: false
type: string
jobs:
setup_config:
runs-on: ubuntu-22.04
steps:
- name: Setup config artifact
run: |
echo "MANAGED_VERSION=${{ inputs.version }}"
MANAGED_VERSION=${{ inputs.version }}
if [ -z "$MANAGED_VERSION" ]
then
echo "Managed version is empty! Setting it up to $(date '+%Y.%-m.%-d')!"
echo "MANAGED_VERSION=$(date '+%Y.%-m.%-d')"
MANAGED_VERSION=$(date '+%Y.%-m.%-d')
fi
echo "version = \"$MANAGED_VERSION\"" >> config.txt
echo "Writing to file..."
cat config.txt
- uses: actions/[email protected]
with:
name: config.txt
path: config.txt
#### NATIVE BUILD ####
native_build_linux:
needs: [rust_code_format, setup_config]
runs-on: "ubuntu-20.04" # Ensure we build with the minimum supported sysroot
steps:
- uses: actions/checkout@v4
- uses: ./.github/workflows/native/native-build-linux
native_build_macos:
needs: [rust_code_format, setup_config]
runs-on: "macos-15"
steps:
- uses: actions/checkout@v4
with:
lfs: true
- run: git lfs pull
- uses: ./.github/workflows/native/native-build-macos
native_build_ios:
needs: [rust_code_format, setup_config]
runs-on: "macos-15"
steps:
- uses: actions/checkout@v4
with:
lfs: true
- run: git lfs pull
- uses: ./.github/workflows/native/native-build-ios
native_build_windows:
needs: [rust_code_format, setup_config]
runs-on: "windows-2022"
steps:
- uses: actions/checkout@v4
with:
lfs: true
- run: git lfs pull
- uses: ./.github/workflows/native/native-build-windows
#### NUGET BUILD ####
nugets:
needs: [native_build_linux, native_build_macos, native_build_ios, native_build_windows , setup_config] # All Natives for dotnet-core
runs-on: "windows-2022"
steps:
- uses: actions/checkout@v4
with:
lfs: true
- run: git lfs pull
- uses: ./.github/workflows/nugets/nugets-windows
#### WEB ASSEMBLY BUILD ####
webassembly_build:
needs: rust_code_format
runs-on: "ubuntu-22.04"
steps:
- uses: actions/checkout@v4
with:
lfs: true
- run: git lfs pull
- uses: ./.github/workflows/other/webassembly-build
#### WEB ASSEMBLY TEST ####
webassembly_test:
needs: webassembly_build
runs-on: "macos-15"
steps:
- uses: actions/checkout@v4
with:
lfs: true
- run: git lfs pull
- uses: ./.github/workflows/tests/webassembly/safari
#### TESTS NUGETS ####
tests_nuget_windows:
needs: [nugets, setup_config]
runs-on: "windows-2022"
steps:
- uses: actions/checkout@v4
with:
lfs: true
- run: git lfs pull
- uses: ./.github/workflows/tests/csharp/windows
tests_nuget_macos:
needs: [nugets, setup_config]
runs-on: "macos-15"
steps:
- uses: actions/checkout@v4
with:
lfs: true
- run: git lfs pull
- uses: ./.github/workflows/tests/csharp/macos
tests_nuget_ios:
needs: [nugets, setup_config]
runs-on: "macos-15"
steps:
- uses: actions/checkout@v4
with:
lfs: true
- run: git lfs pull
- uses: ./.github/workflows/tests/csharp/ios
tests_nuget_linux:
needs: [nugets, setup_config]
runs-on: "ubuntu-22.04"
steps:
- uses: actions/checkout@v4
with:
lfs: true
- run: git lfs pull
- uses: ./.github/workflows/tests/csharp/linux
##### SWIFT TESTS #####
tests_swift:
runs-on: "macos-15"
steps:
- uses: actions/checkout@v4
with:
lfs: true
- run: git lfs pull
- uses: ./.github/workflows/tests/swift
##### KOTLIN BUILD #####
build_kotlin:
needs: setup_config
runs-on: "ubuntu-latest"
steps:
- uses: actions/checkout@v4
with:
lfs: true
- run: git lfs pull
- uses: ./.github/workflows/kotlin
tests_nuget_android:
needs: [nugets, setup_config]
runs-on: "ubuntu-22.04"
steps:
- uses: actions/checkout@v4
with:
lfs: true
- run: git lfs pull
- uses: ./.github/workflows/tests/csharp/android
#### CODE FORMATTING ####
rust_code_format:
runs-on: "ubuntu-22.04"
steps:
- uses: actions/checkout@v4
- uses: ./.github/workflows/formatting/rust
csharp_code_format:
needs: setup_config
runs-on: "windows-2022"
steps:
- uses: actions/checkout@v4
with:
lfs: true
- run: git lfs pull
- uses: ./.github/workflows/formatting/csharp
#### PYTHON BUILD ####
build_python_linux:
runs-on: "ubuntu-22.04"
steps:
- uses: actions/checkout@v4
with:
lfs: true
- run: git lfs pull
- uses: ./.github/workflows/python/build/linux
build_python_macos:
runs-on: "macos-15"
steps:
- uses: actions/checkout@v4
with:
lfs: true
- run: git lfs pull
- uses: ./.github/workflows/python/build/macos
build_python_windows:
runs-on: "windows-2022"
steps:
- uses: actions/checkout@v4
with:
lfs: true
- run: git lfs pull
- uses: ./.github/workflows/python/build/windows
#### PYTHON TEST ####
test_python_linux:
needs: build_python_linux
runs-on: "ubuntu-22.04"
steps:
- uses: actions/checkout@v4
- uses: ./.github/workflows/tests/python/linux
test_python_macos:
needs: build_python_macos
runs-on: "macos-15"
steps:
- uses: actions/checkout@v4
- uses: ./.github/workflows/tests/python/macos
test_python_windows:
needs: build_python_windows
runs-on: "windows-2022"
steps:
- uses: actions/checkout@v4
- uses: ./.github/workflows/tests/python/windows
#### PUBLISH SOURCE ####
source_publish:
runs-on: "ubuntu-22.04"
steps:
- uses: actions/checkout@v4
with:
lfs: true
- run: git lfs pull
- uses: ./.github/workflows/other/source-publish
publish_sbom:
runs-on: "ubuntu-22.04"
if: ${{ github.event.inputs.generate_release == 'true' }}
steps:
- uses: actions/checkout@v4
- name: Check out devolutions/actions
uses: actions/checkout@v4
with:
path: ./.github/workflows
ref: v1
repository: Devolutions/actions
token: ${{ secrets.DEVOLUTIONSBOT_TOKEN }}
- name: Generate Rust SBOM
uses: ./.github/workflows/cyclonedx-rust-generate
with:
path: .
- name: Save BOM
uses: actions/[email protected]
with:
name: bom_devolutions_crypto_rust.xml
path: ./bom.xml
- name: Upload SBOM
uses: ./.github/workflows/dtrack-upload-sbom
with:
api_key: ${{ secrets.DTRACK_AUTOMATION_API_KEY }}
autocreate: 'true'
bom_filename: devolutions-crypto/bom.xml
project_name: 'devolutions-crypto'
project_version: ${{ github.event.inputs.version }}
server_hostname: 'dtrack-api.devolutions.com'