-
Notifications
You must be signed in to change notification settings - Fork 3
197 lines (164 loc) · 4.61 KB
/
Copy pathci.yml
File metadata and controls
197 lines (164 loc) · 4.61 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
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
name: ci / nimble
permissions:
contents: read
pull-requests: read
checks: write
on:
pull_request:
branches: [master, release/*]
push:
branches: [master, release/*]
workflow_dispatch:
jobs:
test:
name: 'test / ${{ matrix.os }}'
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
- uses: jiro4989/setup-nim-action@v2
with:
nim-version: '2.2.4'
- name: Install dependencies
run: nimble setup -l
- name: Run test suite
run: nimble test
build-linux:
name: 'linux / ${{ matrix.task }}'
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
task:
- libsdsDynamicLinux
- libsdsStaticLinux
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
- uses: jiro4989/setup-nim-action@v2
with:
nim-version: '2.2.4'
- name: Install dependencies
run: nimble setup -l
- name: Build ${{ matrix.task }}
run: nimble ${{ matrix.task }}
- uses: actions/upload-artifact@v4
with:
name: ${{ matrix.task }}
path: build/
build-mac:
name: 'macos / ${{ matrix.task }}'
runs-on: macos-latest
strategy:
fail-fast: false
matrix:
task:
- libsdsDynamicMac
- libsdsStaticMac
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
- uses: jiro4989/setup-nim-action@v2
with:
nim-version: '2.2.4'
- name: Install dependencies
run: nimble setup -l
- name: Build ${{ matrix.task }}
run: nimble ${{ matrix.task }}
- uses: actions/upload-artifact@v4
with:
name: ${{ matrix.task }}
path: build/
build-windows:
name: 'windows / ${{ matrix.task }}'
runs-on: windows-latest
strategy:
fail-fast: false
matrix:
task:
- libsdsDynamicWindows
- libsdsStaticWindows
steps:
- name: Enable Git long paths
run: git config --global core.longpaths true
- uses: actions/checkout@v4
with:
submodules: recursive
- uses: jiro4989/setup-nim-action@v2
with:
nim-version: '2.2.4'
# nim-lsquic (transitive dep via libp2p) contains boringssl submodule with
# deeply-nested test paths. Nimble's temp dir path + those file names exceed
# 260 chars even with core.longpaths=true because Nim's runtime doesn't use
# the \\?\ extended-path prefix. Redirect TEMP/TMP to a short root dir so
# nimble's working directory stays well under the limit.
- name: Shorten TEMP path for nimble
shell: pwsh
run: |
New-Item -ItemType Directory -Force -Path C:\T | Out-Null
"TEMP=C:\T" >> $env:GITHUB_ENV
"TMP=C:\T" >> $env:GITHUB_ENV
- name: Install dependencies
run: nimble setup -l
- name: Build ${{ matrix.task }}
run: nimble ${{ matrix.task }}
- uses: actions/upload-artifact@v4
with:
name: ${{ matrix.task }}
path: build/
build-ios:
name: 'macos / libsdsIOS'
runs-on: macos-latest
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
- uses: maxim-lobanov/setup-xcode@v1
with:
xcode-version: '16.2'
- uses: jiro4989/setup-nim-action@v2
with:
nim-version: '2.2.4'
- name: Install dependencies
run: nimble setup -l
- name: Build libsdsIOS
run: nimble libsdsIOS
- uses: actions/upload-artifact@v4
with:
name: libsdsIOS
path: build/
build-android:
name: 'linux / ${{ matrix.task }}'
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
task: [libsdsAndroidArm64, libsdsAndroidAmd64, libsdsAndroidX86]
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
- uses: jiro4989/setup-nim-action@v2
with:
nim-version: '2.2.4'
- uses: nttld/setup-ndk@v1
id: setup-ndk
with:
ndk-version: r27c
- name: Install dependencies
run: nimble setup -l
- name: Build ${{ matrix.task }}
env:
ANDROID_NDK_ROOT: ${{ steps.setup-ndk.outputs.ndk-path }}
run: nimble ${{ matrix.task }}
- uses: actions/upload-artifact@v4
with:
name: ${{ matrix.task }}
path: build/