-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathappveyor.yml
74 lines (64 loc) · 3.64 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
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 on Windows x64
- APPVEYOR_BUILD_WORKER_IMAGE: Ubuntu1804
platform: x64
job_name: Build on Ubuntu x64
LINUX_PLATFORM: Linux
- APPVEYOR_BUILD_WORKER_IMAGE: Ubuntu2004
platform: ARM
job_name: Build on Ubuntu ARM64
LINUX_PLATFORM: LinuxARM64
license_password:
secure: Hk0iGo1OgnbNih0NWskajQ==
configuration: Release
install:
- cmd: git submodule update --init --recursive
- sh: |
git submodule update --init --recursive
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
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 "D+rTP7tXYCvhvcV/eYhrkMc/YbKKqeza6QhfcLXNu1JyrRKAVF8="
- sh: ./appveyor-tools/secure-file -decrypt ./common/cinecoder_license_string.cs.enc -secret $license_password -salt "D+rTP7tXYCvhvcV/eYhrkMc/YbKKqeza6QhfcLXNu1JyrRKAVF8="
- cmd: appveyor-tools\secure-file -decrypt ./common/cinecoder_license_string.h.enc -secret %license_password% -salt "V5mw3xZVMOQVpEUG/94X7oBXS3lcZvih7l6miFe8aimAD7/dWAc="
- sh: ./appveyor-tools/secure-file -decrypt ./common/cinecoder_license_string.h.enc -secret $license_password -salt "V5mw3xZVMOQVpEUG/94X7oBXS3lcZvih7l6miFe8aimAD7/dWAc="
- 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
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