Jelajahi Sumber

[AppVeyor] install ocaml using fdopen's distribution

See https://gist.github.com/nadako/1e73ee2fa759d2ea9bf4acb65e3e3052
Andy Li 8 tahun lalu
induk
melakukan
df1a7c442d
1 mengubah file dengan 10 tambahan dan 7 penghapusan
  1. 10 7
      appveyor.yml

+ 10 - 7
appveyor.yml

@@ -19,17 +19,21 @@ services:
 skip_tags: true
 
 cache:
-    - ocaml-installer.exe -> appveyor.yml
+    - opam32.tar.xz -> appveyor.yml
 
 install:
     - 'git submodule update --init --recursive'
     # Install ocaml
-    - if not exist "ocaml-installer.exe" (
-        curl -fsS -o ocaml-installer.exe --retry 3 http://gallium.inria.fr/~protzenk/caml-installer/ocaml-4.02.3-i686-mingw64-installer4-opam.exe
+    - curl -fsS -o cygwin-setup.exe --retry 3 https://cygwin.com/setup-x86.exe
+    - 'cygwin-setup.exe -g -q -R "%CYG_ROOT%" -P make -P git -P mingw64-i686-zlib -P rsync -P patch -P diffutils -P curl -P unzip -P m4 -P perl -P mingw64-i686-gcc-core'
+    - if not exist "opam32.tar.xz" (
+        curl -fsS -o opam32.tar.xz --retry 3 https://dl.dropboxusercontent.com/s/eo4igttab8ipyle/opam32.tar.xz
       )
-    - ocaml-installer.exe /S
-    - 'C:\Users\Public\Desktop\cygwin-setup.exe -g -q -R "%CYG_ROOT%" -P make -P git -P mingw64-i686-zlib'
-    - 'set PATH=%PATH%;%CYG_ROOT%/usr/i686-w64-mingw32/sys-root/mingw/bin'
+    - 7z x "opam32.tar.xz" -so | 7z x -aoa -si -ttar
+    - '%CYG_ROOT%/bin/bash -lc "echo initialize"'
+    - '%CYG_ROOT%/bin/bash -lc "cd \"$OLDPWD\" && bash opam32/install.sh"'
+    - '%CYG_ROOT%/bin/bash -lc "opam init mingw \"https://github.com/fdopen/opam-repository-mingw.git\" --comp 4.02.3+mingw32c --switch 4.02.3+mingw32c --auto-setup --yes"'
+    - '%CYG_ROOT%/bin/bash -lc "opam install camlp4 --yes"'
     # Install neko
     - choco install neko --prerelease --ignore-dependencies -s 'https://ci.appveyor.com/nuget/neko' -y
     - RefreshEnv
@@ -43,7 +47,6 @@ install:
 
 build_script:
     - 'cd %APPVEYOR_BUILD_FOLDER%'
-    - '%CYG_ROOT%/bin/bash -lc "echo initialize"'
     - '%CYG_ROOT%/bin/bash -lc "cd \"$OLDPWD\" && make -s -f Makefile.win package_src"'
     - '%CYG_ROOT%/bin/bash -lc "cd \"$OLDPWD\" && make -s -f Makefile.win"'
     - 'set PATH=%PATH%;%APPVEYOR_BUILD_FOLDER%'