2019-08-13 03:08:49 +03:00
|
|
|
version: 2.1
|
2023-08-05 01:20:38 +03:00
|
|
|
|
2019-08-13 03:08:49 +03:00
|
|
|
orbs:
|
2024-10-03 17:23:11 +03:00
|
|
|
cfa: continuousauth/npm@2.1.1
|
2024-10-26 17:04:07 +03:00
|
|
|
node: electronjs/node@2.3.1
|
2023-08-05 01:20:38 +03:00
|
|
|
|
2019-04-27 20:14:14 +03:00
|
|
|
jobs:
|
2023-08-05 01:20:38 +03:00
|
|
|
test:
|
|
|
|
environment:
|
|
|
|
# prevent Wine popup dialogs about installing additional packages
|
|
|
|
WINEDLLOVERRIDES: mscoree,mshtml=
|
|
|
|
WINEDEBUG: -all
|
|
|
|
executor: <<parameters.executor>>
|
|
|
|
parameters:
|
|
|
|
executor:
|
|
|
|
description: The executor to use for the job.
|
|
|
|
type: string
|
|
|
|
node-version:
|
|
|
|
description: Specify the Node.js version to install.
|
|
|
|
type: string
|
|
|
|
steps:
|
|
|
|
- node/test:
|
|
|
|
checkout-steps:
|
|
|
|
- when:
|
|
|
|
condition:
|
|
|
|
equal: [ node/macos, << parameters.executor >> ]
|
|
|
|
steps:
|
|
|
|
- restore_cache:
|
|
|
|
name: Restoring Homebrew cache
|
|
|
|
paths:
|
|
|
|
- /usr/local/Homebrew
|
|
|
|
keys:
|
|
|
|
- v1-brew-cache-{{ arch }}
|
|
|
|
- run:
|
|
|
|
name: Install OS Dependencies
|
|
|
|
command: |
|
|
|
|
case "$(uname)" in
|
|
|
|
Linux)
|
|
|
|
sudo dpkg --add-architecture i386
|
|
|
|
sudo apt-get update
|
|
|
|
sudo apt-get install --no-install-recommends -y wine64 wine32 wine
|
|
|
|
;;
|
|
|
|
Darwin)
|
|
|
|
brew install --cask xquartz
|
|
|
|
brew install --cask --no-quarantine wine-stable
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
- when:
|
|
|
|
condition:
|
|
|
|
equal: [ node/macos, << parameters.executor >> ]
|
|
|
|
steps:
|
|
|
|
- save_cache:
|
|
|
|
name: Persisting Homebrew cache
|
|
|
|
paths:
|
|
|
|
- /usr/local/Homebrew
|
|
|
|
key: v1-brew-cache-{{ arch }}
|
|
|
|
- checkout
|
|
|
|
node-version: << parameters.node-version >>
|
2019-04-27 20:14:14 +03:00
|
|
|
|
|
|
|
workflows:
|
|
|
|
test_and_release:
|
|
|
|
# Run the test jobs first, then the release only when all the test jobs are successful
|
|
|
|
jobs:
|
2023-08-05 01:20:38 +03:00
|
|
|
- test:
|
|
|
|
name: test-<< matrix.executor >>-<< matrix.node-version >>
|
2023-11-22 02:59:51 +03:00
|
|
|
pre-steps:
|
2024-03-13 05:48:00 +03:00
|
|
|
# rc-edit.exe does not support arm64
|
2023-11-22 02:59:51 +03:00
|
|
|
- when:
|
|
|
|
condition:
|
|
|
|
and:
|
|
|
|
- equal: [ node/macos, << matrix.executor >> ]
|
|
|
|
steps:
|
|
|
|
- node/install-rosetta
|
2023-08-05 01:20:38 +03:00
|
|
|
matrix:
|
|
|
|
alias: test
|
|
|
|
parameters:
|
|
|
|
executor:
|
|
|
|
- node/linux
|
|
|
|
- node/macos
|
|
|
|
- node/windows
|
|
|
|
node-version:
|
2023-11-22 02:59:51 +03:00
|
|
|
- '20.9'
|
|
|
|
- '18.17'
|
|
|
|
- '16.20'
|
2024-03-13 05:48:00 +03:00
|
|
|
- '14.21'
|
|
|
|
exclude:
|
|
|
|
- executor: node/macos
|
|
|
|
node-version: '14.21'
|
2023-07-25 01:20:07 +03:00
|
|
|
- cfa/release:
|
2019-04-27 20:14:14 +03:00
|
|
|
requires:
|
2023-08-05 01:20:38 +03:00
|
|
|
- test
|
2019-04-27 20:14:14 +03:00
|
|
|
filters:
|
|
|
|
branches:
|
|
|
|
only:
|
2023-08-24 00:41:35 +03:00
|
|
|
- main
|
2023-07-25 01:20:07 +03:00
|
|
|
context: cfa-release
|