-
Notifications
You must be signed in to change notification settings - Fork 44
173 lines (173 loc) · 6.43 KB
/
prebuild.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
name: Test and Prebuild
on: [push]
jobs:
build-test-macos:
#if: startsWith(github.ref, 'refs/tags/')
env:
LMDB_DATA_V1: ${{ contains(github.ref, '-v1') }}
runs-on: macos-12
steps:
- uses: actions/checkout@v4
- name: Setup node
uses: actions/setup-node@v4
with:
node-version: 16
- uses: denoland/setup-deno@v1
with:
deno-version: v1.x
- run: python3 -m pip install setuptools
- run: npm install
- run: npm run build
#- run: npm run deno-test
- run: npm test
if: ${{ !contains(github.ref, '-v1') }}
- run: npm run prebuild-macos
# if: startsWith(github.ref, 'refs/tags/')
- run: npm run prebuild-macos
if: startsWith(github.ref, 'refs/tags/')
env:
PREBUILD_ARCH: arm64
- run: tar --create --format ustar --verbose --file=prebuild-darwin.tar -C prebuilds .
if: startsWith(github.ref, 'refs/tags/')
- name: Prebuild
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
with:
files: prebuild-darwin.tar
build-test-win32:
#if: startsWith(github.ref, 'refs/tags/')
env:
LMDB_DATA_V1: ${{ contains(github.ref, '-v1') }}
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
- name: Setup node
uses: actions/setup-node@v4
with:
node-version: 16
- run: npm install
- run: npm run build
- run: npm test
if: ${{ !contains(github.ref, '-v1') }}
- run: npm run prebuild-win32
- run: tar --create --verbose --file=prebuild-win32.tar -C prebuilds .
if: startsWith(github.ref, 'refs/tags/')
- name: Prebuild
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
with:
files: prebuild-win32.tar
build-centos-7:
if: startsWith(github.ref, 'refs/tags/')
env:
LMDB_DATA_V1: ${{ contains(github.ref, '-v1') }}
ACTIONS_ALLOW_USE_UNSECURE_NODE_VERSION: true # workaround for terrible checkout bug: https://github.com/actions/checkout/issues/1809
ACTIONS_RUNNER_FORCED_INTERNAL_NODE_VERSION: node16
ACTIONS_RUNNER_FORCE_ACTIONS_NODE_VERSION: node16
runs-on: ubuntu-20.04
container: quay.io/pypa/manylinux2014_x86_64
steps:
- uses: actions/checkout@v3
- name: Setup node
uses: actions/setup-node@v3
with:
node-version: 16
- run: yum update -y && yum install -y python3
- run: curl https://raw.githubusercontent.com/kriszyp/musl-bins/main/aarch64-linux-musl-cross.tgz --insecure --output aarch64-linux-musl-cross.tgz
- run: tar -xf aarch64-linux-musl-cross.tgz && pwd && ls
- run: curl https://raw.githubusercontent.com/kriszyp/musl-bins/main/armv7l-linux-musleabihf-cross.tgz --insecure --output armv7l-linux-musleabihf-cross.tgz
- run: tar -xf armv7l-linux-musleabihf-cross.tgz && pwd && ls
- run: curl https://raw.githubusercontent.com/kriszyp/musl-bins/main/x86_64-linux-musl-native.tgz --insecure --output x86_64-linux-musl-native.tgz
- run: tar -xf x86_64-linux-musl-native.tgz && pwd && ls
- run: npm install
- run: npm run prebuild-libc-musl
if: startsWith(github.ref, 'refs/tags/')
env:
PREBUILD_LIBC: musl
PREBUILD_ARCH: arm64
CC: ${PWD}/aarch64-linux-musl-cross/bin/aarch64-linux-musl-gcc
CXX: ${PWD}/aarch64-linux-musl-cross/bin/aarch64-linux-musl-g++
- run: npm run prebuild-libc-musl
if: startsWith(github.ref, 'refs/tags/')
env:
PREBUILD_LIBC: musl
PREBUILD_ARCH: arm
PREBUILD_ARMV: 7
CC: ${PWD}/armv7l-linux-musleabihf-cross/bin/armv7l-linux-musleabihf-gcc
CXX: ${PWD}/armv7l-linux-musleabihf-cross/bin/armv7l-linux-musleabihf-g++
- run: npm run prebuild-libc-musl
if: startsWith(github.ref, 'refs/tags/')
env:
PREBUILD_LIBC: musl
PREBUILD_ARCH: x64
CC: ${PWD}/x86_64-linux-musl-native/bin/x86_64-linux-musl-gcc
CXX: ${PWD}/x86_64-linux-musl-native/bin/x86_64-linux-musl-g++
- run: npm run prebuild-libc
- run: ls prebuilds/linux-x64
#- run: cp prebuilds/linux-x64/node.abi93.glibc.node prebuilds/linux-x64/node.abi92.glibc.node
#- run: npm run prebuildify
# env:
# ENABLE_FAST_API_CALLS: true
- run: npm run build-js
- run: chmod 777 test
- run: npm test
if: ${{ !contains(github.ref, '-v1') }}
- run: tar --create --verbose --file=prebuild-linux.tar -C prebuilds .
- name: Prebuild
if: startsWith(github.ref, 'refs/tags/')
uses: softprops/action-gh-release@v1
with:
files: prebuild-linux.tar
test-deno:
if: ${{ !contains(github.ref, '-v1') }}
runs-on: ubuntu-20.04
container: node:18
steps:
- run: echo "LMDB_DATA_V1 is $LMDB_DATA_V1"
- uses: actions/checkout@v3
- uses: denoland/setup-deno@v1
with:
deno-version: v1.x
#- run: sudo apt-get update
#- run: sudo apt-get install python
- run: npm install
- run: npm run build
- run: chmod 777 test
#- run: npm run deno-test
- run: npm test
env:
TEST_CJS: true
build-linux-arm:
#if: startsWith(github.ref, 'refs/tags/')
env:
LMDB_DATA_V1: ${{ contains(github.ref, '-v1') }}
runs-on: ubuntu-20.04
#container: quay.io/pypa/manylinux_2_24_x86_64
steps:
- run: sudo apt-get update
- run: sudo apt-get install -y gcc-aarch64-linux-gnu gcc-arm-linux-gnueabihf g++-aarch64-linux-gnu g++-arm-linux-gnueabihf
- run: ldd --version ldd
- uses: actions/checkout@v3
- name: Setup node
uses: actions/setup-node@v3
with:
node-version: 16
- run: npm install
- run: npm run prebuild-libc
if: startsWith(github.ref, 'refs/tags/')
env:
PREBUILD_ARCH: arm64
CC: aarch64-linux-gnu-gcc
CXX: aarch64-linux-gnu-g++
- run: npm run prebuild-libc-arm7
env:
PREBUILD_ARCH: arm
PREBUILD_ARMV: 7
CC: arm-linux-gnueabihf-gcc
CXX: arm-linux-gnueabihf-g++
- run: tar --create --verbose --file=prebuild-linux-arm.tar -C prebuilds .
- name: Prebuild
if: startsWith(github.ref, 'refs/tags/')
uses: softprops/action-gh-release@v1
with:
files: prebuild-linux-arm.tar