install-ocaml-windows.yml 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. - name: Setup ocaml
  2. id: ocaml
  3. continue-on-error: true
  4. uses: kLabz/setup-ocaml@win32
  5. with:
  6. ocaml-compiler: 4.08.1
  7. opam-depext: false
  8. opam-repositories: |
  9. opam-repository-mingw: https://github.com/ocaml-opam/opam-repository-mingw.git#sunset
  10. default: https://github.com/ocaml/opam-repository.git
  11. opam-local-packages: |
  12. haxe.opam
  13. cache-prefix: w32-v1
  14. # TODO make it work on first try
  15. # (when cygwin cache doesn't exist, ocaml install fails with a curl error)
  16. - name: Setup ocaml (second chance)
  17. if: steps.ocaml.outcome == 'failure'
  18. uses: kLabz/setup-ocaml@win32
  19. with:
  20. ocaml-compiler: 4.08.1
  21. opam-depext: false
  22. opam-repositories: |
  23. opam-repository-mingw: https://github.com/ocaml-opam/opam-repository-mingw.git#sunset
  24. default: https://github.com/ocaml/opam-repository.git
  25. opam-local-packages: |
  26. haxe.opam
  27. cache-prefix: w32-v1
  28. - name: Install dependencies
  29. shell: pwsh
  30. run: |
  31. Set-PSDebug -Trace 1
  32. curl.exe -fsSL -o "libmbedtls.tar.xz" --retry 3 https://github.com/Simn/mingw64-mbedtls/releases/download/2.16.3/mingw64-$($env:MINGW_ARCH)-mbedtls-2.16.3-1.tar.xz
  33. & "$($env:CYG_ROOT)/bin/bash.exe" @('-lc', 'curl -L https://cpanmin.us | perl - App::cpanminus')
  34. & "$($env:CYG_ROOT)/bin/bash.exe" @('-lc', 'cpanm IPC::System::Simple module')
  35. & "$($env:CYG_ROOT)/bin/bash.exe" @('-lc', 'cpanm String::ShellQuote')
  36. & "$($env:CYG_ROOT)/bin/bash.exe" @('-lc', 'echo "$OLDPWD"')
  37. & "$($env:CYG_ROOT)/bin/bash.exe" @('-lc', 'cd "$OLDPWD" && tar -C / -xvf libmbedtls.tar.xz')