1 | language: node_js
|
2 |
|
3 | services:
|
4 | - docker
|
5 |
|
6 | env:
|
7 | - LINUX_CXX=g++-4.8
|
8 |
|
9 | os:
|
10 | - linux
|
11 | - osx
|
12 |
|
13 | arch:
|
14 | - amd64
|
15 | - arm64
|
16 |
|
17 | node_js:
|
18 | - '14'
|
19 | - '16'
|
20 | - '17'
|
21 | - '18'
|
22 |
|
23 | addons:
|
24 | apt:
|
25 | sources:
|
26 | - ubuntu-toolchain-r-test
|
27 | packages:
|
28 | - g++-4.8
|
29 | - bc
|
30 |
|
31 | before_install:
|
32 | - echo Building for Node $TRAVIS_NODE_VERSION
|
33 | - if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then export CXX=$LINUX_CXX; $CXX --version;
|
34 | fi;
|
35 | - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then c++ --version; fi;
|
36 | - npm install -g npm@latest
|
37 |
|
38 | install: true
|
39 |
|
40 | script:
|
41 | - npm test
|
42 | - "./node_modules/.bin/node-pre-gyp configure"
|
43 | - "./node_modules/.bin/node-pre-gyp build"
|
44 | - "./node_modules/.bin/node-pre-gyp package"
|
45 | - |
|
46 | if [[ "$TRAVIS_OS_NAME" == "linux" ]]
|
47 | then
|
48 | docker image pull public.ecr.aws/docker/library/node:${TRAVIS_NODE_VERSION}-alpine
|
49 | docker run -w /src --entrypoint /bin/sh -v`pwd`:/src "node:${TRAVIS_NODE_VERSION}-alpine" test_alpine.sh
|
50 | fi
|
51 |
|
52 | deploy:
|
53 | provider: releases
|
54 | skip_cleanup: true
|
55 | api_key:
|
56 | secure: j4gQ+m02izaw56EOd0gEStHAjCRfSCkohDWvpABiPzh1YPM9MvfEMSIvzzjV/0oMqi3Sy7eGyFv47EgQHZvouW0I8BIUzxuTCE5wP8z2SjABXCa/rz4WTppTc9d9ABq8JSdz80JxEwjmuwnYeMwWgOd7sT/VDiMxLYaXj0JWO7w=
|
57 | file_glob: true
|
58 | file: build/stage/kelektiv/node.bcrypt.js/releases/download/*/*
|
59 | on:
|
60 | node_js: '14'
|
61 | repo: kelektiv/node.bcrypt.js
|
62 | tags: true
|