-
Notifications
You must be signed in to change notification settings - Fork 21
102 lines (80 loc) · 2.63 KB
/
dav1d.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
name: dav1d
on: [push, pull_request]
jobs:
linux-tests:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
- name: Install nasm
uses: ilammy/setup-nasm@v1
- name: Install Rust stable
uses: dtolnay/rust-toolchain@stable
with:
toolchain: stable
- name: Install Python 3.9
uses: actions/setup-python@v4
with:
python-version: '3.9'
- name: Install pip packages
run: |
pip install -U pip
pip install -U wheel setuptools
pip install -U meson ninja
- name: Build dav1d
env:
DAV1D_DIR: dav1d_dir
LIB_PATH: lib/x86_64-linux-gnu
run: |
git clone --branch 1.5.0 --depth 1 https://code.videolan.org/videolan/dav1d.git
cd dav1d
meson build -Dprefix=$HOME/$DAV1D_DIR -Denable_tools=false -Denable_examples=false --buildtype release
ninja -C build
ninja -C build install
echo "PKG_CONFIG_PATH=$HOME/$DAV1D_DIR/$LIB_PATH/pkgconfig" >> $GITHUB_ENV
echo "LD_LIBRARY_PATH=$HOME/$DAV1D_DIR/$LIB_PATH" >> $GITHUB_ENV
- name: Run tests
run: |
cargo test --workspace --all-features
windows-tests-msvc:
runs-on: windows-latest
steps:
- uses: actions/checkout@v3
- uses: ilammy/msvc-dev-cmd@v1
- name: Install nasm
uses: ilammy/setup-nasm@v1
- name: Install Rust stable MSVC
uses: dtolnay/rust-toolchain@stable
with:
toolchain: stable-x86_64-pc-windows-msvc
- name: Install Python 3.9
uses: actions/setup-python@v4
with:
python-version: '3.9'
- name: Install pip packages
run: |
pip install -U pip
pip install -U wheel setuptools
pip install -U meson ninja
- name: Setting up environment
shell: bash
run: |
echo "PKG_CONFIG=c:\build\bin\pkg-config.exe" >> $GITHUB_ENV
echo "PKG_CONFIG_PATH=C:\build\lib\pkgconfig" >> $GITHUB_ENV
echo "C:\build\bin" >> $GITHUB_PATH
- name: Build pkg-config
run: |
git clone --branch meson-glib-subproject --depth 1 https://gitlab.freedesktop.org/tpm/pkg-config.git
cd pkg-config
meson build -Dprefix=C:\build --buildtype release
ninja -C build
ninja -C build install
- name: Build dav1d
run: |
git clone --branch 1.5.0 --depth 1 https://code.videolan.org/videolan/dav1d.git
cd dav1d
meson build -Dprefix=C:\build -Denable_tools=false -Denable_examples=false --buildtype release
ninja -C build
ninja -C build install
- name: Run tests
run: |
cargo test --workspace --all-features