-
Notifications
You must be signed in to change notification settings - Fork 29
99 lines (83 loc) · 3.16 KB
/
Copy pathci.yaml
File metadata and controls
99 lines (83 loc) · 3.16 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
name: CI
on:
push:
branches:
- master
pull_request:
schedule:
- cron: "0 1 * * *"
jobs:
node-compatibility:
name: "Node ${{ matrix.node }} (LLVM 12)"
runs-on: ubuntu-20.04
strategy:
matrix:
node: [16, 15, 14, 12]
steps:
- name: Check out repository
uses: actions/checkout@v2
- name: Install LLVM
run: |
wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key|sudo apt-key add -
echo "deb http://apt.llvm.org/focal/ llvm-toolchain-focal-12 main" | sudo tee -a /etc/apt/sources.list
sudo apt-get update -qq
sudo apt-get install libllvm12 llvm-12 llvm-12-dev
npm config set cmake_LLVM_DIR $(llvm-config-12 --cmakedir)
- name: Set-up node
uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node }}
- name: Get yarn cache directory path
id: yarn-cache-dir-path
run: echo "::set-output name=dir::$(yarn cache dir)"
- uses: actions/cache@v2
id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`)
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
- name: Yarn install
run: yarn --non-interactive --frozen-lockfile --ignore-scripts
- name: Build
run: CMAKE_BUILD_PARALLEL_LEVEL=$(nproc) yarn build
- name: Validate typescript definitions
run: yarn tsc --strict --noEmit --types . llvm-node.d.ts
- name: Test
run: yarn test --ci --coverage
llvm-compatibility:
name: "LLVM ${{ matrix.llvm }}"
runs-on: ubuntu-20.04
strategy:
matrix:
llvm: [12, 11, 10, 9]
steps:
- name: Check out repository
uses: actions/checkout@v2
- name: Install LLVM
run: |
wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key|sudo apt-key add -
echo "deb http://apt.llvm.org/focal/ llvm-toolchain-focal-${{ matrix.llvm }} main" | sudo tee -a /etc/apt/sources.list
sudo apt-get update -qq
sudo apt-get install libllvm${{ matrix.llvm }} llvm-${{ matrix.llvm }} llvm-${{ matrix.llvm }}-dev
npm config set cmake_LLVM_DIR $(llvm-config-${{ matrix.llvm }} --cmakedir)
- name: Set-up node
uses: actions/setup-node@v2
with:
node-version: "*"
- name: Get yarn cache directory path
id: yarn-cache-dir-path
run: echo "::set-output name=dir::$(yarn cache dir)"
- uses: actions/cache@v2
id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`)
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
- name: Yarn install
run: yarn --non-interactive --frozen-lockfile --ignore-scripts
- name: Build
run: CMAKE_BUILD_PARALLEL_LEVEL=$(nproc) yarn build
- name: Test
run: yarn test --ci --coverage