128 lines
2.9 KiB
YAML
128 lines
2.9 KiB
YAML
|
step-env: &step-env
|
||
|
run:
|
||
|
# prevent Wine popup dialogs about installing additional packages
|
||
|
name: Setup Environment Variables
|
||
|
command: |
|
||
|
echo 'export WINEDLLOVERRIDES="mscoree,mshtml="' >> $BASH_ENV
|
||
|
echo 'export WINEDEBUG="-all"' >> $BASH_ENV
|
||
|
|
||
|
step-restore-brew-cache: &step-restore-brew-cache
|
||
|
restore_cache:
|
||
|
name: Restoring Homebrew cache
|
||
|
paths:
|
||
|
- /usr/local/Homebrew
|
||
|
keys:
|
||
|
- v1-brew-cache-{{ arch }}
|
||
|
|
||
|
step-save-brew-cache: &step-save-brew-cache
|
||
|
save_cache:
|
||
|
name: Persisting Homebrew cache
|
||
|
paths:
|
||
|
- /usr/local/Homebrew
|
||
|
key: v1-brew-cache-{{ arch }}
|
||
|
|
||
|
step-restore-cache: &step-restore-cache
|
||
|
restore_cache:
|
||
|
keys:
|
||
|
- v1-dependencies-{{ arch }}-{{ checksum "yarn.lock" }}
|
||
|
- v1-dependencies-{{ arch }}
|
||
|
|
||
|
step-save-cache: &step-save-cache
|
||
|
save_cache:
|
||
|
paths:
|
||
|
- node_modules
|
||
|
key: v1-dependencies-{{ arch }}-{{ checksum "yarn.lock" }}
|
||
|
|
||
|
step-install-os-dependencies: &step-install-os-dependencies
|
||
|
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 wine-stable
|
||
|
;;
|
||
|
esac
|
||
|
|
||
|
steps-linux-win: &steps-linux-win
|
||
|
steps:
|
||
|
- *step-env
|
||
|
- *step-install-os-dependencies
|
||
|
- checkout
|
||
|
- *step-restore-cache
|
||
|
- run: yarn
|
||
|
- *step-save-cache
|
||
|
- run: yarn test
|
||
|
|
||
|
steps-mac: &steps-mac
|
||
|
steps:
|
||
|
- *step-env
|
||
|
- *step-restore-brew-cache
|
||
|
- *step-install-os-dependencies
|
||
|
- *step-save-brew-cache
|
||
|
- checkout
|
||
|
- *step-restore-cache
|
||
|
- run: yarn
|
||
|
- *step-save-cache
|
||
|
- run: yarn test
|
||
|
|
||
|
version: 2.1
|
||
|
orbs:
|
||
|
win: circleci/windows@1.0.0
|
||
|
jobs:
|
||
|
test-linux-10:
|
||
|
docker:
|
||
|
- image: circleci/node:10
|
||
|
<<: *steps-linux-win
|
||
|
test-linux-12:
|
||
|
docker:
|
||
|
- image: circleci/node:12
|
||
|
<<: *steps-linux-win
|
||
|
test-linux-14:
|
||
|
docker:
|
||
|
- image: circleci/node:14
|
||
|
<<: *steps-linux-win
|
||
|
test-mac:
|
||
|
macos:
|
||
|
xcode: "10.2.0"
|
||
|
<<: *steps-mac
|
||
|
test-windows:
|
||
|
executor:
|
||
|
name: win/vs2019
|
||
|
shell: bash.exe
|
||
|
<<: *steps-linux-win
|
||
|
|
||
|
release:
|
||
|
docker:
|
||
|
- image: circleci/node:14.15.1
|
||
|
steps:
|
||
|
- checkout
|
||
|
- *step-restore-cache
|
||
|
- run: yarn
|
||
|
- run: npx semantic-release
|
||
|
workflows:
|
||
|
version: 2
|
||
|
test_and_release:
|
||
|
# Run the test jobs first, then the release only when all the test jobs are successful
|
||
|
jobs:
|
||
|
- test-linux-10
|
||
|
- test-linux-12
|
||
|
- test-linux-14
|
||
|
- test-mac
|
||
|
- test-windows
|
||
|
- release:
|
||
|
requires:
|
||
|
- test-linux-10
|
||
|
- test-linux-12
|
||
|
- test-linux-14
|
||
|
- test-mac
|
||
|
- test-windows
|
||
|
filters:
|
||
|
branches:
|
||
|
only:
|
||
|
- master
|