Skip to content

Commit

Permalink
Merge pull request #498 from coq-community/windows-ci
Browse files Browse the repository at this point in the history
Add support for Windows in CI
  • Loading branch information
maximedenes authored Jul 8, 2023
2 parents 3532aed + 03953f9 commit 7e64b12
Show file tree
Hide file tree
Showing 2 changed files with 72 additions and 0 deletions.
24 changes: 24 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,30 @@ jobs:
VSCOQPATH: ${{ env.vscoqtop }}
VSCOQARGS: "-bt"

install-windows:
runs-on: windows-latest
steps:
- name: Set git to use LF
run: |
git config --global core.autocrlf false
git config --global core.eol lf
- name: Checkout
uses: actions/checkout@v3

- name: Build language server
run: .\language-server\build-windows-platform.bat

- run: C:\ci\cygwin64\bin\bash.exe --login -c 'echo vscoqtop=$(cygpath -m $(which vscoqtop))' >> $Env:GITHUB_ENV

- uses: actions/setup-node@v3
with:
node-version: 16

- run: cd client && yarn run package && yarn test
env:
VSCOQPATH: ${{ env.vscoqtop }}
VSCOQARGS: "-bt"

dev-setup-opam:
strategy:
Expand Down
48 changes: 48 additions & 0 deletions language-server/build-windows-platform.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
REM Download platform script

SET PATH=%PATH%;C:\Program Files\7-Zip;C:\Program Files\Git\mingw64\bin

SET PLATFORM=https://github.com/coq/platform/archive/coq-ci.zip

SET ARCH=64

ECHO "Downloading %PLATFORM%"
curl -L -o platform.zip "%PLATFORM%"
7z x platform.zip

REM Build the platform

SET CYGROOT=C:\ci\cygwin%ARCH%
SET CYGCACHE=C:\ci\cache\cygwin

SET CYGWIN_QUIET=y

SET COQREGTESTING=y

cd platform-*

call coq_platform_make_windows.bat ^
-arch=%ARCH% ^
-pick=dev ^
-destcyg=%CYGROOT% ^
-cygcache=%CYGCACHE% ^
-extent=b ^
-parallel=p ^
-jobs=2 ^
-switch=d ^
-set-switch=y ^
-override-dev-pkg="coq-core=https://github.com/coq/coq/archive/%PIN_COQ%.tar.gz" ^
-override-dev-pkg="coq-stdlib=https://github.com/coq/coq/archive/%PIN_COQ%.tar.gz" ^
-override-dev-pkg="coq=https://github.com/coq/coq/archive/%PIN_COQ%.tar.gz" ^
|| GOTO ErrorExit

SET OPAMYES=yes
C:\ci\cygwin64\bin\bash.exe --login -c "opam pin add vscoq-language-server $(cygpath -m '%GITHUB_WORKSPACE%\language-server') --with-doc --with-test -y" || GOTO ErrorExit


GOTO :EOF

:ErrorExit
ECHO ERROR %0 failed
EXIT /b 1

0 comments on commit 7e64b12

Please sign in to comment.