-
Notifications
You must be signed in to change notification settings - Fork 64
131 lines (114 loc) · 3.14 KB
/
builds.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
name: CI
on:
push:
branches: [master]
pull_request:
branches: [master]
jobs:
test:
runs-on: ${{ matrix.os.host }}
strategy:
matrix:
node: [14, 16, 18]
build_type: ["debug", "release"]
os:
- name: darwin
architecture: x86-64
host: macos-11
- name: linux
architecture: x86-64
host: ubuntu-20.04
name: ${{ matrix.os.name }}-${{ matrix.os.architecture }}-node${{ matrix.node }}-${{ matrix.build_type }} test
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install distutils
- name: Test
run: |
npm ci
./scripts/setup.sh --config local.env
source local.env
make ${{ matrix.build_type }}
npm test
asan-build-test:
runs-on: ubuntu-20.04
name: ASAN toolset test
env:
BUILDTYPE: debug
TOOLSET: asan
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: "14"
- name: Test
run: |
npm ci
./scripts/setup.sh --config local.env
source local.env
export CXXFLAGS="${MASON_SANITIZE_CXXFLAGS} -fno-sanitize-recover=all"
export LDFLAGS="${MASON_SANITIZE_LDFLAGS}"
make ${BUILDTYPE}
export LD_PRELOAD=${MASON_LLVM_RT_PRELOAD}
export ASAN_OPTIONS=fast_unwind_on_malloc=0:${ASAN_OPTIONS}
npm test
unset LD_PRELOAD
g-build-test:
runs-on: ubuntu-20.04
name: G++ build test
env:
BUILDTYPE: debug
CXX: g++-9
CC: gcc-9
CXXFLAGS: -fext-numeric-literals
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: "14"
- name: Test
run: |
npm ci
./scripts/setup.sh --config local.env
source local.env
make ${BUILDTYPE}
npm test
build:
needs: [test, asan-build-test, g-build-test]
runs-on: ${{ matrix.os.host }}
strategy:
matrix:
os:
- name: darwin
architecture: x86-64
host: macos-11
- name: linux
architecture: x86-64
host: ubuntu-20.04
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: "16"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install distutils
- name: Build
run: |
./scripts/setup.sh --config local.env
source local.env
make release
- name: Prebuildify ${{ matrix.os.name }}-${{ matrix.os.architecture }}
run: npm run prebuildify -- --platform=${{ matrix.os.name }} --arch=x64
# Upload the end-user binary artifact
- uses: actions/upload-artifact@v3
with:
name: prebuilds
path: prebuilds
retention-days: 14