-
Notifications
You must be signed in to change notification settings - Fork 8
157 lines (133 loc) · 5.39 KB
/
AVDump3.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
150
151
152
153
154
155
156
157
name: AVDump3
on:
push:
tags: [ 'B[0-9]+-GitHubRelease' ]
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
build-avd3-native:
name: build-avd3-native/${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [windows-latest, ubuntu-latest, macos-latest]
include:
- os: windows-latest
platform: windows
- os: ubuntu-latest
platform: linux
- os: macos-latest
platform: macos
steps:
- name: AVD3Native-Checkout
uses: actions/[email protected]
- name: AVD3Native-Compile-Linux
if: matrix.platform == 'linux'
run: |
make -C AVDump3NativeLib
mv ${{ github.workspace }}/AVDump3NativeLib/AVDump3NativeLib.so ${{ github.workspace }}/AVDump3NativeLib/AVDump3NativeLib-x64.so
- name: AVD3Native-ArtifactUpload-Linux
if: matrix.platform == 'linux'
uses: actions/upload-artifact@v2
with:
name: AVDump3NativeLib.Linux
path: ${{ github.workspace }}/AVDump3NativeLib/AVDump3NativeLib-x64.so
- name: AVD3Native-Compile-LinuxAarch64
if: matrix.platform == 'linux'
run: |
sudo apt install gcc make gcc-aarch64-linux-gnu binutils-aarch64-linux-gnu
ls -lh
rm -rf AVDump3NativeLib/*.o
make ARCH=aarch64 -C AVDump3NativeLib
mv ${{ github.workspace }}/AVDump3NativeLib/AVDump3NativeLib.so ${{ github.workspace }}/AVDump3NativeLib/AVDump3NativeLib-aarch64.so
- name: AVD3Native-ArtifactUpload-LinuxAarch64
if: matrix.platform == 'linux'
uses: actions/upload-artifact@v2
with:
name: AVDump3NativeLib.Linux
path: ${{ github.workspace }}/AVDump3NativeLib/AVDump3NativeLib-aarch64.so
- name: AVD3Native-Compile-MacOS
if: matrix.platform == 'macos'
run: |
# Match .NET Core's macOS target versions
make ARCH=x86_64 -C AVDump3NativeLib MACOSX_DEPLOYMENT_TARGET=10.13
mv ${{ github.workspace }}/AVDump3NativeLib/AVDump3NativeLib.dylib ${{ github.workspace }}/AVDump3NativeLib/AVDump3NativeLib-x64.dylib
make -B ARCH=arm64 -C AVDump3NativeLib MACOSX_DEPLOYMENT_TARGET=11.0
mv ${{ github.workspace }}/AVDump3NativeLib/AVDump3NativeLib.dylib ${{ github.workspace }}/AVDump3NativeLib/AVDump3NativeLib-arm64.dylib
lipo -create ${{ github.workspace }}/AVDump3NativeLib/AVDump3NativeLib-{x64,arm64}.dylib -output ${{ github.workspace }}/AVDump3NativeLib/AVDump3NativeLib.dylib
- name: AVD3Native-ArtifactUpload-MacOS
if: matrix.platform == 'macos'
uses: actions/upload-artifact@v2
with:
name: AVDump3NativeLib.MacOS
path: ${{ github.workspace }}/AVDump3NativeLib/AVDump3NativeLib.dylib
- name: AVD3Native-MSBuildSetup-Windows
if: matrix.platform == 'windows'
uses: microsoft/[email protected]
- name: AVD3Native-Compile-Windows
if: matrix.platform == 'windows'
run: |
msbuild AVDump3NativeLib\AVDump3NativeLib.vcxproj /p:Configuration="GithubWorkflow" /p:platform=x64 /p:BuildProjectReferences=false
- name: AVD3Native-ArtifactUpload-Windows
if: matrix.platform == 'windows'
uses: actions/upload-artifact@v2
with:
name: AVDump3NativeLib.Windows
path: ${{ github.workspace }}\AVDump3NativeLib\x64\GithubWorkflow\AVDump3NativeLib.dll
build-avd3-main:
needs: build-avd3-native
runs-on: ubuntu-latest
steps:
- name: AVD3Main-Checkout
uses: actions/checkout@v2
- name: AVD3Main-DotNetSetup
uses: actions/setup-dotnet@v1
with:
dotnet-version: 6.0.x
- name: AVD3Main-DownloadArtifacts
uses: actions/download-artifact@v2
with:
path: ${{ github.workspace }}/AVDump3CL/bin/Release/net6.0/
- name: AVDMain-MoveArtifacts
run: |
find $GITHUB_WORKSPACE/AVDump3CL/bin/Release/net6.0/ -type f -print -exec mv {} $GITHUB_WORKSPACE/AVDump3CL/bin/Release/net6.0/ \;
rm -R -- $GITHUB_WORKSPACE/AVDump3CL/bin/Release/net6.0/*/
- name: AVD3Main-Compile
run: dotnet build --configuration GithubWorkflow
- name: AVD3Main-CopyLibs
run: |
cp $GITHUB_WORKSPACE/AVDump3Lib/Libs/MediaInfo*.* $GITHUB_WORKSPACE/AVDump3CL/bin/Release/net6.0/
- name: AVD3Main-ArtifactUpload
uses: actions/upload-artifact@v2
with:
name: AVDump3CL
path: ${{ github.workspace }}/AVDump3CL/bin/Release/net6.0/
release-avd3-main:
if: contains(github.ref, 'tags/B')
runs-on: ubuntu-latest
needs: build-avd3-main
steps:
- name: AVD3Release-DownloadArtifacts
uses: actions/download-artifact@v2
with:
name: AVDump3CL
path: ${{ github.workspace }}/AVDump3CL
- name: AVD3Release-GetTag
id: avd3releasegettag
uses: olegtarasov/[email protected]
with:
tagRegex: "B(\\d+)"
- name: AVD3Release-CompressAsset
run: |
cd ${{ github.workspace }}/AVDump3CL
zip -r ${{ github.workspace }}/AVDump3CL-B${{ steps.avd3releasegettag.outputs.tag }}.zip *
- name: AVD3Release-Create
id: avd3releasecreate
uses: softprops/action-gh-release@v1
with:
name: Build ${{ steps.avd3releasegettag.outputs.tag }}
draft: false
prerelease: false
files: ${{ github.workspace }}/AVDump3CL-B${{ steps.avd3releasegettag.outputs.tag }}.zip