-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathappveyor.yml
More file actions
110 lines (99 loc) · 5.07 KB
/
appveyor.yml
File metadata and controls
110 lines (99 loc) · 5.07 KB
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: 0.0.{build}
pull_requests:
do_not_increment_build_number: true
branches:
only:
- master
environment:
matrix:
- APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2022
platform: x64
job_name: Build Windows x64/ARM64
- APPVEYOR_BUILD_WORKER_IMAGE: Ubuntu2004
platform: x64
job_name: Build Linux x64
LINUX_PLATFORM: Linux
- APPVEYOR_BUILD_WORKER_IMAGE: Ubuntu2004
platform: ARM
job_name: Build Linux ARM64
LINUX_PLATFORM: LinuxARM64
- APPVEYOR_BUILD_WORKER_IMAGE: macOS
platform: MAC
job_name: Build MacOS x64
LINUX_PLATFORM: MacOS
- APPVEYOR_BUILD_WORKER_IMAGE: macOS
platform: MACARM
job_name: Build MacOS ARM64
LINUX_PLATFORM: MacOSARM64
license_password:
secure: AQDGiaXHOptOkZHae90LAGvUuOuwXB36hWtrfqATOVg=
configuration: Release
cache:
- /tmp/cinegy-cinecodersamples.tar
- /tmp/cinegy-cinecodersamples-arm64.tar
install:
- cmd: git submodule update --init --recursive
- sh: |
git submodule update --init --recursive
if [[ $platform == "x64" ]]; then
if [[ -f /tmp/cinegy-cinecodersamples.tar ]]; then
docker load -i /tmp/cinegy-cinecodersamples.tar
else
docker build --rm -t cinegy/cinegy-cinecodersamples .
docker save cinegy/cinegy-cinecodersamples -o /tmp/cinegy-cinecodersamples.tar
fi
fi
if [[ $platform == "ARM" ]]; then
sudo apt-get update --allow-releaseinfo-change
sudo dpkg --add-architecture amd64
sudo apt-get update
sudo apt-get install -y qemu binfmt-support qemu-user-static
docker run --rm --privileged multiarch/qemu-user-static --reset -p yes
docker buildx create --use
docker buildx inspect --bootstrap
fi
if [[ $platform == "ARM" ]]; then
if [[ -f /tmp/cinegy-cinecodersamples-arm64.tar ]]; then
docker load -i /tmp/cinegy-cinecodersamples-arm64.tar
else
docker build --platform linux/arm64 --rm -t cinegy/cinegy-cinecodersamples-arm64 -f dockerfile.arm64 .
docker save cinegy/cinegy-cinecodersamples-arm64 -o /tmp/cinegy-cinecodersamples-arm64.tar
fi
fi
if [[ $LINUX_PLATFORM == "MacOS" || $LINUX_PLATFORM == "MacOSARM64" ]]; then
sw_vers
uname -a
curl -o nuget.exe https://dist.nuget.org/win-x86-commandline/latest/nuget.exe
mv nuget.exe /usr/local/bin/nuget.exe
fi
before_build:
- ps: iex ((New-Object Net.WebClient).DownloadString('https://raw.githubusercontent.com/appveyor/secure-file/master/install.ps1'))
- cmd: appveyor-tools\secure-file -decrypt ./common/cinecoder_license_string.cs.enc -secret %license_password% -salt "hbS1JNgQ/HPgxzuH8NuhxjFOOUusZ2xQEqWf9BVJSXkn1+OAoaU="
- sh: ./appveyor-tools/secure-file -decrypt ./common/cinecoder_license_string.cs.enc -secret $license_password -salt "hbS1JNgQ/HPgxzuH8NuhxjFOOUusZ2xQEqWf9BVJSXkn1+OAoaU="
- cmd: appveyor-tools\secure-file -decrypt ./common/cinecoder_license_string.h.enc -secret %license_password% -salt "c/JvD7c6AcMqWSX+tNCWpja2W/Xeyzeb2lRxqV6GFNXchHAjgXY="
- sh: ./appveyor-tools/secure-file -decrypt ./common/cinecoder_license_string.h.enc -secret $license_password -salt "c/JvD7c6AcMqWSX+tNCWpja2W/Xeyzeb2lRxqV6GFNXchHAjgXY="
- cmd: nuget restore
build_script:
- cmd: MSBuild Cinecoder.Samples.sln /p:Configuration=Release /p:Platform=x64
- cmd: MSBuild Cinecoder.Samples.sln /p:Configuration=Release /p:Platform=ARM64
#- sh: if [[ $platform == "x64" ]]; then docker build --rm -t cinegy/cinegy-cinecodersamples .; fi
- sh: if [[ $platform == "x64" ]]; then docker run --rm -v /home/appveyor/projects/:/data/dev cinegy/cinegy-cinecodersamples:latest sh -c "cd /data/dev/cinecoder-samples && ./build_samples-linux.sh"; fi
#- sh: if [[ $platform == "ARM" ]]; then docker build --platform linux/arm64 --rm -t cinegy/cinegy-cinecodersamples-arm64 -f dockerfile.arm64 .; fi
- sh: if [[ $platform == "ARM" ]]; then docker run --platform linux/arm64 --rm -v /home/appveyor/projects/:/data/dev cinegy/cinegy-cinecodersamples-arm64:latest sh -c "cd /data/dev/cinecoder-samples && ./build_samples-linux.sh"; fi
- sh: if [[ $platform == "MAC" ]]; then ./build_samples-linux.sh; fi
- sh: if [[ $platform == "MACARM" ]]; then ./build_samples-mac-arm64.sh; fi
test_script:
- cmd: nunit3-console _bin\Release.x64\Daniel2.Managed.Tests.dll --result=myresults.xml;format=AppVeyor
- ps: >-
if($IsWindows){
_bin\Release.x64\Daniel2.Native.Tests.exe --gtest_output=xml:tests.xml
$wc = New-Object 'System.Net.WebClient'
$wc.UploadFile("https://ci.appveyor.com/api/testresults/junit/$($env:APPVEYOR_JOB_ID)", (Resolve-Path tests.xml))
}
after_build:
- cmd: >-
7z a CinecoderSamples-%APPVEYOR_REPO_BRANCH%-%APPVEYOR_BUILD_VERSION%.zip %APPVEYOR_BUILD_FOLDER%\_bin\Release.x64 %APPVEYOR_BUILD_FOLDER%\_bin\Release.ARM64
appveyor PushArtifact CinecoderSamples-%APPVEYOR_REPO_BRANCH%-%APPVEYOR_BUILD_VERSION%.zip
- sh: >-
7z a CinecoderSamples-$LINUX_PLATFORM-$APPVEYOR_REPO_BRANCH-$APPVEYOR_BUILD_VERSION.zip $APPVEYOR_BUILD_FOLDER/_bin
appveyor PushArtifact CinecoderSamples-$LINUX_PLATFORM-$APPVEYOR_REPO_BRANCH-$APPVEYOR_BUILD_VERSION.zip