-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
63 additions
and
25 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,7 +6,7 @@ on: | |
- master | ||
|
||
jobs: | ||
Test: | ||
Build: | ||
if: "!contains(github.event.head_commit.message, '[skip ci]')" | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
|
@@ -17,19 +17,13 @@ jobs: | |
- macos-11.0 | ||
- windows-latest | ||
node_version: | ||
- 10 | ||
- 12 | ||
- 14 | ||
node_arch: | ||
- x64 | ||
include: | ||
- os: windows-2016 | ||
node_version: 12 | ||
node_arch: x86 | ||
- os: ubuntu-16.04 | ||
node_version: 12 | ||
- os: macos-10.15 | ||
node_version: 12 | ||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
|
@@ -50,7 +44,7 @@ jobs: | |
# sudo update-alternatives --install /usr/bin/clang clang /usr/bin/clang-9 10 | ||
# sudo update-alternatives --config clang | ||
# sudo update-alternatives --config clang++ | ||
|
||
# - name: Set Compiler for Ubuntu | ||
# run: | | ||
# echo "CC=clang" >> $GITHUB_ENV | ||
|
@@ -65,13 +59,6 @@ jobs: | |
- name: Install dependencies and build | ||
run: npm install | ||
|
||
- name: Run tests | ||
run: npm run test | ||
|
||
- name: Run benchmarks | ||
if: ${{ !contains(matrix.node_arch, 'x86') }} # https://github.com/npm/npm-lifecycle/issues/54 | ||
run: npm run benchmark | ||
|
||
- name: Prebuildify x64 | ||
if: ${{ contains(matrix.node_version, '12') && contains(matrix.node_arch, 'x64') }} | ||
run: npm run native:prebuild | ||
|
@@ -80,23 +67,74 @@ jobs: | |
if: ${{ contains(matrix.node_version, '12') && contains(matrix.node_arch, 'x86') }} | ||
run: npm run native:prebuild-ia32 | ||
|
||
- name: Upload artifacts for Ubuntu | ||
if: ${{ contains(matrix.node_version, '12') && contains(matrix.os, 'ubuntu-20.04') }} | ||
- name: Upload artifacts | ||
uses: actions/[email protected] | ||
with: | ||
path: ./prebuilds | ||
|
||
- name: Upload artifacts for MacOS | ||
if: ${{ contains(matrix.node_version, '12') && contains(matrix.os, 'macos-11.0') }} | ||
uses: actions/[email protected] | ||
Test: | ||
needs: Build | ||
if: "!contains(github.event.head_commit.message, '[skip ci]')" | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
os: | ||
- ubuntu-20.04 | ||
- macos-11.0 | ||
- windows-latest | ||
node_version: | ||
- 10 | ||
- 12 | ||
- 14 | ||
node_arch: | ||
- x64 | ||
include: | ||
- os: windows-2016 | ||
node_version: 12 | ||
node_arch: x86 | ||
- os: ubuntu-16.04 | ||
node_version: 12 | ||
- os: macos-10.15 | ||
node_version: 12 | ||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- name: Cache node_modules | ||
uses: actions/cache@v2 | ||
env: | ||
cache-name: | | ||
node_modules | ||
with: | ||
path: ./prebuilds | ||
path: node_modules | ||
key: ${{ runner.os }}-${{ matrix.node_version }}-${{ matrix.node_arch }}-${{ hashFiles('package.json') }} | ||
|
||
- name: Upload artifacts for Windows | ||
if: ${{ contains(matrix.node_version, '12') && contains(matrix.os, 'windows-latest') }} | ||
uses: actions/[email protected] | ||
- name: Install Node | ||
uses: actions/[email protected] | ||
with: | ||
path: ./prebuilds | ||
node-version: ${{ matrix.node_version }} | ||
architecture: ${{ matrix.node_arch }} | ||
|
||
- name: Install dependencies and build | ||
run: npm install | ||
|
||
- name: Download articats | ||
uses: actions/download-artifact@v2 | ||
|
||
- name: Install prebuilds | ||
shell: bash | ||
run: | | ||
rm -rf build | ||
mkdir prebuilds | ||
mv artifact/* prebuilds/ | ||
ls prebuilds | ||
- name: Run tests | ||
run: npm run test | ||
|
||
- name: Run benchmarks | ||
if: ${{ !contains(matrix.node_arch, 'x86') }} # https://github.com/npm/npm-lifecycle/issues/54 | ||
run: npm run benchmark | ||
|
||
Skip: | ||
if: contains(github.event.head_commit.message, '[skip ci]') | ||
|