mirror of
https://github.com/hanzoai/bufferutil.git
synced 2026-09-24 16:57:30 +00:00
[ci] Split the test job into two jobs
Add a dedicated build job to continue building binaries on Ubuntu 18.04.
This commit is contained in:
+30
-11
@@ -19,6 +19,32 @@ jobs:
|
||||
- 14
|
||||
- 16
|
||||
- 17
|
||||
os:
|
||||
- macos-latest
|
||||
- ubuntu-latest
|
||||
- windows-latest
|
||||
exclude:
|
||||
- arch: x86
|
||||
os: macos-latest
|
||||
- arch: x86
|
||||
os: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: actions/setup-node@v3
|
||||
with:
|
||||
node-version: ${{ matrix.node }}
|
||||
architecture: ${{ matrix.arch }}
|
||||
- run: npm install
|
||||
- run: npm test
|
||||
build:
|
||||
if: startsWith(github.ref, 'refs/tags/')
|
||||
needs: test
|
||||
runs-on: ${{ matrix.os }}
|
||||
strategy:
|
||||
matrix:
|
||||
arch:
|
||||
- x64
|
||||
- x86
|
||||
os:
|
||||
- macos-latest
|
||||
- ubuntu-18.04
|
||||
@@ -32,27 +58,20 @@ jobs:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: actions/setup-node@v3
|
||||
with:
|
||||
node-version: ${{ matrix.node }}
|
||||
node-version: 14
|
||||
architecture: ${{ matrix.arch }}
|
||||
- run: npm install
|
||||
- run: npm test
|
||||
- run: npm run prebuild
|
||||
if:
|
||||
matrix.node == 14 && matrix.os != 'macos-latest' &&
|
||||
startsWith(github.ref, 'refs/tags/')
|
||||
if: matrix.os != 'macos-latest'
|
||||
- run: npm run prebuild-darwin-x64+arm64
|
||||
if:
|
||||
matrix.node == 14 && matrix.os == 'macos-latest' &&
|
||||
startsWith(github.ref, 'refs/tags/')
|
||||
if: matrix.os == 'macos-latest'
|
||||
- uses: actions/upload-artifact@v3
|
||||
if: matrix.node == 14 && startsWith(github.ref, 'refs/tags/')
|
||||
with:
|
||||
name: ${{ matrix.os }}
|
||||
path: prebuilds
|
||||
retention-days: 1
|
||||
release:
|
||||
if: startsWith(github.ref, 'refs/tags/')
|
||||
needs: test
|
||||
needs: build
|
||||
permissions:
|
||||
contents: write # Needed for softprops/action-gh-release.
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
Reference in New Issue
Block a user