build: add Node 12 CI & cache Homebrew
This commit is contained in:
Родитель
c3afe3b1bb
Коммит
e198dac653
|
@ -1,31 +1,74 @@
|
|||
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 }}
|
||||
|
||||
steps-test: &steps-test
|
||||
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 wine32 wine
|
||||
;;
|
||||
Darwin)
|
||||
brew install wine
|
||||
;;
|
||||
esac
|
||||
|
||||
steps-linux-win: &steps-linux-win
|
||||
steps:
|
||||
- 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 wine32 wine
|
||||
;;
|
||||
Darwin)
|
||||
brew install wine
|
||||
;;
|
||||
esac
|
||||
- *step-env
|
||||
- *step-install-os-dependencies
|
||||
- checkout
|
||||
- *step-restore-cache
|
||||
- run: yarn
|
||||
- save_cache:
|
||||
paths:
|
||||
- node_modules
|
||||
key: v1-dependencies-{{ arch }}-{{ checksum "yarn.lock" }}
|
||||
- *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
|
||||
|
@ -35,20 +78,24 @@ jobs:
|
|||
test-linux-8:
|
||||
docker:
|
||||
- image: circleci/node:8
|
||||
<<: *steps-test
|
||||
<<: *steps-linux-win
|
||||
test-linux-10:
|
||||
docker:
|
||||
- image: circleci/node:10
|
||||
<<: *steps-test
|
||||
<<: *steps-linux-win
|
||||
test-linux-12:
|
||||
docker:
|
||||
- image: circleci/node:12
|
||||
<<: *steps-linux-win
|
||||
test-mac:
|
||||
macos:
|
||||
xcode: "10.2.0"
|
||||
<<: *steps-test
|
||||
<<: *steps-mac
|
||||
test-windows:
|
||||
executor:
|
||||
name: win/vs2019
|
||||
shell: bash.exe
|
||||
<<: *steps-test
|
||||
<<: *steps-linux-win
|
||||
|
||||
release:
|
||||
docker:
|
||||
|
@ -65,12 +112,14 @@ workflows:
|
|||
jobs:
|
||||
- test-linux-8
|
||||
- test-linux-10
|
||||
- test-linux-12
|
||||
- test-mac
|
||||
- test-windows
|
||||
- release:
|
||||
requires:
|
||||
- test-linux-8
|
||||
- test-linux-10
|
||||
- test-linux-12
|
||||
- test-mac
|
||||
- test-windows
|
||||
filters:
|
||||
|
|
Загрузка…
Ссылка в новой задаче