Skip to content

Commit

Permalink
refactor(infra): move windows builds from appveyor to circleci
Browse files Browse the repository at this point in the history
  • Loading branch information
evgenykochetkov committed Jan 25, 2021
1 parent c0b7d1f commit edfcb0d
Show file tree
Hide file tree
Showing 5 changed files with 73 additions and 99 deletions.
74 changes: 73 additions & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,30 @@ defs:
&& mkdir "/tmp/arduino-cli" \
&& cp "$HOME/arduino-cli" "/tmp/arduino-cli/arduino-cli"
step-install-arduino-cli-on-windows: &step-install-arduino-cli-on-windows
name: Install arduino-cli
command: |
curl -L -s --create-dirs -o "$HOME/arduino-cli.zip" "https://github.com/arduino/arduino-cli/releases/download/0.12.0/arduino-cli_0.12.0_Windows_64bit.zip" \
&& unzip "$HOME/arduino-cli.zip" -d "$HOME" \
&& cp "$HOME/arduino-cli.exe" "./packages/xod-client-electron/arduino-cli.exe"
shell: bash

step-configure-git-on-windows: &step-configure-git-on-windows
name: Configure git
command: |
git config --global core.autocrlf input
git config --system core.longpaths true
step-install-node-on-windows: &step-install-node-on-windows
name: Install node
command: |
nvm install 12.12.0
nvm use 12.12.0
step-install-yarn-on-windows: &step-install-yarn-on-windows
name: Install yarn
command: npm install yarn@1.22.10 -g

step-install: &step-install
name: Install Node modules
# to always instal some essential tools(electron-builder etc)
Expand All @@ -69,6 +93,7 @@ defs:
if [[ $CIRCLE_BRANCH =~ ^prerelease-(patch|minor)- ]]; then
yarn lerna publish --skip-git --skip-npm --canary --cd-version ${BASH_REMATCH[1]} --yes
fi
shell: bash

step-build: &step-build
name: Build
Expand All @@ -77,6 +102,7 @@ defs:
step-verify-git-clean: &step-verify-git-clean
name: Verify that previous step made no side-effects
command: ./tools/verify-git-clean.sh
shell: bash

step-build-electron: &step-build-electron
name: Build electron IDE app
Expand All @@ -101,7 +127,7 @@ defs:
no_output_timeout: 30m

orbs:
node: circleci/node@4.1.0
win: circleci/windows@2.4.0

jobs:
#--------------------------------------------------------------------
Expand Down Expand Up @@ -148,6 +174,20 @@ jobs:
- run: *step-test-func
- run: *step-verify-git-clean

verify-windows:
executor:
name: win/default
steps:
- run: *step-configure-git-on-windows
- run: *step-install-node-on-windows
- run: *step-install-yarn-on-windows
- checkout
- run:
name: Install Node modules
command: yarn
- run: *step-build
- run: *step-verify-git-clean

test-cpp:
docker: *docker-custom-nodejs
environment:
Expand Down Expand Up @@ -233,6 +273,33 @@ jobs:
- "*.dmg"
- "*.zip"

dist-windows:
executor:
name: win/default
steps:
- run: *step-configure-git-on-windows
- run: *step-install-node-on-windows
- run: *step-install-yarn-on-windows
- checkout
- run: *step-install-arduino-cli-on-windows
- run:
name: Install Node modules
command: yarn
- run: *step-bump-version
- run:
name: Build electron IDE distro
command: |
$env:NODE_ENV="production"
yarn build:electron
yarn dist:electron
no_output_timeout: 30m
- persist_to_workspace:
root: packages/xod-client-electron/dist
paths:
- latest.yml
- "*.exe"
- "*.blockmap"

#--------------------------------------------------------------------
# Upload distros job
#--------------------------------------------------------------------
Expand Down Expand Up @@ -331,6 +398,7 @@ workflows:
jobs:
- verify-linux
- verify-macos
- verify-windows
- test-cpp
- dockerize-ide:
filters: *release-filters
Expand All @@ -341,11 +409,15 @@ workflows:
filters: *release-filters
- dist-macos:
filters: *release-filters
- dist-windows:
filters: *release-filters
- upload-distros:
filters: *release-filters
requires:
- verify-linux
- verify-macos
- verify-windows
- test-cpp
- dist-linux
- dist-macos
- dist-windows
29 changes: 0 additions & 29 deletions appveyor.yml

This file was deleted.

33 changes: 0 additions & 33 deletions tools/appveyor.ps1

This file was deleted.

29 changes: 0 additions & 29 deletions tools/electron-upload.js

This file was deleted.

7 changes: 0 additions & 7 deletions tools/install-arduinocli.ps1

This file was deleted.

0 comments on commit edfcb0d

Please sign in to comment.