Skip to content

Commit 454f416

Browse files
committed
Improved CI workflow
- renamed variables in prep for host != target builds - added more debug info to step after building binary - altered job name to include more system info - configured builds to always be verbose
1 parent 1ed91fa commit 454f416

File tree

1 file changed

+16
-11
lines changed

1 file changed

+16
-11
lines changed

.github/workflows/ci.yml

Lines changed: 16 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ jobs:
2222
- macos-latest
2323
- ubuntu-latest
2424
- windows-latest
25-
architecture:
25+
target:
2626
- x64
2727
node:
2828
- 10
@@ -37,43 +37,48 @@ jobs:
3737
include:
3838
- os: windows-latest
3939
node: 16
40-
architecture: x86
41-
name: ${{ matrix.os }} ${{ matrix.architecture }} - Node ${{ matrix.node }}
40+
target: x86
41+
name: ${{ matrix.os }} (node=${{ matrix.node }}, target=${{ matrix.target }})
4242
steps:
4343
- uses: actions/checkout@v3
4444
- uses: actions/setup-node@v3
4545
with:
4646
node-version: ${{ matrix.node }}
47-
architecture: ${{ matrix.architecture }}
47+
architecture: ${{ matrix.target }}
4848

4949
- name: Add msbuild to PATH
5050
uses: microsoft/[email protected]
5151
if: contains(matrix.os, 'windows')
5252
with:
53-
msbuild-architecture: ${{ matrix.architecture }}
53+
msbuild-architecture: ${{ matrix.target }}
5454

5555
- name: Install dependencies
5656
run: yarn install --ignore-scripts
5757

58+
- name: Add env vars
59+
run: |
60+
echo "V=1" >> $GITHUB_ENV
61+
5862
- name: Add Linux env vars
5963
if: contains(matrix.os, 'ubuntu')
6064
run: |
6165
echo "CFLAGS=${CFLAGS:-} -include ../src/gcc-preinclude.h" >> $GITHUB_ENV
6266
echo "CXXFLAGS=${CXXFLAGS:-} -include ../src/gcc-preinclude.h" >> $GITHUB_ENV
63-
echo "V=1" >> $GITHUB_ENV
6467
6568
- name: Configure build
6669
run: yarn node-pre-gyp configure
6770

6871
- name: Build binaries
6972
run: yarn node-pre-gyp build
7073

71-
- name: Print glibc linking
74+
- name: Print binary info
7275
if: contains(matrix.os, 'ubuntu')
7376
run: |
7477
ldd lib/binding/*/node_sqlite3.node
7578
echo "---"
7679
nm lib/binding/*/node_sqlite3.node | grep "GLIBC_" | c++filt || true
80+
echo "---"
81+
file lib/binding/napi-v*/*
7782
7883
- name: Run tests
7984
run: yarn test
@@ -102,17 +107,17 @@ jobs:
102107
matrix:
103108
node:
104109
- 16
105-
architecture:
110+
target:
106111
- linux/arm64
107112
variant:
108113
- bullseye
109114
- alpine
110115
include:
111116
# musl x64 builds
112-
- architecture: linux/amd64
117+
- target: linux/amd64
113118
variant: alpine
114119
node: 16
115-
name: ${{ matrix.variant }} ${{ matrix.architecture }} - Node ${{ matrix.node }}
120+
name: ${{ matrix.variant }} (node=${{ matrix.node }}, target=${{ matrix.target }})
116121
steps:
117122
- uses: actions/checkout@v3
118123

@@ -128,7 +133,7 @@ jobs:
128133
--file ./tools/BinaryBuilder.Dockerfile \
129134
--load \
130135
--tag sqlite-builder \
131-
--platform ${{ matrix.architecture }} \
136+
--platform ${{ matrix.target }} \
132137
--no-cache \
133138
--build-arg VARIANT=${{ matrix.variant }} \
134139
--build-arg NODE_VERSION=${{ matrix.node }} \

0 commit comments

Comments
 (0)