forked from 8xFF/atm0s-media-server
-
Notifications
You must be signed in to change notification settings - Fork 0
129 lines (123 loc) · 3.92 KB
/
rust.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
name: Rust
on:
push:
branches: [ "master" ]
pull_request:
branches: [ "master" ]
env:
CARGO_TERM_COLOR: always
jobs:
cross-platform-test:
strategy:
matrix:
build:
- linux gnu x64
# - linux musl x64
- linux gnu aarch64
# - linux musl aarch64
# - linux gnueabihf arm
# - linux gnueabihf armv7
# - linux gnu mips
- linux gnuabi64 mips64
- linux gnuabi64 mips64el
# - linux gnu mipsel
- macos x64
- macos aarch64
include:
- build: linux gnu x64
os: ubuntu-latest
rust: stable
target: x86_64-unknown-linux-gnu
# - build: linux musl x64
# os: ubuntu-latest
# rust: stable
# target: x86_64-unknown-linux-musl
- build: linux gnu aarch64
os: ubuntu-latest
rust: stable
target: aarch64-unknown-linux-gnu
# - build: linux gnueabihf arm
# os: ubuntu-latest
# rust: stable
# target: arm-unknown-linux-gnueabihf
# - build: linux gnueabihf armv7
# os: ubuntu-latest
# rust: stable
# target: armv7-unknown-linux-gnueabihf
# - build: linux gnu mips
# os: ubuntu-latest
# rust: 1.71.1
# target: mips-unknown-linux-gnu
- build: linux gnuabi64 mips64
os: ubuntu-latest
rust: 1.71.1
target: mips64-unknown-linux-gnuabi64
- build: linux gnuabi64 mips64el
os: ubuntu-latest
rust: 1.71.1
target: mips64el-unknown-linux-gnuabi64
# - build: linux gnu mipsel
# os: ubuntu-latest
# rust: 1.71.1
# target: mipsel-unknown-linux-gnu
# - build: linux musl aarch64
# os: ubuntu-latest
# rust: stable
# target: aarch64-unknown-linux-musl
- build: macos x64
os: macos-latest
rust: stable
target: x86_64-apple-darwin
- build: macos aarch64
os: macos-latest
rust: stable
target: aarch64-apple-darwin
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- name: Install Rust
uses: actions-rs/toolchain@v1
with:
toolchain: ${{ matrix.rust }}
profile: minimal
override: true
target: ${{ matrix.target }}
- name: Install dev-tools
if: matrix.os == 'ubuntu-latest'
run: sudo apt-get install -y --no-install-recommends pkg-config musl-dev musl-tools
- name: Install deps (ubuntu)
if: matrix.os == 'ubuntu-latest'
run: sudo apt-get install -y --no-install-recommends libssl-dev libsoxr-dev libopus-dev
- name: Install deps (macos)
if: matrix.os == 'macos-latest'
run: |
brew update
brew install libsoxr
- name: Test
uses: actions-rs/cargo@v1
with:
use-cross: true
command: test
args: --verbose --all-features --workspace --target ${{ matrix.target }}
code-coverage:
runs-on: ubuntu-latest
env:
CARGO_TERM_COLOR: always
steps:
- uses: actions/checkout@v4
- name: Install deps
run: |
sudo apt-get update
sudo apt install -y libsoxr-dev libopus-dev
- name: Install Rust
run: rustup update stable
- name: Install cargo-llvm-cov
uses: taiki-e/install-action@cargo-llvm-cov
- name: Generate code coverage
run: cargo llvm-cov --all-features --workspace --lcov --output-path lcov.info
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3
with:
token: ${{ secrets.CODECOV_TOKEN }} # not required for public repos
files: lcov.info
fail_ci_if_error: true