-
-
Notifications
You must be signed in to change notification settings - Fork 7
130 lines (111 loc) · 4.24 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
name: ci
on:
push:
branches:
- main
- release-*
pull_request:
branches:
- main
- release-*
jobs:
native:
strategy:
matrix:
os:
- name: windows
target: windows-2019
- name: linux
target: ubuntu-latest
- name: macos
target: macos-latest
runtime:
- label: node v16
runtime: node
node_version: 16
- label: node v18
runtime: node
node_version: 18
- label: electron
runtime: electron
node_version: 18
name: "${{ matrix.os.name }} (${{ matrix.runtime.label }})"
runs-on: ${{ matrix.os.target }}
steps:
- uses: actions/checkout@v3
- name: use node ${{ matrix.runtime.node_version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.runtime.node_version }}
registry-url: 'https://registry.npmjs.org'
cache: 'yarn'
- name: yarn install
run: yarn install --immutable
- name: generate native packages
run: |
yarn run generate-native-packages
- name: build ${{ matrix.runtime.runtime }} binaries
run: yarn run build-${{ matrix.runtime.runtime }}-${{ matrix.os.name }}
test:
runs-on: ubuntu-latest
strategy:
matrix:
node:
- "*"
- lts/*
# - lts/-1
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node }}
registry-url: 'https://registry.npmjs.org'
cache: 'yarn'
- name: install
run: |
yarn install --immutable
- name: build
run: |
yarn run clean
yarn run prebuild
yarn run build
- name: test
run: |
yarn run test --selectProjects "collections-hash ts-worker"
yarn run test --selectProjects "async-autoresetevent async-barrier async-conditionvariable async-countdown async-deferred async-manualresetevent async-mutex async-queue async-readerwriterlock async-semaphore async-stack canceltoken"
yarn run test --selectProjects "collection-core collection-core-shim collections-hashmap collections-hashset collections-multimap collections-sortedmap collections-sortedset"
yarn run test --selectProjects "async-iter-fn async-iter-fromsync async-iter-query iter-fn iter-lookup iter-query"
yarn run test --selectProjects "threading-autoresetevent threading-conditionvariable threading-manualresetevent threading-mutex threading-sleep"
yarn run test --selectProjects "decorators disposable equatable equatable-shim fn fn-partial indexed-object lazy ref reflect-metadata-compat struct-type"
- name: test (esm output)
run: |
yarn run test-esm --selectProjects "async-autoresetevent async-barrier async-conditionvariable async-countdown async-deferred async-manualresetevent async-mutex async-queue async-readerwriterlock async-semaphore async-stack canceltoken"
yarn run test-esm --selectProjects "collections-hash collection-core collection-core-shim collections-hashmap collections-hashset collections-multimap collections-sortedmap collections-sortedset"
yarn run test-esm --selectProjects "async-iter-fn async-iter-fromsync async-iter-query iter-fn iter-lookup iter-query"
yarn run test-esm --selectProjects "threading-autoresetevent threading-conditionvariable threading-manualresetevent threading-mutex threading-sleep"
yarn run test-esm --selectProjects "decorators disposable equatable equatable-shim fn fn-partial indexed-object lazy ref reflect-metadata-compat struct-type"
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- uses: actions/setup-node@v3
with:
node-version: 16
registry-url: 'https://registry.npmjs.org'
cache: 'yarn'
- name: install
run: |
yarn install --immutable
- name: build
run: |
yarn run clean
yarn run prebuild
yarn run build
- name: verify
run: |
yarn run verify
yarn run prepack