This repository has been archived by the owner on Jun 23, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
47 lines (40 loc) · 1.72 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
# This workflow will do a clean install of node dependencies, cache/restore them, build the source code and run tests across different versions of node
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions
name: CI
on:
push:
branches: [main]
pull_request:
branches: [main]
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-20.04
strategy:
matrix:
node-version: [17.x]
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/
steps:
- uses: actions/checkout@v2
with:
submodules: "recursive"
# We download clang v13 since that's what a user would do and we want to ensure compat
# Since we also have it as a submodule, we could built it instead
- name: Download libclang v13.0.0
run: curl -LJO "https://github.com/llvm/llvm-project/releases/download/llvmorg-13.0.0/clang+llvm-13.0.0-x86_64-linux-gnu-ubuntu-20.04.tar.xz"
- name: Extract libclang v13.0.0
run: tar -xvf *.tar.xz
# Configure node, install deps, transpile typescript
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node-version }}
- run: npm ci
- run: npm run bootstrap
- run: npm run build
- run: npm run bootstrap
# Prepare for test, and test
- name: Set env variables
run: echo "LIBCLANG_LIB_PATH=${PWD}/clang+llvm-13.0.0-x86_64-linux-gnu-ubuntu-20.04/lib/libclang.so" >> $GITHUB_ENV && echo "C_INCLUDE_PATH=${PWD}/clang+llvm-13.0.0-x86_64-linux-gnu-ubuntu-20.04/lib/clang/13.0.0/include" >> $GITHUB_ENV
- run: env
- run: npm test