Skip to content

Commit

Permalink
Merge pull request #528 from zeromq/alpine [skip ci]
Browse files Browse the repository at this point in the history
  • Loading branch information
aminya committed Nov 17, 2022
2 parents 70088b1 + bcd2f39 commit 46692c3
Showing 1 changed file with 31 additions and 3 deletions.
34 changes: 31 additions & 3 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,10 @@ jobs:
- false
zmq_version:
- 4.3.4
docker:
- ""
docker_cmd:
- ""

include:
- os: windows-2022
Expand Down Expand Up @@ -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 }}
Expand All @@ -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/action-setup@v2.2.4
if: ${{ !matrix.docker }}
with:
version: 7

- name: Install Node
if: ${{ !matrix.docker }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node_version }}
Expand All @@ -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
Expand All @@ -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

0 comments on commit 46692c3

Please sign in to comment.