Add jobs for automatically building test builds for PRs (#1713)

* WIP

* WIP

* WIP

* WIP

* WIP

* WIP

* WIP

* WIP

* WIP

* WIP

* WIP

* WIP

* WIP

* WIP

* WIP

* WIP

* WIP

* WIP

* WIP

* WIP

* WIP
This commit is contained in:
Devin Binnie
2021-08-31 08:57:24 -04:00
committed by GitHub
parent ac61c66ce4
commit 26bea631da

View File

@@ -99,6 +99,19 @@ commands:
root: ./dist
paths:
- "./<< parameters.subpath >>/"
save:
description: "Save binaries artifacts"
parameters:
filename:
type: string
steps:
- run:
name: Copying artifacts
command: |
mkdir /tmp/artifacts;
cp release/<<parameters.filename>> /tmp/artifacts;
- store_artifacts:
path: /tmp/artifacts
jobs:
check:
executor: wine-chrome
@@ -208,6 +221,85 @@ jobs:
paths:
- "./win-release/"
build-windows-pr:
executor: wine-mono
steps:
- checkout
- run: mkdir -p ./dist
- attach_workspace:
at: ./dist
- restore_cache:
key: npm-{{ arch }}-{{ .Branch }}-{{ checksum "package-lock.json" }}
- update_image:
apt_opts: "--no-install-recommends jq icnsutils graphicsmagick tzdata"
- build:
os: windows
path: ./dist/win
subpath: ./win/
- save_cache:
key: npm-{{ arch }}-{{ .Branch }}-{{ checksum "package-lock.json" }}
paths:
- "node_modules"
- "~/.cache/electron"
- "~/.cache/electron-builder"
- save:
filename: "*.exe"
build-mac-pr:
executor: mac
steps:
- checkout
- run: mkdir -p ./dist
- attach_workspace:
at: ./dist
- run:
name: Update node to v16
command: brew upgrade node || true
- run:
name: Installing npm dependencies
command: npm ci
- build:
os: mac
path: ./dist/macos-release
subpath: ./macos-release/
- run:
name: Get rename without brew as it might fail
command: curl -L https://github.com/ap/rename/archive/v1.601.tar.gz --output rename.tgz
- run:
name: extract rename
command: tar -xzf rename.tgz
- run:
name: rename arm64 to m1
command: ./rename-1.601/rename 's/arm64/m1/' ./dist/macos-release/*
- persist_to_workspace:
root: ./dist
paths:
- "./macos-release/"
- save:
filename: "*.dmg"
build-linux-pr:
executor: wine-mono
steps:
- checkout
- run: mkdir -p ./dist
- attach_workspace:
at: ./dist
- restore_cache:
key: npm-{{ arch }}-{{ .Branch }}-{{ checksum "package-lock.json" }}
- update_image:
apt_opts: "--no-install-recommends jq icnsutils graphicsmagick tzdata"
- build
- save_cache:
key: npm-{{ arch }}-{{ .Branch }}-{{ checksum "package-lock.json" }}
paths:
- "node_modules"
- "~/.cache/electron"
- "~/.cache/electron-builder"
- save:
filename: "*.tar.gz"
mac_installer:
executor: mac
@@ -399,7 +491,11 @@ workflows:
version: 2
build_and_test:
jobs:
- check
- check:
filters:
branches:
ignore:
- /^build-pr-.*/
- begin-notification:
context: desktop-notify
filters:
@@ -412,6 +508,10 @@ workflows:
- build-linux:
requires:
- check
filters:
branches:
ignore:
- /^build-pr-.*/
- build-win-no-installer:
requires:
@@ -420,6 +520,7 @@ workflows:
branches:
ignore:
- /^release-\d+(\.\d+){1,2}(-rc.*)?/
- /^build-pr-.*/
- build-mac-no-dmg:
requires:
@@ -428,6 +529,7 @@ workflows:
branches:
ignore:
- /^release-\d+(\.\d+){1,2}(-rc.*)?/
- /^build-pr-.*/
- msi_installer:
requires:
@@ -449,6 +551,7 @@ workflows:
branches:
only:
- /^release-\d+(\.\d+){1,2}(-rc.*)?/
- store_artifacts:
# for master/PR builds
requires:
@@ -460,6 +563,7 @@ workflows:
branches:
ignore:
- /^release-\d+(\.\d+){1,2}(-rc.*)?/
- /^build-pr-.*/
- upload_to_s3:
# for release builds
@@ -492,6 +596,22 @@ workflows:
# release-XX.YY.ZZ
# release-XX.YY.ZZ-rc-something
- /^release-\d+(\.\d+){1,2}(-rc.*)?/
build-for-pr:
jobs:
- build-windows-pr:
context: electron-installer
filters:
branches:
only: /^build-pr-.*/
- build-mac-pr:
context: codesign-certificates
filters:
branches:
only: /^build-pr-.*/
- build-linux-pr:
filters:
branches:
only: /^build-pr-.*/
nightly_browser_view:
when: << pipeline.parameters.run_nightly >>
jobs: