-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathappveyor.yml
74 lines (67 loc) · 3.91 KB
/
appveyor.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
-
branches:
only:
- main
platform:
- x64
init:
- ps: $env:PLUGIN_VERSION = $env:APPVEYOR_REPO_COMMIT.SubString(0,8)
- ps: $env:GW_VERSION=(git ls-remote https://github.com/geneweb/geneweb.git HEAD | cut -c1-8)
environment:
CYG_BASH: '%CYG_ROOT%/bin/bash -lc'
matrix:
- APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2019
CYG_ROOT: C:/cygwin64
PKG_OS: win64
- APPVEYOR_BUILD_WORKER_IMAGE: Ubuntu2004
PKG_OS: linux
- APPVEYOR_BUILD_WORKER_IMAGE: macos-mojave
PKG_OS: macos-10.14
- APPVEYOR_BUILD_WORKER_IMAGE: macos
PKG_OS: macos-10.15
install:
# windows environnement
- cmd: 'choco install -y innosetup'
- cmd: 'set OPAMYES=1'
- cmd: 'set PATH=%PATH%;%CYG_ROOT%\usr\x86_64-w64-mingw32\sys-root\mingw\bin'
- cmd: '%CYG_ROOT%\setup-x86_64.exe -qnNdO -R %CYG_ROOT% -s http://cygwin.mirror.constant.com -l %CYG_ROOT%/var/cache/setup -P rsync -P patch -P diffutils -P unzip -P m4 -P mingw64-x86_64-gcc-core -P mingw64-x86_64-gmp -P perl-IPC-System-Simple'
- cmd: '%CYG_BASH% "curl -fsSL -o opam64.tar.xz https://github.com/fdopen/opam-repository-mingw/releases/download/0.0.0.2/opam64.tar.xz"'
- cmd: '%CYG_BASH% "tar -xf opam64.tar.xz && opam64/install.sh"'
- cmd: '%CYG_BASH% "opam init -a mingw https://github.com/fdopen/opam-repository-mingw.git#opam2 -c 4.09.1+mingw64c --disable-sandboxing"'
- cmd: '%CYG_BASH% "opam update"'
- cmd: '%CYG_BASH% "opam pin add geneweb https://github.com/geneweb/geneweb.git"'
- cmd: '%CYG_BASH% "eval $(ocaml-env cygwin)"'
# unix environnement
- sh: 'export OPAMYES=1'
- sh: 'if [[ "$PKG_OS" == "macos-10.14" || "$PKG_OS" == "macos-10.15" ]]; then sudo chown -R appveyor:staff $HOME/.cache; fi;'
- sh: 'if [[ "$PKG_OS" == "macos-10.14" || "$PKG_OS" == "macos-10.15" ]]; then brew update; fi;'
- sh: 'if [[ "$PKG_OS" == "macos-10.14" || "$PKG_OS" == "macos-10.15" ]]; then brew install wget; fi;'
- sh: 'if [[ "$PKG_OS" == "macos-10.14" || "$PKG_OS" == "macos-10.15" ]]; then brew install opam; fi;'
- sh: 'if [[ "$PKG_OS" == "macos-10.14" || "$PKG_OS" == "macos-10.15" ]]; then brew install cpanm; fi;'
- sh: 'if [[ "$PKG_OS" == "macos-10.14" || "$PKG_OS" == "macos-10.15" ]]; then cpanm --local-lib=~/perl5 local::lib && eval $(perl -I ~/perl5/lib/perl5/ -Mlocal::lib); fi;'
- sh: 'if [[ "$PKG_OS" == "macos-10.14" || "$PKG_OS" == "macos-10.15" ]]; then cpanm String::ShellQuote; fi;'
- sh: 'if [[ "$PKG_OS" == "macos-10.14" || "$PKG_OS" == "macos-10.15" ]]; then cpanm IPC::System::Simple; fi;'
- sh: 'if [[ "$PKG_OS" == "linux" ]]; then sudo add-apt-repository ppa:avsm/ppa; fi;'
- sh: 'if [[ "$PKG_OS" == "linux" ]]; then sudo sudo apt-get update; fi;'
- sh: 'if [[ "$PKG_OS" == "linux" ]]; then sudo apt-get install -qq opam libstring-shellquote-perl; fi;'
- sh: 'opam init --compiler=4.09.1'
- sh: 'eval $(opam config env)'
- sh: 'opam update'
- sh: 'opam pin add geneweb https://github.com/geneweb/geneweb.git'
build_script:
- sh: 'dune build --release @plugin'
- sh: 'zip -r geneweb-plugin-v7-$PKG_OS-$GW_VERSION-$PLUGIN_VERSION.zip _build/default/src/assets/ _build/default/src/plugin_v7.cmxs'
- cmd: '%CYG_BASH% "cd ${APPVEYOR_BUILD_FOLDER} && dune build --release @plugin"'
- cmd: 7z a geneweb-%PKG_OS%-%GW_VERSION%-plugin-v7-%PLUGIN_VERSION%.zip _build/default/src/assets/ _build/default/src/plugin_v7.cmxs
artifacts:
- path: geneweb-%PKG_OS%-%GW_VERSION%-plugin-v7-%PLUGIN_VERSION%.zip
name: v7 plugin for GeneWeb
deploy:
release: 'v7 plugin v%PLUGIN_VERSION% for geneweb v%GW_VERSION%'
description: 'V7 plugin %PLUGIN_VERSION% / GeneWeb %GW_VERSION%. Built by appveyor'
provider: GitHub
auth_token:
secure: nnAfleN0F5yUmOi+I+mzgccorlJdqFJk5Th+5NCbsQGu0mTxeH2MCGpdOhe1Xz3+
artifact: geneweb-%PKG_OS%-%GW_VERSION%-plugin-v7-$PLUGIN_VERSION.zip
draft: false
prerelease: true