-
Notifications
You must be signed in to change notification settings - Fork 2
87 lines (75 loc) · 2.24 KB
/
test.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
on: [ push, pull_request ]
name: Run opus tests
jobs:
test-basic:
runs-on: ${{ matrix.os }}
strategy:
matrix:
# TODO: test 32-bit targets
# TODO: test aarch64 targets
os:
- ubuntu-latest
- macos-13 # x86
- macos-14 # arm64
- windows-latest
profile: [ release, dev ]
fail-fast: false
steps:
- uses: actions/checkout@v2
- name: Install toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true
profile: minimal
- name: Execute tests
uses: actions-rs/cargo@v1
with:
command: test
args: --all --profile=${{ matrix.profile }} -- --nocapture
test-vectors:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os:
- ubuntu-latest
- macos-13 # x86
- macos-14 # arm64
- windows-latest
fail-fast: false
steps:
- uses: actions/checkout@v2
- name: Install Rust toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true
profile: minimal
- name: Setup clang
# macOS has clang already
if: runner.os != 'macos'
uses: aminya/setup-cpp@v1
with:
compiler: llvm
- name: Build (release)
uses: actions-rs/cargo@v1
with:
command: build
args: --release
- name: Download test vectors from IETF site
run: |
curl https://www.ietf.org/proceedings/98/slides/materials-98-codec-opus-newvectors-00.tar.gz -o materials-98-codec-opus-newvectors-00.tar.gz
tar -xzf materials-98-codec-opus-newvectors-00.tar.gz
# the vectors are now extracted to opus_newvectors
- name: Run test vectors
uses: actions-rs/cargo@v1
with:
command: run
args: --release -p unsafe-libopus-tools --bin run_vectors2 -- opus_newvectors
# TODO: upload a dump? 800M feels a bit too much for gha though..
# - name: Upload logs
# if: always() # always upload logs, even if the test fails
# uses: actions/upload-artifact@v3
# with:
# name: test-logs
# path: logs_*.txt