Skip to content

Commit 46692c3

Browse files
authored
Merge pull request #528 from zeromq/alpine [skip ci]
2 parents 70088b1 + bcd2f39 commit 46692c3

File tree

1 file changed

+31
-3
lines changed

1 file changed

+31
-3
lines changed

.github/workflows/CI.yml

Lines changed: 31 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,10 @@ jobs:
2727
- false
2828
zmq_version:
2929
- 4.3.4
30+
docker:
31+
- ""
32+
docker_cmd:
33+
- ""
3034

3135
include:
3236
- os: windows-2022
@@ -61,6 +65,16 @@ jobs:
6165
zmq_draft: false
6266
zmq_version: 4.3.4
6367

68+
- os: ubuntu-22.04
69+
docker: node:18-alpine
70+
docker_cmd: apk add --no-cache pkgconfig curl tar python3 make gcc g++ cmake musl-dev && npm i -g pnpm && pnpm install && pnpm run prebuild
71+
node_version: 18
72+
node_arch: x64
73+
ARCH: x64
74+
cpp_arch: x64
75+
zmq_draft: false
76+
zmq_version: 4.3.4
77+
6478
env:
6579
ZMQ_VERSION: ${{ matrix.zmq_version }}
6680
ZMQ_DRAFT: ${{ matrix.zmq_draft }}
@@ -80,18 +94,20 @@ jobs:
8094
"cache-OS:${{ matrix.os }}-arch:${{ matrix.node_arch }}-ZMQ_DRAFT:${{ matrix.zmq_draft }}-ZMQ_VERSION:${{ matrix.zmq_version }}-Node:${{ matrix.node_version }}-"
8195
8296
- name: Setup Cpp
97+
if: ${{ !matrix.docker }}
8398
uses: aminya/setup-cpp@v1
8499
with:
85100
vcvarsall: ${{ contains(matrix.os, 'windows') }}
86101
cmake: true
87-
ninja: true
88102
architecture: ${{ matrix.cpp_arch }}
89103

90104
- uses: pnpm/[email protected]
105+
if: ${{ !matrix.docker }}
91106
with:
92107
version: 7
93108

94109
- name: Install Node
110+
if: ${{ !matrix.docker }}
95111
uses: actions/setup-node@v3
96112
with:
97113
node-version: ${{ matrix.node_version }}
@@ -104,21 +120,32 @@ jobs:
104120
brew install libsodium gnutls
105121
106122
- name: Install Dependencies and Build
123+
if: ${{ !matrix.docker }}
107124
run: pnpm install
108125

109126
- name: Prebuild
127+
if: ${{ !matrix.docker }}
110128
run: pnpm run prebuild
111129

130+
- name: Prebuild Docker
131+
if: ${{ matrix.docker }}
132+
run: |
133+
docker login -u ${{ github.actor }} -p ${{ secrets.GITHUB_TOKEN }} ghcr.io
134+
docker pull ${{ matrix.docker }}
135+
docker tag ${{ matrix.docker }} builder
136+
docker run --volume ${{ github.workspace }}:/app --workdir /app --privileged builder sh -c "${{ matrix.docker_cmd }}"
137+
112138
- name: Upload artifacts
113-
uses: actions/upload-artifact@v2
139+
uses: actions/upload-artifact@v3
114140
with:
115141
path: ./prebuilds
116142

117143
- name: Lint
118-
if: contains(matrix.os, 'ubuntu')
144+
if: "${{ contains(matrix.os, 'ubuntu') && !matrix.docker }}"
119145
run: pnpm run lint-test
120146

121147
- name: Test (Debug)
148+
if: ${{ !matrix.docker }}
122149
uses: nick-fields/retry@v2
123150
with:
124151
timeout_minutes: 15
@@ -128,6 +155,7 @@ jobs:
128155
pnpm run test.skip_gc_tests
129156
130157
- name: Tests + GC Tests (Release)
158+
if: ${{ !matrix.docker }}
131159
run: |
132160
pnpm run clean
133161
pnpm run test

0 commit comments

Comments
 (0)