forked from louislam/node-sqlite3
-
Notifications
You must be signed in to change notification settings - Fork 5
106 lines (95 loc) · 3.16 KB
/
Copy pathdebian.yaml
File metadata and controls
106 lines (95 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
100
101
102
103
104
105
106
name: debian
on:
workflow_dispatch:
env:
FORCE_COLOR: 1
concurrency:
group: ${{ github.head_ref || github.run_id }}
cancel-in-progress: true
jobs:
build-qemu:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
include:
- target: linux/amd64
node: 24
node_gyp: 12
- target: linux/arm64
node: 24
node_gyp: 12
- target: linux/ppc64le
node: 24
node_gyp: 12
- target: linux/arm/v7
node: 22
node_gyp: 12
- target: linux/s390x
node: 20
node_gyp: 12
name: slim (node=${{ matrix.node }}, target=${{ matrix.target }})
steps:
- uses: actions/checkout@v7
- name: Set up QEMU
uses: docker/setup-qemu-action@v4
- name: Setup Docker Buildx
uses: docker/setup-buildx-action@v4
- name: Add env vars
id: vars
shell: bash
run: |
echo "V=1" >> $GITHUB_ENV
if [[ "${{ matrix.target }}" = "linux/arm/v7" ]]; then
TARGET=arm
elif [ "${{ matrix.target }}" = "linux/arm64" ]; then
TARGET=arm64
elif [ "${{ matrix.target }}" = "linux/amd64" ]; then
TARGET=x64
elif [ "${{ matrix.target }}" = "linux/ppc64le" ]; then
TARGET=ppc64
elif [ "${{ matrix.target }}" = "linux/s390x" ]; then
TARGET=s390x
fi
echo "TARGET=$TARGET" >> $GITHUB_ENV
echo "artifact_name=prebuilt-binaries-debian-$TARGET" >> $GITHUB_OUTPUT
cat $GITHUB_ENV
- name: Build binaries and test
run: |
docker buildx build \
--file ./tools/BinaryBuilder-debian.Dockerfile \
--load \
--tag sqlite-builder \
--platform ${{ matrix.target }} \
--no-cache \
--build-arg VARIANT=slim \
--build-arg TARGET=${{ env.TARGET }} \
--build-arg NODE_VERSION=${{ matrix.node }} \
--build-arg NODE_GYP_VERSION=${{ matrix.node_gyp }} \
.
CONTAINER_ID=$(docker create -it sqlite-builder)
docker cp $CONTAINER_ID:/usr/src/build/build/ ./build
- name: Test database I/O
run: |
docker run --rm \
sqlite-builder \
node node_modules/mocha/bin/mocha --timeout 480000 \
test/io_compat.test.js test/musl_legacy_io.test.js
- name: Verify glibc binary uses positional I/O
run: |
docker run --rm sqlite-builder sh -c '
nm -u lib/binding/*/node_sqlite3.node | grep -Eq "[[:space:]]pwrite(64)?(@|$)"
'
- name: Upload binaries to commit artifacts
uses: actions/upload-artifact@v7
with:
name: ${{ steps.vars.outputs.artifact_name }}
path: build/stage/*/*
retention-days: 7
- uses: actions/setup-node@v6
with:
node-version: 24
- name: Upload binaries to GitHub Release
run: npm ci --ignore-scripts && node tools/publish-prebuild.js
env:
NODE_PRE_GYP_GITHUB_TOKEN: ${{ secrets.API_TOKEN }}