diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 699fb4a0..7a3b1d8f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -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: diff --git a/language-server/build-windows-platform.bat b/language-server/build-windows-platform.bat new file mode 100644 index 00000000..d8870857 --- /dev/null +++ b/language-server/build-windows-platform.bat @@ -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 +