Skip to content

Commit 7a13450

Browse files
authored
chore: update mac runners, add JOBS to ci (#15)
- Add tests on macos-15-intel - update test runners in the publish job - add `JOBS=2` to all CI builds, which speed them up a bit - went from 8/9 minutes to 5/6 - remove a dead comment
1 parent 464ce13 commit 7a13450

File tree

4 files changed

+14
-12
lines changed

4 files changed

+14
-12
lines changed

.github/workflows/publish.yml

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -13,16 +13,16 @@ jobs:
1313
matrix:
1414
node: [20, 22]
1515
os:
16-
# macos-14 is arm64 (m1)
16+
# https://github.com/actions/runner-images#available-images
1717
- name: darwin
18-
host: macos-14
18+
host: macos-26 #arm64
1919

20-
# macos-13 is x86
20+
# macos-15-intel is the last intel image and will go out of service
21+
# in fall 2027
2122
- name: mac-x64
22-
host: macos-13
23+
host: macos-15-intel
2324

24-
# ubuntu-22.04 is x86. Still no arm linux runners yet
25-
# https://docs.github.com/en/actions/using-github-hosted-runners/about-github-hosted-runners/about-github-hosted-runners#standard-github-hosted-runners-for-public-repositories
25+
# ubuntu-22.04 is x86
2626
- name: linux
2727
host: ubuntu-22.04
2828

@@ -50,7 +50,6 @@ jobs:
5050
sudo apt-get install -y software-properties-common git build-essential clang libssl-dev libkrb5-dev libc++-dev wget python3 zlib1g-dev
5151
5252
npm ci
53-
# does the JOBS=2 speed things up? not sure
5453
JOBS=2 npx prebuildify --strip --napi=false --tag-libc -t "$(node --version | tr -d 'v')"
5554
- uses: actions/upload-artifact@v4
5655
with:

.github/workflows/tests.yml

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -49,20 +49,21 @@ jobs:
4949
eval "$(ssh-agent -s)"
5050
ssh-add ~/.ssh_tests/id_rsa
5151
52-
npm install
52+
JOBS=2 npm install
5353
npm test
5454
5555
mac-test:
56-
name: "test node ${{ matrix.node-version }} on macOS"
56+
name: "test node ${{ matrix.node-version }} on ${{ matrix.runner }}"
5757
env:
5858
CC: clang
5959
CXX: clang++
6060
npm_config_clang: 1
6161
GYP_DEFINES: use_obsolete_asm=true
62-
runs-on: macos-26
6362
strategy:
6463
matrix:
6564
node-version: [20, 22]
65+
runner: ["macos-26", "macos-15-intel"]
66+
runs-on: ${{ matrix.runner }}
6667
steps:
6768
- uses: actions/checkout@v5
6869
with:
@@ -86,7 +87,7 @@ jobs:
8687
eval "$(ssh-agent -s)"
8788
ssh-add ~/.ssh_tests/id_rsa
8889
89-
npm install
90+
JOBS=2 npm install
9091
npm test
9192
9293
linux-arm-test:
@@ -128,5 +129,5 @@ jobs:
128129
eval "$(ssh-agent -s)"
129130
ssh-add ~/.ssh_tests/id_rsa
130131
131-
npm install
132+
JOBS=2 npm install
132133
npm test

scripts/Dockerfile.alpine

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ RUN apk add build-base git krb5-dev libgit2-dev libssh-dev pkgconfig python3 tzd
66
# Ensure C++17 is used explicitly for Node.js 20 and define POSIX features
77
ENV CXXFLAGS="-std=c++17 -D_GNU_SOURCE"
88
ENV CFLAGS="-std=c17 -D_GNU_SOURCE -D_POSIX_C_SOURCE=200809L"
9+
ENV JOBS="2"
910

1011
ADD . /app
1112
WORKDIR /app

scripts/Dockerfile.debian

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
FROM node:${NODE_VERSION}-bullseye
22

33
ENV DEBIAN_FRONTEND noninteractive
4+
ENV JOBS="2"
45
ENV LC_ALL en_US.UTF-8
56
ENV LANG ${LC_ALL}
67

0 commit comments

Comments
 (0)