From 4e6fe4b482456bba8ba81e84e736f400d7d5e908 Mon Sep 17 00:00:00 2001 From: Marshall Roch Date: Wed, 8 Jan 2020 15:04:08 -0500 Subject: [PATCH] CircleCI Windows build --- .circleci/config.yml | 185 +++++++++++++++++++++++++------------------ 1 file changed, 110 insertions(+), 75 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 15286b73d38..175fd85d6f7 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -10,6 +10,9 @@ aliases: tags: only: /.*/ +orbs: + win: circleci/windows@2.2.0 + executors: linux-opam: docker: @@ -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: @@ -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: /.*/