message: CircleCI config for Windows
  Summary:
  Add a config that runs the MSYS2-based Windows build.
  Pull Request resolved:
diff: -version: 2
  +version: 2.1
  # If you only want circle to run on direct commits to master, you can uncomment this out
  # and uncomment the filters: *filter-only-master down below too
  @@ -13,6 +13,9 @@ aliases:
  ignore:
  - gh-pages
  +orbs:
  + win: circleci/windows@2.2.0
  +
  jobs:
  build:
  docker:
  @@ -67,6 +70,39 @@ jobs:
  - store_test_results:
  path: /tmp/test-results
  + build-windows:
  + executor:
  + name: win/default
  + # GCC is hungry.
  + size: "large"
  +
  + steps:
  + - checkout
  +
  + - run:
  + name: Install MSYS2
  + shell: bash.exe
  + command: choco install msys2 -y
  + - run:
  + name: Update MSYS2 package DB
  + shell: c:/tools/msys64/msys2_shell.cmd -defterm -no-start -msys2 -full-path -here -c
  + command: pacman -Syuu --noconfirm
  + - run:
  + name: Setup
  + shell: c:/tools/msys64/msys2_shell.cmd -defterm -no-start -msys2 -full-path -here -c
  + command: pacman -S --needed --noconfirm make mingw-w64-x86_64-boost mingw-w64-x86_64-cmake mingw-w64-x86_64-gcc mingw-w64-x86_64-jsoncpp mingw-w64-x86_64-make
  +
  + - run:
  + name: Build
  + shell: c:/tools/msys64/msys2_shell.cmd -defterm -no-start -mingw64 -full-path -here -c
  + command: mkdir build && cd build && cmake -G "MSYS Makefiles" .. && make -j 4
  +
  + - run:
  + name: Minimal Test
  + # Using bash because somehow piping does not seem to work correctly with cmd.
  + shell: bash.exe
  + command: 'build/redex-all --show-passes | grep -E "Registered passes: [1-9][0-9]*"'
  +
  deploy-website:
  docker:
  # specify the version you desire here
  @@ -85,11 +121,13 @@ jobs:
  cd website && yarn install && GIT_USER=docusaurus-bot USE_SSH=false yarn run publish-gh-pages
  workflows:
  - version: 2
  + version: 2.1
  build_and_deploy:
  jobs:
  # Note: only filter gh-pages for 'build' so that pull requests/stable get checked.
  - build:
  filters: *filter-not-gh-pages
  + - build-windows:
  + filters: *filter-not-gh-pages
  - deploy-website:
  filters: *filter-only-master
  