Skip to content

Commit cda429d

Browse files
committed
Add Github Actions
1 parent b3d0c06 commit cda429d

File tree

5 files changed

+242
-102
lines changed

5 files changed

+242
-102
lines changed

.github/workflows/rav1e.yml

Lines changed: 241 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,241 @@
1+
name: rav1e
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
pull_request:
8+
branches:
9+
- master
10+
11+
jobs:
12+
rustfmt-clippy:
13+
14+
runs-on: ubuntu-latest
15+
16+
steps:
17+
- uses: actions/checkout@v1
18+
- name: Install nasm
19+
run: |
20+
sudo apt-get install nasm
21+
- name: Install stable
22+
uses: actions-rs/toolchain@v1
23+
with:
24+
profile: minimal
25+
toolchain: stable
26+
override: true
27+
components: clippy, rustfmt
28+
- name: Run rustfmt
29+
uses: actions-rs/cargo@v1
30+
with:
31+
command: fmt
32+
args: -- --check --verbose
33+
- name: Run clippy
34+
uses: actions-rs/clippy-check@v1
35+
with:
36+
token: ${{ secrets.GITHUB_TOKEN }}
37+
args: -- -D warnings --verbose -A clippy::wrong-self-convention
38+
39+
build-unix:
40+
41+
strategy:
42+
matrix:
43+
conf:
44+
- 1.36.0-tests
45+
- aom-tests
46+
- dav1d-tests
47+
- grcov-coveralls
48+
- bench
49+
- doc
50+
- check-no-default
51+
- check-extra-feats
52+
include:
53+
- conf: 1.36.0-tests
54+
toolchain: 1.36.0
55+
- conf: aom-tests
56+
toolchain: stable
57+
- conf: dav1d-tests
58+
toolchain: stable
59+
- conf: grcov-coveralls
60+
toolchain: nightly
61+
- conf: bench
62+
toolchain: stable
63+
- conf: doc
64+
toolchain: stable
65+
- conf: check-no-default
66+
toolchain: stable
67+
- conf: check-extra-feats
68+
toolchain: stable
69+
70+
env:
71+
RUST_BACKTRACE: 1
72+
DAV1D_DIR: dav1d-dir
73+
AOM_DIR: aom-dir
74+
75+
runs-on: ubuntu-latest
76+
77+
steps:
78+
- uses: actions/checkout@v1
79+
- name: Install deps
80+
run: |
81+
sudo apt-get install libsdl2-dev libvulkan-dev libcurl4-openssl-dev \
82+
zlib1g-dev libdw-dev libiberty-dev
83+
- name: Install nasm
84+
run: |
85+
sudo apt-get install nasm
86+
- name: Install Python3 packages
87+
if: >
88+
matrix.conf == '1.36.0-tests' || matrix.conf == 'dav1d-tests' ||
89+
matrix.conf == 'grcov-coveralls'
90+
run: |
91+
sudo apt-get install python3-setuptools python3-wheel
92+
- name: Install meson
93+
if: >
94+
matrix.conf == '1.36.0-tests' || matrix.conf == 'dav1d-tests' ||
95+
matrix.conf == 'grcov-coveralls'
96+
run: |
97+
sudo pip3 install meson
98+
- name: Install ninja
99+
if: >
100+
matrix.conf == '1.36.0-tests' || matrix.conf == 'dav1d-tests' ||
101+
matrix.conf == 'aom-tests' || matrix.conf == 'grcov-coveralls'
102+
run: |
103+
sudo pip3 install ninja
104+
- name: Install aom
105+
if: >
106+
matrix.conf == '1.36.0-tests' || matrix.conf == 'aom-tests' ||
107+
matrix.conf == 'grcov-coveralls'
108+
env:
109+
LINK: https://aomedia.googlesource.com/aom
110+
AOM_VERSION: 1.0.0-errata1
111+
run: |
112+
git clone --depth 1 -b "v$AOM_VERSION" $LINK "aom-$AOM_VERSION"
113+
cd aom-$AOM_VERSION
114+
rm -rf CMakeCache.txt CMakeFiles
115+
mkdir -p build
116+
cd build
117+
cmake -GNinja .. \
118+
-DCMAKE_INSTALL_PREFIX=$HOME/$AOM_DIR \
119+
-DCMAKE_BUILD_TYPE=Release \
120+
-DENABLE_TESTS=0 \
121+
-DENABLE_DOCS=0 \
122+
-DCONFIG_LOWBITDEPTH=1 \
123+
-DCONFIG_PIC=1
124+
ninja
125+
ninja install
126+
- name: Install dav1d
127+
if: >
128+
matrix.conf == '1.36.0-tests' || matrix.conf == 'dav1d-tests' ||
129+
matrix.conf == 'grcov-coveralls'
130+
env:
131+
LINK: https://code.videolan.org/videolan/dav1d/-/archive/
132+
DAV1D_VERSION: 0.4.0
133+
run: |
134+
curl -L "$LINK/$DAV1D_VERSION/dav1d-$DAV1D_VERSION.tar.gz" | tar xz
135+
cd dav1d-$DAV1D_VERSION
136+
meson build --buildtype release -Dprefix=$HOME/$DAV1D_DIR
137+
ninja -C build install
138+
- name: Install stable
139+
uses: actions-rs/toolchain@v1
140+
with:
141+
profile: minimal
142+
toolchain: ${{ matrix.toolchain }}
143+
override: true
144+
- name: Run 1.36.0 tests
145+
if: matrix.toolchain == '1.36.0' && matrix.conf == '1.36.0-tests'
146+
run: |
147+
DAV1D="$HOME/$DAV1D_DIR/lib/x86_64-linux-gnu"
148+
export PKG_CONFIG_PATH=$HOME/$AOM_DIR/lib/pkgconfig:$DAV1D/pkgconfig
149+
export LD_LIBRARY_PATH=$HOME/$AOM_DIR/lib:$DAV1D
150+
cargo test --verbose \
151+
--features=decode_test,decode_test_dav1d,quick_test,capi
152+
- name: Run aom tests
153+
if: matrix.toolchain == 'stable' && matrix.conf == 'aom-tests'
154+
run: |
155+
export PKG_CONFIG_PATH=$HOME/$AOM_DIR/lib/pkgconfig
156+
export LD_LIBRARY_PATH=$HOME/$AOM_DIR/lib
157+
cargo test --verbose --release \
158+
--features=decode_test \
159+
--color=always -- --color=always --ignored
160+
- name: Run dav1d tests
161+
if: matrix.toolchain == 'stable' && matrix.conf == 'dav1d-tests'
162+
run: |
163+
export PKG_CONFIG_PATH=$HOME/$DAV1D_DIR/lib/x86_64-linux-gnu/pkgconfig
164+
export LD_LIBRARY_PATH=$HOME/$DAV1D_DIR/lib/x86_64-linux-gnu
165+
cargo test --verbose --release \
166+
--features=decode_test_dav1d \
167+
--color=always -- --color=always --ignored
168+
- name: Run bench
169+
if: matrix.toolchain == 'stable' && matrix.conf == 'bench'
170+
run: |
171+
cargo bench --features=bench --no-run --verbose
172+
- name: Run doc
173+
if: matrix.toolchain == 'stable' && matrix.conf == 'doc'
174+
run: |
175+
cargo doc --verbose --no-deps
176+
- name: Check no default features
177+
if: matrix.toolchain == 'stable' && matrix.conf == 'check-no-default'
178+
run: |
179+
cargo check --no-default-features
180+
- name: Check extra features
181+
if: matrix.toolchain == 'stable' && matrix.conf == 'check-extra-feats'
182+
run: |
183+
cargo check --features=capi,dump_lookahead_data
184+
- name: Run cargo clean
185+
if: matrix.conf == 'grcov-coveralls'
186+
uses: actions-rs/cargo@v1
187+
with:
188+
command: clean
189+
- name: Run tests
190+
if: matrix.conf == 'grcov-coveralls'
191+
env:
192+
CARGO_INCREMENTAL: '0'
193+
RUSTFLAGS: >
194+
-Zprofile -Ccodegen-units=1 -Clink-dead-code -Coverflow-checks=off
195+
-Zno-landing-pads
196+
run: |
197+
DAV1D="$HOME/$DAV1D_DIR/lib/x86_64-linux-gnu"
198+
export PKG_CONFIG_PATH=$HOME/$AOM_DIR/lib/pkgconfig:$DAV1D/pkgconfig
199+
export LD_LIBRARY_PATH=$HOME/$AOM_DIR/lib:$DAV1D
200+
cargo test --features=decode_test,decode_test_dav1d,quick_test --verbose
201+
- name: Run grcov
202+
if: matrix.conf == 'grcov-coveralls'
203+
id: coverage
204+
uses: actions-rs/[email protected]
205+
- name: Coveralls upload
206+
if: matrix.conf == 'grcov-coveralls'
207+
uses: coverallsapp/github-action@master
208+
with:
209+
github-token: ${{ secrets.GITHUB_TOKEN }}
210+
path-to-lcov: ${{ steps.coverage.outputs.report }}
211+
212+
build-windows:
213+
214+
env:
215+
RUST_BACKTRACE: 1
216+
VS_PATH: C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise
217+
COMPILER_SUBPATH: VC\Tools\MSVC\14.23.28105\bin\Hostx64\x64
218+
219+
runs-on: windows-latest
220+
221+
steps:
222+
- uses: actions/checkout@v1
223+
- name: Install nasm
224+
run: |
225+
$NASM_VERSION="nasm-2.14.02"
226+
curl -LO "https://people.xiph.org/~tdaede/$NASM_VERSION-win64.zip"
227+
7z e -y "$NASM_VERSION-win64.zip" -o"C:\nasm"
228+
- name: Install Rust
229+
uses: actions-rs/toolchain@v1
230+
with:
231+
profile: minimal
232+
toolchain: stable
233+
override: true
234+
- name: Build
235+
run: |
236+
$Env:Path += ";$Env:VS_PATH\$Env:COMPILER_SUBPATH;C:\nasm;"
237+
cargo build --release
238+
- name: Test
239+
run: |
240+
$Env:Path += ";$Env:VS_PATH\$Env:COMPILER_SUBPATH;C:\nasm;"
241+
cargo test --verbose

.travis.yml

Lines changed: 0 additions & 70 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,6 @@ before_install:
3232
- export SCCACHE_CACHE_SIZE=500M
3333
- export SCCACHE_DIR="$TRAVIS_HOME/.cache/sccache"
3434
- bash "$TRAVIS_BUILD_DIR/.travis/install-nasm.sh"
35-
- bash "$TRAVIS_BUILD_DIR/.travis/install-kcov.sh"
3635
- bash "$TRAVIS_BUILD_DIR/.travis/install-aom.sh"
3736
- aomenc --help | grep "AV1 Encoder"
3837
- bash "$TRAVIS_BUILD_DIR/.travis/install-dav1d.sh"
@@ -48,77 +47,8 @@ after_script:
4847

4948
jobs:
5049
include:
51-
- name: "Code Formatting"
52-
rust: stable
53-
script:
54-
- rustup component add rustfmt
55-
- cargo fmt -- --check
56-
env:
57-
- CACHE_NAME=RUSTFMT
58-
- name: "Build & Coveralls"
59-
rust: stable
60-
script:
61-
- which cargo-kcov || cargo install cargo-kcov
62-
# We need to run cargo clean to avoid caching issues
63-
- cargo clean
64-
- RUSTFLAGS="-C link-dead-code" cargo build --features=decode_test,decode_test_dav1d,quick_test --tests --verbose
65-
- cargo kcov -v --coveralls --no-clean-rebuild -- --verify --exclude-pattern="$HOME/.cargo,aom_build,.h,test"
66-
env:
67-
- CACHE_NAME=COVERALLS
68-
- name: "Minimum Supported Rustc"
69-
# This should reference the earliest supported rustc version
70-
# and should match the version number in build.rs
71-
rust: 1.36.0
72-
script:
73-
- cargo test --features=decode_test,decode_test_dav1d,quick_test,capi --verbose
74-
env:
75-
- CACHE_NAME=MIN_RUSTC
7650
- name: "Arm build and test"
7751
rust: stable
7852
arch: arm64
7953
script:
8054
- cargo test --features=decode_test,decode_test_dav1d,quick_test,capi --verbose
81-
- name: "Ignored Tests (aom)"
82-
rust: stable
83-
script:
84-
- travis_wait 60 cargo test --release --features=decode_test --verbose --color=always -- --color=always --ignored
85-
env:
86-
- CACHE_NAME=IGNORED_TESTS_AOM
87-
branches:
88-
only:
89-
- master
90-
- name: "Ignored Tests (dav1d)"
91-
rust: stable
92-
script:
93-
- travis_wait 60 cargo test --release --features=decode_test_dav1d --verbose --color=always -- --color=always --ignored
94-
env:
95-
- CACHE_NAME=IGNORED_TESTS_DAV1D
96-
branches:
97-
only:
98-
- master
99-
- name: "Bench"
100-
rust: stable
101-
script: cargo bench --features=bench --no-run --verbose
102-
env:
103-
- CACHE_NAME=BENCH
104-
- name: "Doc & Clippy (linter): verifying code quality"
105-
rust: stable
106-
script:
107-
- cargo doc --verbose --no-deps
108-
- rustup component add clippy
109-
- cargo clippy --version
110-
- cargo clippy -- -D warnings --verbose -A clippy::wrong-self-convention
111-
env:
112-
- CACHE_NAME=CLIPPY
113-
- name: "No default features"
114-
rust: stable
115-
script:
116-
- cargo check --no-default-features
117-
env:
118-
- CACHE_NAME=CHECK
119-
- name: "Extra features"
120-
rust: stable
121-
script:
122-
- cargo check --features=capi,dump_lookahead_data
123-
env:
124-
- CACHE_NAME=CHECK_EXTRA_FEATURES

.travis/install-kcov.sh

Lines changed: 0 additions & 15 deletions
This file was deleted.

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# rav1e [![Travis Build Status](https://travis-ci.org/xiph/rav1e.svg?branch=master)](https://travis-ci.org/xiph/rav1e) [![AppVeyor Build Status](https://ci.appveyor.com/api/projects/status/github/xiph/rav1e?branch=master&svg=true)](https://ci.appveyor.com/project/tdaede/rav1e/history) [![Coverage Status](https://coveralls.io/repos/github/xiph/rav1e/badge.svg?branch=master)](https://coveralls.io/github/xiph/rav1e?branch=master)
1+
# rav1e [![Travis Build Status](https://travis-ci.org/xiph/rav1e.svg?branch=master)](https://travis-ci.org/xiph/rav1e) [![AppVeyor Build Status](https://ci.appveyor.com/api/projects/status/github/xiph/rav1e?branch=master&svg=true)](https://ci.appveyor.com/project/tdaede/rav1e/history) [![Actions Status](https://github.com/xiph/rav1e/workflows/rav1e/badge.svg)](https://github.com/xiph/rav1e/actions) [![Coverage Status](https://coveralls.io/repos/github/xiph/rav1e/badge.svg?branch=master)](https://coveralls.io/github/xiph/rav1e?branch=master)
22

33
The fastest and safest AV1 encoder.
44

appveyor.yml

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,6 @@ image: Visual Studio 2019
33
environment:
44
host: x86_64-pc-windows-msvc
55
matrix:
6-
- platform: x86_64
7-
target: x86_64-pc-windows-msvc
8-
channel: stable
96
- platform: arm64
107
target: aarch64-pc-windows-msvc
118
channel: nightly
@@ -41,16 +38,3 @@ build_script:
4138

4239
test_script:
4340
- cargo test --target=%target% --verbose
44-
45-
artifacts:
46-
- path: target\$(target)\release\rav1e.exe
47-
name: rav1e-$(platform)
48-
49-
deploy:
50-
- provider: GitHub
51-
artifact: target\$(target)\release\rav1e.exe
52-
auth_token:
53-
secure: 'LPBjNyFOg+vBkVR4w+89YVNhByaXBGNwtN6UwkFkWTfPow5oeCbFMtJavU9ZLs+c'
54-
prerelease: true
55-
on:
56-
appveyor_repo_tag: true

0 commit comments

Comments
 (0)