Skip to content
This repository was archived by the owner on Dec 1, 2024. It is now read-only.

Commit 77b1e30

Browse files
authored
Create explicit CI job matrix (#585)
- Replace matrix expansion with explicit job matrix in `.travis.yml` - Remove legacy `sudo: false` from `.travis.yml` - Make prebuilds on Node.js Current instead of 8. Technically this does not matter; it's the Node.js headers we build against that matter (dictated by the `-t 8.14.0` flag we pass to `prebuildify`). However, making the prebuilds on Current means we won't have to change this job in the future (e.g. when removing Node.js 8) - Use tar in AppVeyor too - Add gzip compression to tar commands and shorten commands - Rename `linux` to `linux-x64` to communicate absence of `x86` - Rename `osx` to `darwin-x64`, same, as well as to match node platform - Rename `win-x64` to `win32-x64`, same - Create ARM prebuild(s) in separate job, only on tagged commits, skip tests and coverage.
1 parent 1d3dae0 commit 77b1e30

2 files changed

Lines changed: 39 additions & 24 deletions

File tree

.travis.yml

Lines changed: 32 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,41 @@
1-
sudo: false
2-
31
language: node_js
42

5-
os:
6-
- osx
7-
- linux
3+
jobs:
4+
include:
5+
- os: linux
6+
node_js: 8
7+
env: [TEST_CMD=test]
8+
- os: linux
9+
node_js: 10
10+
env: [TEST_CMD=test]
11+
- os: linux
12+
node_js: node
13+
env: [TEST_CMD=test, BUILD_CMD=prebuild, BUILD_GROUP=linux-x64]
14+
- os: osx
15+
node_js: 8
16+
env: [TEST_CMD=test]
17+
- os: osx
18+
node_js: 10
19+
env: [TEST_CMD=test]
20+
- os: osx
21+
node_js: node
22+
env: [TEST_CMD=test, BUILD_CMD=prebuild, BUILD_GROUP=darwin-x64]
23+
- name: arm
24+
os: linux
25+
node_js: node
26+
env: [BUILD_CMD=prebuildify-cross-armv7, BUILD_GROUP=arm]
27+
if: tag is present
828

9-
node_js:
10-
- 8
11-
- 10
12-
- node
29+
script:
30+
- if [[ ! -z "$TEST_CMD" ]]; then npm run $TEST_CMD; fi
1331

1432
after_success:
15-
- npm run coverage
33+
- if [[ ! -z "$TEST_CMD" ]]; then npm run coverage; fi
1634

1735
before_deploy:
18-
- export ARCHIVE_NAME="${TRAVIS_TAG:-latest}-$TRAVIS_OS_NAME.tar"
19-
- npm run prebuild
20-
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then npm run prebuildify-cross-armv7; fi
21-
- tar --create --verbose --file="$ARCHIVE_NAME" --directory "$TRAVIS_BUILD_DIR/prebuilds" .
36+
- export ARCHIVE_NAME="${TRAVIS_TAG:-latest}-$BUILD_GROUP.tar.gz"
37+
- npm run $BUILD_CMD
38+
- tar -zcvf "$ARCHIVE_NAME" -C prebuilds .
2239

2340
deploy:
2441
provider: releases
@@ -28,4 +45,4 @@ deploy:
2845
skip_cleanup: true
2946
on:
3047
tags: true
31-
node: '8'
48+
condition: "! -z $BUILD_CMD"

appveyor.yml

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -23,20 +23,18 @@ test_script:
2323
- npm --version
2424
- npm test
2525

26-
after_test:
27-
- ps: If ($env:nodejs_version -eq "8") { npm run prebuild }
28-
29-
artifacts:
30-
- path: prebuilds
31-
name: $(APPVEYOR_REPO_TAG_NAME)-win-$(PLATFORM)
32-
type: zip
26+
before_deploy:
27+
- SET ARCHIVE_NAME=%APPVEYOR_REPO_TAG_NAME%-win32-%PLATFORM%.tar.gz
28+
- npm run prebuild
29+
- tar -zcvf "%ARCHIVE_NAME%" -C prebuilds .
30+
- appveyor PushArtifact %ARCHIVE_NAME%
3331

3432
deploy:
3533
- provider: GitHub
36-
artifact: /.*\.zip/
34+
artifact: $(ARCHIVE_NAME)
3735
auth_token:
3836
secure: AjmYV2zeogfen7F6tXvR9PO1zynJVF/jhMCExQ9RMtqEHDMH8Frclym3GniZkEB0
3937
draft: false
4038
on:
4139
appveyor_repo_tag: true
42-
nodejs_version: "8"
40+
nodejs_version: "Current"

0 commit comments

Comments
 (0)