-
-
Notifications
You must be signed in to change notification settings - Fork 214
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #528 from zeromq/alpine [skip ci]
- Loading branch information
Showing
1 changed file
with
31 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -27,6 +27,10 @@ jobs: | |
- false | ||
zmq_version: | ||
- 4.3.4 | ||
docker: | ||
- "" | ||
docker_cmd: | ||
- "" | ||
|
||
include: | ||
- os: windows-2022 | ||
|
@@ -61,6 +65,16 @@ jobs: | |
zmq_draft: false | ||
zmq_version: 4.3.4 | ||
|
||
- os: ubuntu-22.04 | ||
docker: node:18-alpine | ||
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 | ||
node_version: 18 | ||
node_arch: x64 | ||
ARCH: x64 | ||
cpp_arch: x64 | ||
zmq_draft: false | ||
zmq_version: 4.3.4 | ||
|
||
env: | ||
ZMQ_VERSION: ${{ matrix.zmq_version }} | ||
ZMQ_DRAFT: ${{ matrix.zmq_draft }} | ||
|
@@ -80,18 +94,20 @@ jobs: | |
"cache-OS:${{ matrix.os }}-arch:${{ matrix.node_arch }}-ZMQ_DRAFT:${{ matrix.zmq_draft }}-ZMQ_VERSION:${{ matrix.zmq_version }}-Node:${{ matrix.node_version }}-" | ||
- name: Setup Cpp | ||
if: ${{ !matrix.docker }} | ||
uses: aminya/setup-cpp@v1 | ||
with: | ||
vcvarsall: ${{ contains(matrix.os, 'windows') }} | ||
cmake: true | ||
ninja: true | ||
architecture: ${{ matrix.cpp_arch }} | ||
|
||
- uses: pnpm/[email protected] | ||
if: ${{ !matrix.docker }} | ||
with: | ||
version: 7 | ||
|
||
- name: Install Node | ||
if: ${{ !matrix.docker }} | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: ${{ matrix.node_version }} | ||
|
@@ -104,21 +120,32 @@ jobs: | |
brew install libsodium gnutls | ||
- name: Install Dependencies and Build | ||
if: ${{ !matrix.docker }} | ||
run: pnpm install | ||
|
||
- name: Prebuild | ||
if: ${{ !matrix.docker }} | ||
run: pnpm run prebuild | ||
|
||
- name: Prebuild Docker | ||
if: ${{ matrix.docker }} | ||
run: | | ||
docker login -u ${{ github.actor }} -p ${{ secrets.GITHUB_TOKEN }} ghcr.io | ||
docker pull ${{ matrix.docker }} | ||
docker tag ${{ matrix.docker }} builder | ||
docker run --volume ${{ github.workspace }}:/app --workdir /app --privileged builder sh -c "${{ matrix.docker_cmd }}" | ||
- name: Upload artifacts | ||
uses: actions/upload-artifact@v2 | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
path: ./prebuilds | ||
|
||
- name: Lint | ||
if: contains(matrix.os, 'ubuntu') | ||
if: "${{ contains(matrix.os, 'ubuntu') && !matrix.docker }}" | ||
run: pnpm run lint-test | ||
|
||
- name: Test (Debug) | ||
if: ${{ !matrix.docker }} | ||
uses: nick-fields/retry@v2 | ||
with: | ||
timeout_minutes: 15 | ||
|
@@ -128,6 +155,7 @@ jobs: | |
pnpm run test.skip_gc_tests | ||
- name: Tests + GC Tests (Release) | ||
if: ${{ !matrix.docker }} | ||
run: | | ||
pnpm run clean | ||
pnpm run test |