-
Notifications
You must be signed in to change notification settings - Fork 166
/
appveyor.yml
92 lines (81 loc) · 3.11 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
configuration:
- Release
platform:
- Win32
- x64
image:
- Ubuntu1604
- Visual Studio 2017
environment:
APPVEYOR_YML_DISABLE_PS_LINUX: true
install:
- git submodule update --init --recursive
- ps: |
$env:GIT_TAG = (git describe HEAD | sed -E "s/-.+$//")
Update-AppveyorBuild -Version "$env:GIT_TAG-$env:APPVEYOR_BUILD_NUMBER"
before_build:
- sh: sudo apt-get update
- sh: sudo apt-get install libjack-dev liblhasa-dev librtmidi-dev libsdl2-dev libzzip-dev -y
- sh: if [ $PLATFORM == "Win32" ]; then exit 0; fi
- sh: mkdir -p build
- sh: cd build
- sh:
- cmd: pwd
- cmd: md build
- cmd: cd build
- cmd: if %platform% == Win32 cmake -G "Visual Studio 15 2017" -T v140_xp ..
- cmd: if %platform% == x64 cmake -G "Visual Studio 15 2017 Win64" -T v140_xp ..
- cmd: dir
for:
-
matrix:
only:
- image: Ubuntu1604
build_script:
- sh: cmake -DCMAKE_BUILD_TYPE=Debug ..
- sh: pwd
- sh: make
- sh: cpack -C %configuration% -D CPACK_GENERATOR="ZIP"
- sh: cd ..
- sh: unzip build/milkytracker*.zip
- sh: echo create AppImage
- sh: ls -la
- sh: cp -r milkytracker-* Milkytracker-x86_64.AppDir
- sh: cd Milkytracker-x86_64.AppDir
- sh: echo -e '#!/bin/sh\nHERE="$(dirname "$(readlink -f "${0}")")"\nLD_LIBRARY_PATH="$HERE/usr/lib:$LD_LIBRARY_PATH" $HERE/bin/milkytracker "$@"' > AppRun && chmod +x AppRun
- sh: echo CHECKING LIBS && find . -executable -type f -exec ldd {} \; | grep " => /usr" | cut -d " " -f 2-3 | sort | uniq
- sh: mkdir -p usr/share usr/lib
- sh: objdump -p bin/milkytracker | awk '/ NEEDED/ {print $2}'
#- sh: objdump -p bin/milkytracker | awk '/ NEEDED/ {print $2}' | while read lib; do { set +e; test -f /usr/lib/x86_64-linux-gnu/$lib && cp /usr/lib/x86_64-linux-gnu/$lib usr/lib/.; set -e; } done
- sh: cp /usr/lib/x86_64-linux-gnu/{librtmidi*,libzzip-0.so.13,libsnd*,libvorb*,libFLAC*,libffi*,libogg*,liblhasa*} usr/lib/.
- sh: cd usr && ln -s lib x86_64-linux-gnu && cd -
- sh: cp ../resources/pictures/carton.png milkytracker.png
- sh: cp ../resources/milkytracker.desktop .
- sh: sed -i 's|MilkyTracker|Milkytracker|g;s|Comment=.*|Comment=A Portable SampleTracker DAW|g' milkytracker.desktop
#- sh: cp ../resources/org.milkytracker.MilkyTracker.metainfo.xml /usr/share/metainfo/
- sh: find .
- sh: cd ..
- sh: wget 'https://github.com/AppImage/AppImageKit/releases/download/continuous/appimagetool-x86_64.AppImage';
- sh: chmod +x appimagetool*.AppImage
- sh: ./appimagetool-* Milkytracker-x86_64.AppDir
- sh: pwd
build:
project: build\MilkyTracker.sln
after_build:
# https://github.com/chocolatey/chocolatey/issues/431
- cmd: cmake -E remove -f c:\programdata\chocolatey\bin\cpack.exe
- cmd: cpack -C %configuration%
artifacts:
- path: build\milkytracker*.zip
- path: Milky*.AppImage
deploy:
description: Release $(appveyor_repo_tag_name)
provider: GitHub
auth_token:
secure: k4eMw7MSycoyZwL8VfdAS8ejNXnwhFQ0KOVpif3IqyQDUrOGeGRyCHXm7FsD4kjb
artifact: /milkytracker.*\.zip/
prerelease: false
overwrite: true
on:
configuration: Release
appveyor_repo_tag: true # deploy on tag push only