-
-
Notifications
You must be signed in to change notification settings - Fork 192
490 lines (441 loc) · 23.1 KB
/
build-static.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
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
# Copyright (C) 2020 Matthew Glazar
# See end of file for extended copyright information.
name: build static
on:
push:
pull_request:
types: [opened, synchronize]
jobs:
build:
name: ${{ matrix.toolchain.name }}
strategy:
fail-fast: false
matrix:
toolchain:
- {runs_on: macos-12, name: "macOS x86_64", archive_name: "macos", archive_extension: ".tar.gz", test: true, CC: /usr/local/opt/llvm@15/bin/clang, CXX: /usr/local/opt/llvm@15/bin/clang++, CFLAGS: "-isystem /usr/local/opt/llvm@15/include -isystem /usr/local/opt/llvm@15/include/c++/v1 -mmacosx-version-min=10.9 -D_LIBCPP_DISABLE_AVAILABILITY", LDFLAGS: "-L/usr/local/opt/llvm@15/lib -mlinker-version=278 -nostdlib++ /usr/local/opt/llvm@15/lib/c++/libc++.a /usr/local/opt/llvm@15/lib/c++/libc++abi.a", CMAKE_FLAGS: "-G Ninja", homebrew_packages: "ninja"}
- {runs_on: stracle-macos-aarch64, name: "macOS AArch64", archive_name: "macos-aarch64", archive_extension: ".tar.gz", test: true, CFLAGS: "-mmacosx-version-min=11.0", CMAKE_FLAGS: "-G Ninja"}
- {runs_on: ubuntu-latest, name: "Linux x86_64", archive_name: "linux", archive_extension: ".tar.gz", docker_container: "ghcr.io/quick-lint/quick-lint-js-github-baseline-builder:v1", test: true, LDFLAGS: "-static-libgcc -static-libstdc++", CMAKE_FLAGS: "-G Ninja"}
- {runs_on: ubuntu-latest, name: "Linux ARM", archive_name: "linux-armhf", archive_extension: ".tar.gz", docker_container: "ghcr.io/quick-lint/quick-lint-js-github-cross-builder:v3", test: false, cross_compiling: true, CMAKE_FLAGS: "-DCMAKE_TOOLCHAIN_FILE=.github/toolchain-linux-armhf.cmake -G Ninja", LDFLAGS: "-static-libgcc -static-libstdc++"}
- {runs_on: ubuntu-latest, name: "Linux AArch64", archive_name: "linux-aarch64", archive_extension: ".tar.gz", docker_container: "ghcr.io/quick-lint/quick-lint-js-github-cross-builder:v3", test: false, cross_compiling: true, CMAKE_FLAGS: "-DCMAKE_TOOLCHAIN_FILE=.github/toolchain-linux-aarch64.cmake -G Ninja", LDFLAGS: "-static-libgcc -static-libstdc++"}
# HACK(strager): -Wl,-allow-multiple-definition works around a GCC bug: https://sourceware.org/bugzilla/show_bug.cgi?id=12762
- {runs_on: windows-2022, name: "Windows x86", archive_name: "windows-x86", archive_extension: ".zip", test: true, CC: "c:/msys64/mingw32/bin/gcc.exe", CXX: "c:/msys64/mingw32/bin/g++.exe", CMAKE_FLAGS: "-G Ninja", chocolatey_packages: "ninja", msys2_packages: "mingw-w64-i686-gcc ninja", LDFLAGS: "-static -Wl,-allow-multiple-definition"}
- {runs_on: windows-2022, name: "Windows x64", archive_name: "windows", archive_extension: ".zip", test: true, CC: "c:/msys64/ucrt64/bin/gcc.exe", CXX: "c:/msys64/ucrt64/bin/g++.exe", CMAKE_FLAGS: "-G Ninja", chocolatey_packages: "ninja", msys2_packages: "mingw-w64-ucrt-x86_64-gcc ninja", LDFLAGS: "-static"}
- {runs_on: ubuntu-latest, name: "Windows ARM", archive_name: "windows-arm", archive_extension: ".zip", docker_container: "ghcr.io/quick-lint/quick-lint-js-github-mingw-builder:v3", test: false, cross_compiling: true, CMAKE_FLAGS: "-DCMAKE_TOOLCHAIN_FILE=.github/toolchain-mingw-armv7.cmake -G Ninja", LDFLAGS: "-static -Wl,-allow-multiple-definition"}
- {runs_on: ubuntu-latest, name: "Windows ARM64", archive_name: "windows-arm64", archive_extension: ".zip", docker_container: "ghcr.io/quick-lint/quick-lint-js-github-mingw-builder:v3", test: false, cross_compiling: true, CMAKE_FLAGS: "-DCMAKE_TOOLCHAIN_FILE=.github/toolchain-mingw-aarch64.cmake -G Ninja", LDFLAGS: "-static -Wl,-allow-multiple-definition"}
runs-on: ${{ matrix.toolchain.runs_on }}
container: ${{ matrix.toolchain.docker_container }}
env:
CMAKE_CXX_COMPILER: ${{ matrix.toolchain.CXX }}
CMAKE_CXX_FLAGS: ${{ matrix.toolchain.CFLAGS }}
CMAKE_C_COMPILER: ${{ matrix.toolchain.CC }}
CMAKE_C_FLAGS: ${{ matrix.toolchain.CFLAGS }}
CMAKE_EXE_LINKER_FLAGS: ${{ matrix.toolchain.LDFLAGS }}
CMAKE_EXTRA_FLAGS: ${{ matrix.toolchain.CMAKE_FLAGS }}
CMAKE_SHARED_LINKER_FLAGS: ${{ matrix.toolchain.LDFLAGS }}
QLJS_COLLECT_COPYRIGHT_NO_WARNINGS: 1
steps:
- name: checkout
uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2
- name: update $PATH
if: ${{ matrix.toolchain.msys2_packages }}
run: |
# For DLLs needed by GCC:
echo "c:/msys64/mingw32/bin" >>"${GITHUB_PATH}"
echo "c:/msys64/ucrt64/bin" >>"${GITHUB_PATH}"
shell: bash
- name: install dependencies (Chocolatey)
if: ${{ matrix.toolchain.chocolatey_packages }}
run: choco install --yes ${{ matrix.toolchain.chocolatey_packages }}
shell: powershell
- name: install dependencies (Homebrew)
if: ${{ matrix.toolchain.homebrew_packages }}
run: brew install ${{ matrix.toolchain.homebrew_packages }}
- name: install dependencies (MSYS2)
if: ${{ matrix.toolchain.msys2_packages }}
run: c:/msys64/usr/bin/pacman.exe --sync --noconfirm ${{ matrix.toolchain.msys2_packages }}
- name: build tools for cross compilation
if: ${{ matrix.toolchain.cross_compiling }}
run: |
unset CC CXX
cmake -DCMAKE_BUILD_TYPE=Debug -DBUILD_TESTING=OFF -S . -B build-tools -G Ninja
cmake --build build-tools --config Debug --target quick-lint-js-build-tools
- name: configure
shell: "python3 {0}"
run: |
import os
import shlex
import subprocess
def var(name):
return os.environ.get(name, '')
command = [
"cmake",
"-DCMAKE_BUILD_TYPE=Release",
"-DBUILD_TESTING=${{ matrix.toolchain.test }}",
"-DCMAKE_INTERPROCEDURAL_OPTIMIZATION=YES",
"-S", ".", "-B", "build",
f"-DCMAKE_C_FLAGS={var('CMAKE_C_FLAGS')}",
f"-DCMAKE_CXX_FLAGS={var('CMAKE_CXX_FLAGS')}",
f"-DCMAKE_EXE_LINKER_FLAGS={var('CMAKE_EXE_LINKER_FLAGS')}",
f"-DCMAKE_SHARED_LINKER_FLAGS={var('CMAKE_SHARED_LINKER_FLAGS')}",
]
c_compiler = var('CMAKE_C_COMPILER')
if c_compiler: command.append(f"-DCMAKE_C_COMPILER={c_compiler}")
cxx_compiler = var('CMAKE_CXX_COMPILER')
if cxx_compiler: command.append(f"-DCMAKE_CXX_COMPILER={cxx_compiler}")
if "${{ matrix.toolchain.cross_compiling }}":
command.append(f"-DQUICK_LINT_JS_USE_BUILD_TOOLS={os.getcwd()}/build-tools")
command.extend(var('CMAKE_EXTRA_FLAGS').split())
print(" ".join(shlex.quote(arg) for arg in command), flush=True)
result = subprocess.run(command)
exit(result.returncode)
- name: build
run: cmake --build build --config Release
- name: test
if: ${{ matrix.toolchain.test }}
run: cd build && ctest --build-config Release --verbose
- name: install
run: cmake --install build --prefix usr --strip
- name: bundle build into .tar.gz
if: ${{ matrix.toolchain.archive_extension == '.tar.gz' }}
run: |
mkdir temp
mv usr temp/quick-lint-js
tar czf ${{ matrix.toolchain.archive_name }}${{ matrix.toolchain.archive_extension }} -C temp/ quick-lint-js
- name: bundle build into .zip
if: ${{ matrix.toolchain.archive_extension == '.zip' }}
uses: quick-lint/action-zip@26a249fb00d43ca98dad77a4b3838025fc226aa1 # v1.1
with:
dest: ${{ matrix.toolchain.archive_name }}${{ matrix.toolchain.archive_extension }}
files: usr/
recursive: true
- name: upload build to workflow
uses: actions/upload-artifact@0b7f8abb1508181956e8e162db84b466c27e18ce # v3.1.2
with:
if-no-files-found: error
name: quick-lint-js-${{ matrix.toolchain.archive_name }}-${{ github.sha }}
path: ${{ matrix.toolchain.archive_name }}${{ matrix.toolchain.archive_extension }}
- name: upload build to long-term storage
if: ${{ github.event_name == 'push' && github.repository_owner == 'quick-lint' != null }}
uses: quick-lint/sftp-upload@1fa54164d4bdd081207a6e54ec143d8dda3a7fb8 # v3
with:
host: ${{ secrets.artifacts_host }}
local-file-globs: ${{ matrix.toolchain.archive_name }}${{ matrix.toolchain.archive_extension }}
private-key: ${{ secrets.artifacts_key }}
remote-directory: ${{ secrets.artifacts_root }}/builds/${{ github.sha }}/manual/
user: ${{ secrets.artifacts_user }}
test:
name: test on ${{ matrix.os.name }}
needs: build
strategy:
fail-fast: false
matrix:
os:
- {runs_on: windows-latest, name: "Windows", archive_name: "windows", exe_file: "bin/quick-lint-js.exe"}
- {runs_on: macos-12, name: "macOS 12", archive_name: "macos", exe_file: "bin/quick-lint-js"}
- {runs_on: ubuntu-latest, docker_container: "archlinux:base", name: "Arch Linux", archive_name: "linux", exe_file: "bin/quick-lint-js"}
- {runs_on: ubuntu-latest, docker_container: "debian:bullseye", name: "Debian 11 Bullseye", archive_name: "linux", exe_file: "bin/quick-lint-js"}
- {runs_on: ubuntu-latest, docker_container: "debian:buster", name: "Debian 10 Buster", archive_name: "linux", exe_file: "bin/quick-lint-js"}
- {runs_on: ubuntu-latest, docker_container: "fedora:35", name: "Fedora 35", archive_name: "linux", exe_file: "bin/quick-lint-js"}
- {runs_on: ubuntu-latest, docker_container: "fedora:36", name: "Fedora 36", archive_name: "linux", exe_file: "bin/quick-lint-js"}
# TODO(strager): Fix Node.js 20 used by actions/download-artifact, or drop support for this OS.
#- {runs_on: ubuntu-latest, docker_container: "ubuntu:18.04", name: "Ubuntu 18.04 LTS Bionic", archive_name: "linux", exe_file: "bin/quick-lint-js"}
- {runs_on: ubuntu-latest, docker_container: "ubuntu:20.04", name: "Ubuntu 20.04 LTS Focal", archive_name: "linux", exe_file: "bin/quick-lint-js"}
runs-on: ${{ matrix.os.runs_on }}
container: ${{ matrix.os.docker_container }}
steps:
- name: OS information
run: |
exec 2>&1
set -x
cat /etc/lsb-release || :
cat /etc/os-release || :
cat /etc/system-release || :
sw_vers || :
systeminfo || :
uname -a || :
shell: bash
- uses: actions/download-artifact@9bc31d5ccc31df68ecc42ccf4149144866c47d8a # v3.0.2
with:
name: quick-lint-js-${{ matrix.os.archive_name }}-${{ github.sha }}
- name: unpack .zip build
if: ${{ matrix.os.archive_name == 'windows' }}
run: Expand-Archive -LiteralPath ${{ matrix.os.archive_name }}.zip -DestinationPath quick-lint-js
shell: powershell
- name: unpack .tar.gz build
if: ${{ matrix.os.archive_name != 'windows' }}
run: tar xf ${{ matrix.os.archive_name }}.tar.gz
- name: test
run: DYLD_BIND_AT_LAUNCH=1 LD_BIND_NOW=1 quick-lint-js/${{ matrix.os.exe_file }} --version
shell: bash
package-npm:
name: npm package
needs: [build, test]
runs-on: ubuntu-latest
steps:
- name: checkout
uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2
- uses: actions/download-artifact@9bc31d5ccc31df68ecc42ccf4149144866c47d8a # v3.0.2
with:
name: quick-lint-js-linux-${{ github.sha }}
path: ./
- uses: actions/download-artifact@9bc31d5ccc31df68ecc42ccf4149144866c47d8a # v3.0.2
with:
name: quick-lint-js-linux-armhf-${{ github.sha }}
path: ./
- uses: actions/download-artifact@9bc31d5ccc31df68ecc42ccf4149144866c47d8a # v3.0.2
with:
name: quick-lint-js-linux-aarch64-${{ github.sha }}
path: ./
- uses: actions/download-artifact@9bc31d5ccc31df68ecc42ccf4149144866c47d8a # v3.0.2
with:
name: quick-lint-js-macos-${{ github.sha }}
path: ./
- uses: actions/download-artifact@9bc31d5ccc31df68ecc42ccf4149144866c47d8a # v3.0.2
with:
name: quick-lint-js-macos-aarch64-${{ github.sha }}
path: ./
- uses: actions/download-artifact@9bc31d5ccc31df68ecc42ccf4149144866c47d8a # v3.0.2
with:
name: quick-lint-js-windows-${{ github.sha }}
path: ./
- uses: actions/download-artifact@9bc31d5ccc31df68ecc42ccf4149144866c47d8a # v3.0.2
with:
name: quick-lint-js-windows-x86-${{ github.sha }}
path: ./
- uses: actions/download-artifact@9bc31d5ccc31df68ecc42ccf4149144866c47d8a # v3.0.2
with:
name: quick-lint-js-windows-arm64-${{ github.sha }}
path: ./
- name: extract downloaded archives
run: |
set -x
tar xf linux.tar.gz
mv quick-lint-js dist/npm/linux-x64
tar xf linux-armhf.tar.gz
mv quick-lint-js dist/npm/linux-arm
tar xf linux-aarch64.tar.gz
mv quick-lint-js dist/npm/linux-arm64
tar xf macos.tar.gz
mv quick-lint-js dist/npm/darwin-x64
tar xf macos-aarch64.tar.gz
mv quick-lint-js dist/npm/darwin-arm64
mkdir dist/npm/win32-x64
unzip windows.zip -d dist/npm/win32-x64/
mkdir dist/npm/win32-arm64
unzip windows-arm64.zip -d dist/npm/win32-arm64/
mkdir dist/npm/win32-ia32
unzip windows-x86.zip -d dist/npm/win32-ia32/
- name: package
run: npm pack ./dist/npm
- name: upload package to workflow
uses: actions/upload-artifact@0b7f8abb1508181956e8e162db84b466c27e18ce # v3.1.2
with:
if-no-files-found: error
name: quick-lint-js-npm-${{ github.sha }}
path: quick-lint-js-*.tgz
- name: upload package to long-term storage
if: ${{ github.event_name == 'push' && github.repository_owner == 'quick-lint' != null }}
uses: quick-lint/sftp-upload@1fa54164d4bdd081207a6e54ec143d8dda3a7fb8 # v3
with:
host: ${{ secrets.artifacts_host }}
local-file-globs: quick-lint-js-*.tgz
private-key: ${{ secrets.artifacts_key }}
remote-directory: ${{ secrets.artifacts_root }}/builds/${{ github.sha }}/npm/
user: ${{ secrets.artifacts_user }}
test-npm-package:
name: test npm package on ${{ matrix.os.name }} with ${{ matrix.manager.name }}
needs: package-npm
strategy:
fail-fast: false
matrix:
os:
- {runs_on: windows-latest, name: "Windows", test_cmd: true}
- {runs_on: macos-12, name: "macOS 12"}
- {runs_on: ubuntu-latest, name: "Ubuntu", global_install_command_prefix: "sudo"}
manager:
- {name: "npm", install_command: "npm install", global: false}
- {name: "npm (--global)", install_command: "npm install --global --unsafe-perm", global: true}
- {name: "Yarn", install_command: "yarn add", global: false}
runs-on: ${{ matrix.os.runs_on }}
steps:
- uses: actions/download-artifact@9bc31d5ccc31df68ecc42ccf4149144866c47d8a # v3.0.2
with:
name: quick-lint-js-npm-${{ github.sha }}
- name: install globally
if: ${{ matrix.manager.global }}
run: ${{ matrix.os.global_install_command_prefix }} ${{ matrix.manager.install_command }} ./quick-lint-js-*.tgz
shell: bash
- name: test globally
if: ${{ matrix.manager.global }}
run: quick-lint-js --version
- name: install locally
if: ${{ !matrix.manager.global }}
run: |
echo '{}' >package.json
${{ matrix.manager.install_command }} ./quick-lint-js-*.tgz
shell: bash
- name: test locally
if: ${{ !matrix.manager.global }}
run: ./node_modules/.bin/quick-lint-js --version
shell: bash
- name: test locally (.cmd)
if: ${{ !matrix.manager.global && matrix.os.test_cmd }}
run: node_modules/.bin/quick-lint-js.cmd --version
package-chocolatey:
name: Chocolatey package
needs: build
runs-on: ubuntu-latest
container: ghcr.io/quick-lint/quick-lint-js-github-go-builder:v1
steps:
- name: checkout
uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2
- uses: actions/download-artifact@9bc31d5ccc31df68ecc42ccf4149144866c47d8a # v3.0.2
with:
name: quick-lint-js-windows-${{ github.sha }}
path: ./
- uses: actions/download-artifact@9bc31d5ccc31df68ecc42ccf4149144866c47d8a # v3.0.2
with:
name: quick-lint-js-windows-x86-${{ github.sha }}
path: ./
- name: package
run: go run ./dist/chocolatey/build.go -x86-ZIP ./windows-x86.zip -x64-ZIP ./windows.zip -Out ./quick-lint-js.nupkg
- name: upload package to workflow
uses: actions/upload-artifact@0b7f8abb1508181956e8e162db84b466c27e18ce # v3.1.2
with:
if-no-files-found: error
name: quick-lint-js-chocolatey-${{ github.sha }}
path: quick-lint-js.nupkg
- name: upload package to long-term storage
if: ${{ github.event_name == 'push' && github.repository_owner == 'quick-lint' != null }}
uses: quick-lint/sftp-upload@1fa54164d4bdd081207a6e54ec143d8dda3a7fb8 # v3
with:
host: ${{ secrets.artifacts_host }}
local-file-globs: quick-lint-js.nupkg
private-key: ${{ secrets.artifacts_key }}
remote-directory: ${{ secrets.artifacts_root }}/builds/${{ github.sha }}/chocolatey/
user: ${{ secrets.artifacts_user }}
test-chocolatey-package:
name: test Chocolatey package
needs: package-chocolatey
runs-on: windows-latest
steps:
- uses: actions/download-artifact@9bc31d5ccc31df68ecc42ccf4149144866c47d8a # v3.0.2
with:
name: quick-lint-js-chocolatey-${{ github.sha }}
- name: install
run: choco install quick-lint-js -s .
- name: test
run: quick-lint-js --version
package-scoop:
name: Scoop package
needs: build
runs-on: ubuntu-latest
container: ghcr.io/quick-lint/quick-lint-js-github-go-builder:v1
steps:
- name: checkout
uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2
- uses: actions/download-artifact@9bc31d5ccc31df68ecc42ccf4149144866c47d8a # v3.0.2
with:
name: quick-lint-js-windows-${{ github.sha }}
path: ./
- uses: actions/download-artifact@9bc31d5ccc31df68ecc42ccf4149144866c47d8a # v3.0.2
with:
name: quick-lint-js-windows-x86-${{ github.sha }}
path: ./
- name: create manifest
run: go run ./dist/scoop/make-manifest.go -BaseURI 'https://c.quick-lint-js.com/builds/${{ github.sha }}/' -x86-ZIP ./windows-x86.zip -x64-ZIP ./windows.zip -Out ./quick-lint-js.json
- name: upload manifest to workflow
uses: actions/upload-artifact@0b7f8abb1508181956e8e162db84b466c27e18ce # v3.1.2
with:
if-no-files-found: error
name: quick-lint-js-scoop-${{ github.sha }}
path: quick-lint-js.json
- name: upload manifest to long-term storage
if: ${{ github.event_name == 'push' && github.repository_owner == 'quick-lint' != null }}
uses: quick-lint/sftp-upload@1fa54164d4bdd081207a6e54ec143d8dda3a7fb8 # v3
with:
host: ${{ secrets.artifacts_host }}
local-file-globs: quick-lint-js.json
private-key: ${{ secrets.artifacts_key }}
remote-directory: ${{ secrets.artifacts_root }}/builds/${{ github.sha }}/scoop/
user: ${{ secrets.artifacts_user }}
package-msix:
name: MSIX installer
needs: build
runs-on: windows-2022
steps:
- name: checkout
uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2
- uses: actions/download-artifact@9bc31d5ccc31df68ecc42ccf4149144866c47d8a # v3.0.2
with:
name: quick-lint-js-windows-${{ github.sha }}
path: ./
- name: extract ZIP
run: Expand-Archive -LiteralPath windows.zip -DestinationPath quick-lint-js
shell: powershell
- name: create MSIX
run: |
PATH="${PATH}:/c/Program Files (x86)/Windows Kits/10/App Certification Kit"
go run ./dist/msix/build-unsigned-msix.go -EXE ./quick-lint-js/bin/quick-lint-js.exe -License ./quick-lint-js/share/doc/quick-lint-js/copyright -Out quick-lint-js.msix
shell: bash
- name: upload MSIX to workflow
uses: actions/upload-artifact@0b7f8abb1508181956e8e162db84b466c27e18ce # v3.1.2
with:
if-no-files-found: error
name: quick-lint-js-msix-${{ github.sha }}
path: quick-lint-js.msix
- name: upload MSIX to long-term storage
if: ${{ github.event_name == 'push' && github.repository_owner == 'quick-lint' != null }}
uses: quick-lint/sftp-upload@1fa54164d4bdd081207a6e54ec143d8dda3a7fb8 # v3
with:
host: ${{ secrets.artifacts_host }}
local-file-globs: quick-lint-js.msix
private-key: ${{ secrets.artifacts_key }}
remote-directory: ${{ secrets.artifacts_root }}/builds/${{ github.sha }}/windows/
user: ${{ secrets.artifacts_user }}
package-winget:
name: winget manifests
needs: package-msix
runs-on: ubuntu-latest
container: ghcr.io/quick-lint/quick-lint-js-github-go-builder:v1
steps:
- name: checkout
uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2
- uses: actions/download-artifact@9bc31d5ccc31df68ecc42ccf4149144866c47d8a # v3.0.2
with:
name: quick-lint-js-msix-${{ github.sha }}
path: ./
- name: create manifests
run: go run ./dist/winget/make-manifests.go -BaseURI 'https://c.quick-lint-js.com/builds/${{ github.sha }}/' -MSIX ./quick-lint-js.msix -OutDir winget-manifests
- name: upload manifests to workflow
uses: actions/upload-artifact@0b7f8abb1508181956e8e162db84b466c27e18ce # v3.1.2
with:
if-no-files-found: error
name: quick-lint-js-winget-${{ github.sha }}
path: winget-manifests/
- name: upload manifests to long-term storage
if: ${{ github.event_name == 'push' && github.repository_owner == 'quick-lint' != null }}
uses: quick-lint/sftp-upload@1fa54164d4bdd081207a6e54ec143d8dda3a7fb8 # v3
with:
host: ${{ secrets.artifacts_host }}
local-file-globs: winget-manifests/*
private-key: ${{ secrets.artifacts_key }}
remote-directory: ${{ secrets.artifacts_root }}/builds/${{ github.sha }}/winget/
user: ${{ secrets.artifacts_user }}
# quick-lint-js finds bugs in JavaScript programs.
# Copyright (C) 2020 Matthew Glazar
#
# This file is part of quick-lint-js.
#
# quick-lint-js is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# quick-lint-js is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with quick-lint-js. If not, see <https://www.gnu.org/licenses/>.