Skip to content

Commit c8c2169

Browse files
author
Decaf Code
committed
ci: rework actions
1 parent 44d7d81 commit c8c2169

File tree

2 files changed

+42
-12
lines changed

2 files changed

+42
-12
lines changed
Lines changed: 9 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
1-
---
2-
name: Continuous Integration
1+
name: Build
32
on:
4-
pull_request: {}
53
push:
64
tags:
75
- "*"
@@ -10,8 +8,8 @@ jobs:
108
strategy:
119
matrix:
1210
os:
11+
- macos-13
1312
- macos-15
14-
- macos-15-arm64
1513
- ubuntu-24.04
1614
- windows-2025
1715
name: "Build ${{ matrix.os }}"
@@ -25,15 +23,15 @@ jobs:
2523
uses: actions/setup-node@v4.4.0
2624
with:
2725
node-version-file: .nvmrc
28-
- name: Install dependencies and compile local build
29-
run: npm ci
26+
# Don't compile anything yet, prebuild will do a clean rebuild anyway so
27+
# compiling anything here is just a waste of time.
28+
- name: Install dependencies only
29+
run: npm ci --ignore-scripts
3030
- name: Check source code formatting
3131
run: npm run chkfmt
32-
- name: Test local build
33-
run: npm test
34-
- name: Compile prebuild
32+
- name: Compile native code as a prebuild
3533
run: npm run prebuild
36-
- name: Test prebuild
34+
- name: Run tests
3735
run: npm test
3836
env:
3937
PREBUILDS_ONLY: "1"
@@ -47,7 +45,6 @@ jobs:
4745
name: Publish release
4846
needs: build
4947
runs-on: ubuntu-24.04
50-
if: "${{ startsWith(github.ref, 'refs/tags/') }}"
5148
steps:
5249
- name: Checkout
5350
uses: actions/checkout@v4.3.0
@@ -86,7 +83,7 @@ jobs:
8683
- name: Publish API documentation
8784
uses: peaceiris/actions-gh-pages@4f9cc6602d3f66b9c108549d475ec49e8ef4d45e # v4.0.0
8885
with:
89-
github_token: "${{ secrets.GITHUB_TOKEN }}"
86+
github_token: "${{ github.token }}"
9087
commit_message: "${{ github.event.head_commit.message }}"
9188
publish_dir: ./docs
9289
- name: Publish to NPM

.github/workflows/test.yaml

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
name: Test
2+
on:
3+
pull_request: {}
4+
jobs:
5+
build:
6+
strategy:
7+
matrix:
8+
os:
9+
- macos-13
10+
- macos-15
11+
- ubuntu-24.04
12+
- windows-2025
13+
name: "Build ${{ matrix.os }}"
14+
runs-on: "${{ matrix.os }}"
15+
steps:
16+
- name: Checkout
17+
uses: actions/checkout@v4.3.0
18+
with:
19+
submodules: true
20+
- name: Prepare node.js
21+
uses: actions/setup-node@v4.4.0
22+
with:
23+
node-version-file: .nvmrc
24+
- name: Install dependencies and compile
25+
run: npm ci
26+
- name: Check source code formatting
27+
run: npm run chkfmt
28+
- name: Run tests
29+
run: npm test
30+
env:
31+
PREBUILDS_ONLY: "1"
32+
- name: Build documentation
33+
run: npm run docs

0 commit comments

Comments
 (0)