-
Notifications
You must be signed in to change notification settings - Fork 11
/
Copy pathappveyor.yml
110 lines (102 loc) · 4.93 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
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
version: '{build}'
branches:
except:
- latest
environment:
access_token:
secure: "WOWWFZfEHBTsIZgOXJ2PriAfHWS31VPxOFv00ro14IJ08vyp97CEdxr3ntyewvU4YGAH+fuFWMDian5Src7lKmYj/V1gDpdTEnXfQlo8GWBzGQYmCBJmnuM4qdmHqtF0"
MSYS2_BASEVER: "20241208"
MSYS2_ARCH: "x86_64"
MSYS2_URL: "http://repo.msys2.org/distrib/%MSYS2_ARCH%/msys2-base-%MSYS2_ARCH%-%MSYS2_BASEVER%.tar.xz"
MSYS2_ARCHIVE: "msys2.tar.xz"
MSYS2_SUBARCHIVE: "msys2.tar"
IPF_LINUX_URL: "http://www.softpres.org/_media/files:ipflib42_linux-i686.tar.gz"
PACKAGES: "ctags make zip diffutils %ARCH_PACKAGES%"
matrix:
- MINGW_DIR: "/mingw64"
WINARCH: "win64"
ARCH_PACKAGES: "mingw-w64-x86_64-ctags mingw-w64-x86_64-make mingw-w64-x86_64-gcc mingw-w64-x86_64-libxml2 mingw-w64-x86_64-curl mingw-w64-x86_64-libusb mingw-w64-x86_64-openssl"
IPF_WIN_URL: "http://www.softpres.org/_media/files:ipflib42_win_x64.zip"
IPF_DLL_SRC: "CAPSImg_x64.dll"
IPF_LICENCE_SRC: "LICENSE.txt"
RUN_E2E: "true"
- MINGW_DIR: "/mingw32"
WINARCH: "win32"
ARCH_PACKAGES: "mingw-w64-i686-ctags mingw-w64-i686-make mingw-w64-i686-gcc mingw-w64-i686-libxml2 mingw-w64-i686-curl mingw-w64-i686-libusb mingw-w64-i686-openssl"
IPF_WIN_URL: "http://www.softpres.org/_media/files:ipflib42_w32.zip"
IPF_DLL_SRC: "ipflib42_w32/CAPSImg.dll"
IPF_LICENCE_SRC: "ipflib42_w32/LICENSE.txt"
# I'm not sure why, e2e tests do not work on win32 (binary doesn't seem to work), only on win64 ...
RUN_E2E: "false"
install:
- if not exist "%MSYS2_ARCHIVE%" appveyor DownloadFile "%MSYS2_URL%" -FileName "%MSYS2_ARCHIVE%"
- 7z x "%MSYS2_ARCHIVE%"
- 7z x "%MSYS2_SUBARCHIVE%" > NUL
# msys2 advise to restart the shell after a first start
- msys64\usr\bin\bash -lc ""
# Allow three updates to fail (can happen with 'To complete this update all MSYS2 processes including this terminal will be closed.' killing bash itself.
- msys64\usr\bin\bash -lc "pacman --noconfirm -Suy" & exit 0
- msys64\usr\bin\bash -lc "pacman --noconfirm -Suy" & exit 0
- msys64\usr\bin\bash -lc "pacman --noconfirm -Suy" & exit 0
# The last one should succeed with nothing to update.
- msys64\usr\bin\bash -lc "pacman --noconfirm -Suy"
# Install packages. Three attempts as this can fail with network error sometims.
- msys64\usr\bin\bash -lc "for i in {1..3}; do pacman --noconfirm -S %PACKAGES% && break || sleep 15 ; done"
before_build:
- msys64\usr\bin\bash -lc "%MINGW_DIR%/bin/g++ --version"
- msys64\usr\bin\bash -lc "/usr/bin/make --version"
- echo "NUMBER_OF_PROCESSORS=%NUMBER_OF_PROCESSORS%"
build_script:
- msys64\usr\bin\bash -lc "ls /mingw*/bin/"
- msys64\usr\bin\bash -lc "cd c:/projects/kalenji-gps-watch-reader && PATH=$PATH:%MINGW_DIR%/bin /usr/bin/make ARCH=%WINARCH% MINGW_PATH=\"%MINGW_DIR%\" WINE=\"\" windows"
- msys64\usr\bin\bash -lc "cd c:/projects/kalenji-gps-watch-reader && PATH=$PATH:%MINGW_DIR%/bin ./test/integrated/test_win_deps.sh"
- msys64\usr\bin\bash -lc "cd c:/projects/kalenji-gps-watch-reader && mv win/ kalenji_reader-%WINARCH%"
- msys64\usr\bin\bash -lc "cd c:/projects/kalenji-gps-watch-reader && zip -r kalenji_reader-%WINARCH%.zip kalenji_reader-%WINARCH%"
# Delete and recreate latest tag to trigger the 2nd build that will update the release date (https://github.com/appveyor/ci/issues/827)
# Only do it for build on master branch to avoid looping !
- ps: |
if ($env:APPVEYOR_REPO_TAG -eq "false") {
try {
git config --global credential.helper store
Add-Content "$HOME\.git-credentials" "https://$($env:access_token):[email protected]`n"
git tag -d latest
git tag latest HEAD
git push -q -f origin latest
if (-not $?) {
throw "git push failed ..."
}
} catch {
Write-Output "Deletion of tag latest failed, ignoring."
}
}
artifacts:
- path: "kalenji_reader-%WINARCH%.zip"
name: kalenji_reader-%WINARCH%.zip
deploy:
# Ugly hack for https://github.com/appveyor/ci/issues/827
# We build 2 times.
# 1st build: a pre-release on master at each commit, marking the release as prerelease and setting tag 'latest'.
- release: "Kalenji Reader latest"
tag: latest
description: "Latest build of Kalenji Redaer, with the newest cool features and the most recent bugs."
provider: GitHub
auth_token:
secure: "WOWWFZfEHBTsIZgOXJ2PriAfHWS31VPxOFv00ro14IJ08vyp97CEdxr3ntyewvU4YGAH+fuFWMDian5Src7lKmYj/V1gDpdTEnXfQlo8GWBzGQYmCBJmnuM4qdmHqtF0"
artifact: kalenji_reader-%WINARCH%.zip
draft: false
prerelease: false
force_update: true
on:
branch: master
# This deployment is for tagged versions (e.g: v4.4.0)
- release: "Kalenji Reader %APPVEYOR_REPO_TAG_NAME%"
tag: "%APPVEYOR_REPO_TAG_NAME%"
provider: GitHub
auth_token:
secure: "WOWWFZfEHBTsIZgOXJ2PriAfHWS31VPxOFv00ro14IJ08vyp97CEdxr3ntyewvU4YGAH+fuFWMDian5Src7lKmYj/V1gDpdTEnXfQlo8GWBzGQYmCBJmnuM4qdmHqtF0"
artifact: kalenji_reader-%WINARCH%.zip
draft: false
prerelease: false
force_update: true
on:
appveyor_repo_tag: true