-
Notifications
You must be signed in to change notification settings - Fork 40
171 lines (136 loc) · 5.99 KB
/
ci.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
158
159
160
161
162
163
164
165
166
167
168
169
170
171
on: [push]
name: build
jobs:
check:
name: dash-mpd-cli check/nightly
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: dtolnay/rust-toolchain@nightly
- name: Install protobuf compiler
run: sudo apt-get update && sudo apt-get install protobuf-compiler
- run: cargo check
- run: cargo build
- run: cargo build --no-default-features
- name: Install ffmpeg and GPAC
run: sudo apt-get install ffmpeg gpac wget
- name: Install Bento4 mp4decrypt
run: |
wget -q -O /tmp/bento4.zip https://www.bok.net/Bento4/binaries/Bento4-SDK-1-6-0-641.x86_64-unknown-linux.zip
unzip /tmp/bento4.zip "Bento4-SDK-*/bin/mp4decrypt" -d /tmp
sudo mv /tmp/Bento4-SDK*/bin/mp4decrypt /usr/local/bin
mp4decrypt || true
- name: Install shaka-packager
run: |
wget -q -O /tmp/shaka-packager https://github.com/shaka-project/shaka-packager/releases/latest/download/packager-linux-x64
mv /tmp/shaka-packager /usr/local/bin
chmod +x /usr/local/bin/shaka-packager
- name: Install xsltproc
run: sudo apt install xsltproc
- run: cargo test --jobs 1 -- --show-output
- run: cargo doc --no-deps --all-features
build-macos:
runs-on: macos-14
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: dtolnay/rust-toolchain@stable
- name: install protobuf compiler
run: brew install protobuf cmake
- run: cargo build --jobs 1 --verbose
# The "|| true" on upgrade is to work around homebrew conflicts between GitHub-installed Python versions
# and those required by our packages.
- name: install GPAC/MP4Box
run: |
brew update
brew upgrade || true
HOMEBREW_NO_INSTALLED_DEPENDENTS_CHECK=1 brew install gpac
- name: install ffmpeg
run: brew install ffmpeg
- name: Install Bento4 mp4decrypt
run: |
wget -q -O /tmp/bento4.zip https://www.bok.net/Bento4/binaries/Bento4-SDK-1-6-0-641.universal-apple-macosx.zip
unzip /tmp/bento4.zip "Bento4-SDK-*/bin/mp4decrypt" -d /tmp
sudo mv /tmp/Bento4-SDK*/bin/mp4decrypt /usr/local/bin
mp4decrypt || true
# Shaka packager is not available via homebrew. Alternatively, could use docker
# google/shaka-packager. Here we are depending on the macos runner being an AMD64 machine.
- name: Install shaka-packager
run: |
wget -q -O /tmp/shaka-packager https://github.com/shaka-project/shaka-packager/releases/latest/download/packager-osx-x64
mv /tmp/shaka-packager /usr/local/bin
chmod +x /usr/local/bin/shaka-packager
- name: install xsltproc
run: brew install libxslt
# podman does not start on the macos-14 runners, perhaps because they are running on M1
# processors that do not support nested virtualization.
# - name: install podman
# run: |
# brew install podman
# podman machine init
# podman machine start
- run: cargo test --jobs 1 -- --show-output
env:
DOCKER: "docker"
build-windows:
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: dtolnay/rust-toolchain@stable
# We need path-type of inherit to include important utility applications such as podman,
# mp4decrypt, shaka-packager, ffmpeg, xsltproc on the $PATH for our tests. To be more precise,
# we need in addition to the standard UCRT paths, /c/ProgramData/chocolatey/bin and
# /c/windows/system32.
# See https://github.com/msys2/setup-msys2
- uses: msys2/setup-msys2@v2
with:
msystem: UCRT64
update: true
install: base-devel autotools mingw-w64-ucrt-x86_64-toolchain mingw-w64-ucrt-x86_64-rust mingw-w64-ucrt-x86_64-gcc
path-type: inherit
- name: install protobuf compiler
run: choco install --yes --limit-output protoc
- name: install NASM for rustls-tls build
run: |
choco install --yes --limit-output nasm
echo "C:\Program Files\NASM" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
# The ffmpeg executable is installed at C:\ProgramData\chocolatey\lib\ffmpeg\tools\ffmpeg\bin\ffmpeg.exe
# A shim is created at C:\ProgramData\chocolatey\bin\ffmpeg.exe.
- name: install ffmpeg
run: |
choco install --yes --limit-output ffmpeg
echo "C:\ProgramData\chocolatey\bin" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
# Isn't this fun
- name: install Bento4/mp4decrypt
run: |
Invoke-WebRequest -Uri "https://www.bok.net/Bento4/binaries/Bento4-SDK-1-6-0-641.x86_64-microsoft-win32.zip" -OutFile bento4.zip
Expand-Archive -Path bento4.zip -DestinationPath .
Get-ChildItem
del bento4.zip
New-Item -ItemType Directory -Force -Path "C:\tools"
cp Bento4-SDK-1-6-0-641.x86_64-microsoft-win32/bin/mp4decrypt.exe "C:\tools\mp4decrypt.exe"
Remove-Item -LiteralPath "Bento4-SDK-1-6-0-641.x86_64-microsoft-win32" -Force -Recurse
echo "C:\tools" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
Get-ChildItem c:\tools
- name: Install shaka-packager
run: |
Invoke-WebRequest -Uri "https://github.com/shaka-project/shaka-packager/releases/latest/download/packager-win-x64.exe" -OutFile c:\tools\shaka-packager.exe
- name: install xsltproc
run: choco install --yes --limit-output xsltproc
# the ~/ here depends on Windows CI runners using Powershell. We create ~/.ssh to work around a
# podman bug (https://github.com/containers/podman/issues/24650)
- name: install podman
run: |
mkdir ~/.ssh
choco install --yes --limit-output podman-cli
podman machine init
podman machine start
- run: cargo build --jobs 1 --verbose
shell: msys2 {0}
- run: cargo test --jobs 1 -- --show-output
shell: msys2 {0}