-
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path.cirrus.yml
149 lines (132 loc) · 6.71 KB
/
.cirrus.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
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
env:
BACKBLAZE_APP_KEY_ID: ENCRYPTED[95a37d7a31679c7fb32b03d05b33edb065dcf7f0f823e7fe721e3247e5f3668d4063591d5c733ade1fd7a32f5f859c5f]
BACKBLAZE_APP_KEY: ENCRYPTED[770e70e48569f43396e50d0692a4c1abe64e4821c1ef816520c792ad6222c61641b7e56132e37896340f740720196604]
linux_build_task:
container:
dockerfile: .ci/Dockerfile.linux
build_script:
- mkdir -p __build
- cd __build
- cmake .. -DCMAKE_TOOLCHAIN_FILE=/usr/local/vcpkg/scripts/buildsystems/vcpkg.cmake -DCMAKE_INSTALL_PREFIX=chronicle-install
- cmake --build .
dist_script:
# - chmod +x .ci/*.sh
# - .ci/chronicle-create-dist-archives.sh
- cd __build
- cmake --install .
- cpack .
- make package_source
- cd chronicle-install
- tar czf ./chronicle-linux-${CIRRUS_BUILD_ID}.tar.gz ./*
- zip -rq9 ./chronicle-linux-${CIRRUS_BUILD_ID} ./* -x *.gz -x *.tar
package_artifacts:
path: __build/chronicle-install/chronicle-linux*
deb_artifacts:
path: __build/*.deb
win_build_task:
env:
VSPATH: "C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\Community"
GENERATOR_STRING: "Visual Studio 16 2019"
matrix:
- {
env: { BITNESS: x64 },
windows_container:
{ dockerfile: .ci/Dockerfile.winx64, os_version: 2019 },
}
- {
env: { BITNESS: x86 },
windows_container:
{ dockerfile: .ci/Dockerfile.winx86, os_version: 2019 },
}
use_compute_credits: $CIRRUS_USER_COLLABORATOR == 'true'
# curses_download_cache:
# folder: PDCurses
# fingerprint_script: echo pdcurses-fingerprint-2
# populate_script:
# - git clone https://github.com/wmcbrine/PDCurses
# curses_build_script:
# - cd PDCurses/wincon
# - set VSCMD_DEBUG=1
# - '"C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\Tools\VsDevCmd.bat" -arch=%BITNESS%'
# - nmake -f Makefile.vc UTF8=Y WIDE=y
# - cmake -E copy ../curses.h C:/include
# - cmake -E copy ../panel.h C:/include
# - cmake -E copy ../curspriv.h C:/include
# - cmake -E copy pdcurses.lib C:/lib
# - nmake -f Makefile.vc clean # Remove the generated files, so they aren't cached
# lame_download_cache:
# folder: lame-3.100
# fingerprint_script: echo lame-3.100-fingerprint-2
# populate_script:
# - aria2c https://netix.dl.sourceforge.net/project/lame/lame/3.100/lame-3.100.tar.gz
# - 7z x lame-3.100.tar.gz
# - 7z x lame-3.100.tar
# - cd lame-3.100
# - ps: ((Get-Content -path .\Makefile.MSVC -Raw) -replace '/machine:I386','/machine:X64') | Set-Content -path .\Makefile.MSVCx64 # Setup for x64
# - cmake -E copy Makefile.MSVC Makefile.MSVCx86
# - cmake -E copy configMS.h config.h
# lame_build_script:
# - cd lame-3.100
# - set VSCMD_DEBUG=1
# - '"C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\Tools\VsDevCmd.bat" -arch=%BITNESS%'
# - nmake -f Makefile.MSVC%BITNESS% comp=msvc asm=no DLL /D
# - cmake -E copy output\libmp3lame.dll C:/lib
# - cmake -E copy output\libmp3lame-static.lib C:/lib
# - nmake -f Makefile.MSVC%BITNESS% comp=msvc asm=no clean /D
vcpkg_script:
#- # ; cat C:\ProgramData\chocolatey\logs\chocolatey.log
- dir "%VSPATH%"
- dir "%VSPATH%"\VC
- dir "%VSPATH%"\VC\Tools
- git clone https://github.com/Microsoft/vcpkg.git C:\vcpkg
- cd C:\vcpkg
- ps: (gc .\scripts\bootstrap.ps1) -replace '-prerelease -legacy', '-prerelease -legacy -all' | Out-File .\scripts\bootstrap.ps1 -encoding ASCII
- .\bootstrap-vcpkg.bat -withVSPath '"%VSPATH%"'
- .\vcpkg install libsndfile libflac libvorbis:x64-windows libogg spdlog boost-filesystem boost-program-options pdcurses mp3lame rtaudio --triplet=x64-windows
build_script:
- cmake -E make_directory __build && cd __build
- cmake -G "%GENERATOR_STRING%" .. -DCMAKE_TOOLCHAIN_FILE=C:\vcpkg\scripts\buildsystems\vcpkg.cmake -DVCPKG_TARGET_TRIPLET=%BITNESS%-windows -DCMAKE_INSTALL_PREFIX ./chronicle-install -A %BITNESS% --debug-output
- cmake --build . -v --config Release
#- cmake -E copy C:/lib/rtaudio.dll Release/
dist_script:
#- cmake -E copy LICENCE.md __build/Release/
#- cmake -E copy README.md __build/Release/
#- cmake -E copy CHANGELOG.md __build/Release/
#- cd __build/Release/*
- cd __build/chronicle-install/
- cmake --install .
- cd chronicle-install
- 7z a chronicle-win%BITNESS%-%CIRRUS_BUILD_ID%.zip ./*
- 7z -ttar a dummyfile ./* -so| 7z -si -tgzip a chronicle-win%BITNESS%-%CIRRUS_BUILD_ID%.tar.gz
package_artifacts:
#path: ./__build/Release/*.zip
path: ./__build/chronicle-install/*
publish_task:
container:
image: gcc:latest
depends_on:
- linux_build
- win_build
only_if: $CIRRUS_BRANCH == 'master'
publish_script:
- apt update && apt install python python-pip -y
- pip install b2
- wget https://api.cirrus-ci.com/v1/artifact/github/hcr923fm/chronicle/win_build/package/__build/Release/chronicle-winx86-${CIRRUS_BUILD_ID}.zip
- wget https://api.cirrus-ci.com/v1/artifact/github/hcr923fm/chronicle/win_build/package/__build/Release/chronicle-winx64-${CIRRUS_BUILD_ID}.zip
- wget https://api.cirrus-ci.com/v1/artifact/github/hcr923fm/chronicle/linux_build/package/__build/Release/chronicle-linux-${CIRRUS_BUILD_ID}.zip
- wget https://api.cirrus-ci.com/v1/artifact/github/hcr923fm/chronicle/win_build/package/__build/Release/chronicle-winx86-${CIRRUS_BUILD_ID}.tar.gz
- wget https://api.cirrus-ci.com/v1/artifact/github/hcr923fm/chronicle/win_build/package/__build/Release/chronicle-winx64-${CIRRUS_BUILD_ID}.tar.gz
- wget https://api.cirrus-ci.com/v1/artifact/github/hcr923fm/chronicle/linux_build/package/__build/Release/chronicle-linux-${CIRRUS_BUILD_ID}.tar.gz
- CHRONICLE_MAJOR_VERSION=`awk '/MAJOR/ {print $5}' ../version.h | sed 's/[^0-9]//g'`
- CHRONICLE_MINOR_VERSION=`awk '/MINOR/ {print $5}' ../version.h | sed 's/[^0-9]//g'`
- CHRONICLE_PATCH_VERSION=`awk '/PATCH/ {print $5}' ../version.h | sed 's/[^0-9]//g'`
- CHRONICLE_VERSION=${CHRONICLE_MAJOR_VERSION}.${CHRONICLE_MINOR_VERSION}.${CHRONICLE_PATCH_VERSION}
- mv chronicle-winx86-${CIRRUS_BUILD_ID}.zip chronicle-${CHRONICLE_VERSION}-win32.zip
- mv chronicle-winx64-${CIRRUS_BUILD_ID}.zip chronicle-${CHRONICLE_VERSION}-win64.zip
- mv chronicle-winx86-${CIRRUS_BUILD_ID}.tar.gz chronicle-${CHRONICLE_VERSION}-win32.tar.gz
- mv chronicle-winx64-${CIRRUS_BUILD_ID}.tar.gz chronicle-${CHRONICLE_VERSION}-win64.tar.gz
- mv chronicle-linux-${CIRRUS_BUILD_ID}.tar.gz chronicle-${CHRONICLE_VERSION}-linux.tar.gz
- mv chronicle-linux-${CIRRUS_BUILD_ID}.zip chronicle-${CHRONICLE_VERSION}-linux.zip
- chmod +x .ci/*.sh
- b2 authorize-account $BACKBLAZE_APP_KEY_ID $BACKBLAZE_APP_KEY
- .ci/chronicle-b2-upload.sh