mirror of
https://github.com/quine-global/hyper.git
synced 2026-01-16 21:58:39 -09:00
combine ci jobs in a single matrix build
This commit is contained in:
parent
43f338f921
commit
6dbb1afdf1
1 changed files with 51 additions and 99 deletions
150
.github/workflows/nodejs.yml
vendored
150
.github/workflows/nodejs.yml
vendored
|
|
@ -5,12 +5,17 @@ on:
|
||||||
- master
|
- master
|
||||||
- canary
|
- canary
|
||||||
pull_request:
|
pull_request:
|
||||||
|
defaults:
|
||||||
|
run:
|
||||||
|
shell: bash
|
||||||
jobs:
|
jobs:
|
||||||
ci_macos:
|
build:
|
||||||
runs-on: macos-11.0
|
runs-on: ${{matrix.os}}
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
node-version: [15.x]
|
node-version: [15.x]
|
||||||
|
os: [macos-11.0, ubuntu-latest, windows-latest]
|
||||||
|
fail-fast: false
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v2
|
||||||
|
|
@ -27,63 +32,33 @@ jobs:
|
||||||
run: |
|
run: |
|
||||||
cp build/canary.ico build/icon.ico
|
cp build/canary.ico build/icon.ico
|
||||||
cp build/canary.icns build/icon.icns
|
cp build/canary.icns build/icon.icns
|
||||||
# - name: Get Certificate for signing
|
- name: Build (pr)
|
||||||
# if: github.event_name == 'push'
|
if: github.event_name == 'pull_request'
|
||||||
# run: |
|
|
||||||
# echo "::set-env name=CSC_LINK::${{ secrets.MAC_CERT_P12_BASE64 }}"
|
|
||||||
# echo "::set-env name=CSC_KEY_PASSWORD::${{ secrets.MAC_CERT_P12_PASSWORD }}"
|
|
||||||
- name: Build
|
|
||||||
run: yarn run dist --publish=never
|
run: yarn run dist --publish=never
|
||||||
|
- name: Build (push)
|
||||||
|
if: github.event_name == 'push'
|
||||||
|
run: yarn run dist --publish=never
|
||||||
|
# env:
|
||||||
|
# CSC_LINK: ${{ secrets.MAC_CERT_P12_BASE64 }}
|
||||||
|
# CSC_KEY_PASSWORD: ${{ secrets.MAC_CERT_P12_PASSWORD }}
|
||||||
|
# WIN_CSC_LINK: ${{ secrets.WIN_CERT_P12_BASE64 }}
|
||||||
|
# WIN_CSC_KEY_PASSWORD: ${{ secrets.WIN_CERT_P12_PASSWORD }}
|
||||||
- name: Test Spectron
|
- name: Test Spectron
|
||||||
|
if: runner.os != 'Linux'
|
||||||
run: yarn run test:spectron
|
run: yarn run test:spectron
|
||||||
- name: Archive Spectron test screenshot
|
- name: Archive Spectron test screenshot
|
||||||
|
if: runner.os != 'Linux'
|
||||||
uses: actions/upload-artifact@v2
|
uses: actions/upload-artifact@v2
|
||||||
with:
|
with:
|
||||||
name: spectron
|
name: spectron
|
||||||
path: dist/tmp/darwin_test.png
|
path: dist/tmp/*.png
|
||||||
- name: Get macOS Artifact Names
|
- name: Get Artifact Names
|
||||||
id: getmacosfilename
|
id: getFileNames
|
||||||
run: |
|
run: |
|
||||||
echo "::set-output name=dmgName::$(ls dist/*-mac.dmg | cut -d'/' -f2)"
|
echo "::set-output name=dmgName::$(ls dist/*-mac.dmg | cut -d'/' -f2)"
|
||||||
echo "::set-output name=dmgPath::$(ls dist/*-mac.dmg)"
|
echo "::set-output name=dmgPath::$(ls dist/*-mac.dmg)"
|
||||||
echo "::set-output name=armDmgName::$(ls dist/*-mac-arm64.dmg | cut -d'/' -f2)"
|
echo "::set-output name=armDmgName::$(ls dist/*-mac-arm64.dmg | cut -d'/' -f2)"
|
||||||
echo "::set-output name=armDmgPath::$(ls dist/*-mac-arm64.dmg)"
|
echo "::set-output name=armDmgPath::$(ls dist/*-mac-arm64.dmg)"
|
||||||
- name: Archive macOS Build Artifacts
|
|
||||||
uses: actions/upload-artifact@v2
|
|
||||||
with:
|
|
||||||
name: ${{ steps.getmacosfilename.outputs.dmgName }}
|
|
||||||
path: ${{ steps.getmacosfilename.outputs.dmgPath }}
|
|
||||||
- name: Archive macOS arm64 Build Artifacts
|
|
||||||
uses: actions/upload-artifact@v2
|
|
||||||
with:
|
|
||||||
name: ${{ steps.getmacosfilename.outputs.armDmgName }}
|
|
||||||
path: ${{ steps.getmacosfilename.outputs.armDmgPath }}
|
|
||||||
ci_linux:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
strategy:
|
|
||||||
matrix:
|
|
||||||
node-version: [15.x]
|
|
||||||
steps:
|
|
||||||
- name: Checkout
|
|
||||||
uses: actions/checkout@v2
|
|
||||||
- name: Use Node.js ${{ matrix.node-version }}
|
|
||||||
uses: actions/setup-node@v1
|
|
||||||
with:
|
|
||||||
node-version: ${{ matrix.node-version }}
|
|
||||||
- name: Install
|
|
||||||
run: yarn install
|
|
||||||
- name: Test
|
|
||||||
run: yarn run test
|
|
||||||
- name: Getting Build Icon
|
|
||||||
if: github.ref == 'refs/heads/canary' || github.base_ref == 'canary'
|
|
||||||
run: |
|
|
||||||
cp build/canary.ico build/icon.ico
|
|
||||||
cp build/canary.icns build/icon.icns
|
|
||||||
- name: Build
|
|
||||||
run: yarn run dist --publish=never
|
|
||||||
- name: Get Linux Artifact Names
|
|
||||||
id: getlinuxfilename
|
|
||||||
run: |
|
|
||||||
echo "::set-output name=snapName::$(ls dist/*.snap | cut -d'/' -f2)"
|
echo "::set-output name=snapName::$(ls dist/*.snap | cut -d'/' -f2)"
|
||||||
echo "::set-output name=snapPath::$(ls dist/*.snap)"
|
echo "::set-output name=snapPath::$(ls dist/*.snap)"
|
||||||
echo "::set-output name=AppImageName::$(ls dist/*.AppImage | cut -d'/' -f2)"
|
echo "::set-output name=AppImageName::$(ls dist/*.AppImage | cut -d'/' -f2)"
|
||||||
|
|
@ -92,70 +67,47 @@ jobs:
|
||||||
echo "::set-output name=debPath::$(ls dist/*.deb)"
|
echo "::set-output name=debPath::$(ls dist/*.deb)"
|
||||||
echo "::set-output name=rpmName::$(ls dist/*.rpm | cut -d'/' -f2)"
|
echo "::set-output name=rpmName::$(ls dist/*.rpm | cut -d'/' -f2)"
|
||||||
echo "::set-output name=rpmPath::$(ls dist/*.rpm)"
|
echo "::set-output name=rpmPath::$(ls dist/*.rpm)"
|
||||||
|
echo "::set-output name=exeName::$(ls dist/*.exe | cut -d'/' -f2)"
|
||||||
|
echo "::set-output name=exePath::$(ls dist/*.exe)"
|
||||||
|
- name: Archive macOS Build Artifacts
|
||||||
|
if: runner.os == 'macOS'
|
||||||
|
uses: actions/upload-artifact@v2
|
||||||
|
with:
|
||||||
|
name: ${{ steps.getFileNames.outputs.dmgName }}
|
||||||
|
path: ${{ steps.getFileNames.outputs.dmgPath }}
|
||||||
|
- name: Archive macOS arm64 Build Artifacts
|
||||||
|
if: runner.os == 'macOS'
|
||||||
|
uses: actions/upload-artifact@v2
|
||||||
|
with:
|
||||||
|
name: ${{ steps.getFileNames.outputs.armDmgName }}
|
||||||
|
path: ${{ steps.getFileNames.outputs.armDmgPath }}
|
||||||
- name: Archive Linux Build Artifacts (Snap)
|
- name: Archive Linux Build Artifacts (Snap)
|
||||||
|
if: runner.os == 'Linux'
|
||||||
uses: actions/upload-artifact@v2
|
uses: actions/upload-artifact@v2
|
||||||
with:
|
with:
|
||||||
name: ${{ steps.getlinuxfilename.outputs.snapName }}
|
name: ${{ steps.getFileNames.outputs.snapName }}
|
||||||
path: ${{ steps.getlinuxfilename.outputs.snapPath }}
|
path: ${{ steps.getFileNames.outputs.snapPath }}
|
||||||
- name: Archive Linux Build Artifacts (AppImage)
|
- name: Archive Linux Build Artifacts (AppImage)
|
||||||
|
if: runner.os == 'Linux'
|
||||||
uses: actions/upload-artifact@v2
|
uses: actions/upload-artifact@v2
|
||||||
with:
|
with:
|
||||||
name: ${{ steps.getlinuxfilename.outputs.AppImageName }}
|
name: ${{ steps.getFileNames.outputs.AppImageName }}
|
||||||
path: ${{ steps.getlinuxfilename.outputs.AppImagePath }}
|
path: ${{ steps.getFileNames.outputs.AppImagePath }}
|
||||||
- name: Archive Linux Build Artifacts (Deb)
|
- name: Archive Linux Build Artifacts (Deb)
|
||||||
|
if: runner.os == 'Linux'
|
||||||
uses: actions/upload-artifact@v2
|
uses: actions/upload-artifact@v2
|
||||||
with:
|
with:
|
||||||
name: ${{ steps.getlinuxfilename.outputs.debName }}
|
name: ${{ steps.getFileNames.outputs.debName }}
|
||||||
path: ${{ steps.getlinuxfilename.outputs.debPath }}
|
path: ${{ steps.getFileNames.outputs.debPath }}
|
||||||
- name: Archive Linux Build Artifacts (RPM)
|
- name: Archive Linux Build Artifacts (RPM)
|
||||||
|
if: runner.os == 'Linux'
|
||||||
uses: actions/upload-artifact@v2
|
uses: actions/upload-artifact@v2
|
||||||
with:
|
with:
|
||||||
name: ${{ steps.getlinuxfilename.outputs.rpmName }}
|
name: ${{ steps.getFileNames.outputs.rpmName }}
|
||||||
path: ${{ steps.getlinuxfilename.outputs.rpmPath }}
|
path: ${{ steps.getFileNames.outputs.rpmPath }}
|
||||||
ci_windows:
|
|
||||||
runs-on: windows-latest
|
|
||||||
strategy:
|
|
||||||
matrix:
|
|
||||||
node-version: [15.x]
|
|
||||||
steps:
|
|
||||||
- name: Checkout
|
|
||||||
uses: actions/checkout@v2
|
|
||||||
- name: Use Node.js ${{ matrix.node-version }}
|
|
||||||
uses: actions/setup-node@v1
|
|
||||||
with:
|
|
||||||
node-version: ${{ matrix.node-version }}
|
|
||||||
- name: Install
|
|
||||||
run: yarn install
|
|
||||||
- name: Test
|
|
||||||
run: yarn run test
|
|
||||||
- name: Getting Build Icon
|
|
||||||
if: github.ref == 'refs/heads/canary' || github.base_ref == 'canary'
|
|
||||||
run: |
|
|
||||||
Copy-Item .\build\canary.ico .\build\icon.ico
|
|
||||||
Copy-Item .\build\canary.icns .\build\icon.icns
|
|
||||||
- name: Build (pr)
|
|
||||||
if: github.event_name == 'pull_request'
|
|
||||||
run: yarn run dist --publish=never
|
|
||||||
- name: Build (push)
|
|
||||||
if: github.event_name == 'push'
|
|
||||||
run: yarn run dist --publish=never
|
|
||||||
# env:
|
|
||||||
#CSC_LINK: ${{ secrets.WIN_CERT_P12_BASE64 }}
|
|
||||||
#CSC_KEY_PASSWORD: ${{ secrets.WIN_CERT_P12_PASSWORD }}
|
|
||||||
- name: Test Spectron
|
|
||||||
run: yarn run test:spectron
|
|
||||||
- name: Archive Spectron test screenshot
|
|
||||||
uses: actions/upload-artifact@v2
|
|
||||||
with:
|
|
||||||
name: spectron
|
|
||||||
path: dist/tmp/win32_test.png
|
|
||||||
- name: Get Windows Artifact Names
|
|
||||||
id: getwindowsfilename
|
|
||||||
run: |
|
|
||||||
Write-Host "::set-output name=exeName::$(Get-ChildItem -Name .\dist\ | Select-String exe$)"
|
|
||||||
Write-Host "::set-output name=exePath::dist/$(Get-ChildItem -Name .\dist\ | Select-String exe$)"
|
|
||||||
- name: Archive Windows Build Artifacts (exe)
|
- name: Archive Windows Build Artifacts (exe)
|
||||||
|
if: runner.os == 'Windows'
|
||||||
uses: actions/upload-artifact@v2
|
uses: actions/upload-artifact@v2
|
||||||
with:
|
with:
|
||||||
name: ${{ steps.getwindowsfilename.outputs.exeName }}
|
name: ${{ steps.getFileNames.outputs.exeName }}
|
||||||
path: ${{ steps.getwindowsfilename.outputs.exePath }}
|
path: ${{ steps.getFileNames.outputs.exePath }}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue