Navigation Menu

Skip to content

Commit

Permalink
CircleCI Windows build
Browse files Browse the repository at this point in the history
  • Loading branch information
mroch committed Jan 8, 2020
1 parent 706e83b commit 4e6fe4b
Showing 1 changed file with 110 additions and 75 deletions.
185 changes: 110 additions & 75 deletions .circleci/config.yml
Expand Up @@ -10,6 +10,9 @@ aliases:
tags:
only: /.*/

orbs:
win: circleci/windows@2.2.0

executors:
linux-opam:
docker:
Expand Down Expand Up @@ -207,6 +210,35 @@ jobs:
path: src/parser/dist/libflowparser.zip
destination: libflowparser-osx.zip

build_win:
executor: win/default
environment:
- FLOW_TMP_DIR: 'C:\tmp\flow'
steps:
- run:
name: Set up workspace
command: |
New-Item -ItemType Directory $Env:FLOW_TMP_DIR
New-Item -ItemType Directory $Env:FLOW_TMP_DIR\opam_installer
- run:
name: Install dependencies
command: |
choco install --no-progress cygwin
if (-not $?) { throw "Failed to install cygwin" }
choco install rsync patch diffutils curl make unzip git m4 perl mingw64-x86_64-gcc-core --source=cygwin
if (-not $?) { throw "Failed to install deps from cygwin" }
- run:
name: Install opam
command: |
cd $Env:FLOW_TMP_DIR
echo "$PWD"
echo "Downloading opam64.tar.xz"
try { (New-Object System.Net.WebClient).DownloadFile("https://github.com/fdopen/opam-repository-mingw/releases/download/0.0.0.2/opam64.tar.xz", "$Env:FLOW_TMP_DIR\opam64.tar.xz") } catch { echo $_.Exception }
echo "Extracting opam64.tar.xz"
C:\tools\cygwin\bin\tar.exe -x --force-local -f $Env:FLOW_TMP_DIR\opam64.tar.xz -C C:/tmp/flow/opam_installer
C:\tools\cygwin\bin\bash.exe -l "$Env:FLOW_TMP_DIR\opam_installer\opam64\install.sh"
- checkout

runtests_linux:
executor: linux-node
environment:
Expand Down Expand Up @@ -386,80 +418,83 @@ jobs:
workflows:
build_and_test:
jobs:
- checkout:
<<: *run_on_tags
- build_linux:
<<: *run_on_tags
requires:
- checkout
- build_macos:
<<: *run_on_tags
requires:
- checkout
- runtests_linux:
<<: *run_on_tags
requires:
- build_linux
- runtests_macos:
<<: *run_on_tags
requires:
- build_macos
- tool_test_linux:
<<: *run_on_tags
requires:
- build_linux
- tool_test_macos:
<<: *run_on_tags
requires:
- build_macos
- npm_pack:
<<: *run_on_tags
requires:
- build_linux
- build_macos
- npm_deploy:
requires:
- npm_pack
filters:
tags:
only: /^v.*/
branches:
ignore: /.*/
- github_linux:
requires:
- runtests_linux
- tool_test_linux
filters:
tags:
only: /^v.*/
branches:
ignore: /.*/
- github_macos:
requires:
- runtests_macos
- tool_test_macos
filters:
tags:
only: /^v.*/
branches:
ignore: /.*/
- build_win:
<<: *run_on_tags

# - checkout:
# <<: *run_on_tags
# - build_linux:
# <<: *run_on_tags
# requires:
# - checkout
# - build_macos:
# <<: *run_on_tags
# requires:
# - checkout
# - runtests_linux:
# <<: *run_on_tags
# requires:
# - build_linux
# - runtests_macos:
# <<: *run_on_tags
# requires:
# - build_macos
# - tool_test_linux:
# <<: *run_on_tags
# requires:
# - build_linux
# - tool_test_macos:
# <<: *run_on_tags
# requires:
# - build_macos
# - npm_pack:
# <<: *run_on_tags
# requires:
# - build_linux
# - build_macos
# - npm_deploy:
# requires:
# - npm_pack
# filters:
# tags:
# only: /^v.*/
# branches:
# ignore: /.*/
# - github_linux:
# requires:
# - runtests_linux
# - tool_test_linux
# filters:
# tags:
# only: /^v.*/
# branches:
# ignore: /.*/
# - github_macos:
# requires:
# - runtests_macos
# - tool_test_macos
# filters:
# tags:
# only: /^v.*/
# branches:
# ignore: /.*/

# only deploy the website from master, so that it can include docs/blog
# posts about an upcoming release, and so the release branch doesn't
# revert those changes.
- website_deploy:
requires:
- build_linux
filters:
branches:
only: master
# # only deploy the website from master, so that it can include docs/blog
# # posts about an upcoming release, and so the release branch doesn't
# # revert those changes.
# - website_deploy:
# requires:
# - build_linux
# filters:
# branches:
# only: master

# deploys flow.js and the libdefs to Try Flow on release branches
- try_flow_deploy:
requires:
- build_linux
filters:
tags:
only: /^v.*/
branches:
ignore: /.*/
# # deploys flow.js and the libdefs to Try Flow on release branches
# - try_flow_deploy:
# requires:
# - build_linux
# filters:
# tags:
# only: /^v.*/
# branches:
# ignore: /.*/

0 comments on commit 4e6fe4b

Please sign in to comment.