-
Notifications
You must be signed in to change notification settings - Fork 4
102 lines (95 loc) · 3.04 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
name: CI
on: push
jobs:
lint:
runs-on: ubuntu-latest
name: lint / ubuntu-latest / OTP ${{matrix.otp}} / Elixir ${{matrix.elixir}}
strategy:
matrix:
otp: ['25']
elixir: ['1.14']
steps:
- uses: actions/checkout@v2
- uses: erlef/setup-beam@v1
with:
otp-version: ${{matrix.otp}}
elixir-version: ${{matrix.elixir}}
- run: sudo apt install libavcodec-dev libavformat-dev libavutil-dev libswscale-dev libavdevice-dev
- name: Cache dialyzer artifacts
uses: actions/cache@v4
with:
path: _dialyzer
key: ${{ runner.os }}-dialyzer-${{ hashFiles('**/mix.lock') }}
restore-keys: |
${{ runner.os }}-dialyzer-
- run: mix deps.get
- run: mix credo
- run: mix format --check-formatted
- run: mix dialyzer
- run: mix docs 2>&1 | (! grep -q "warning:")
test-linux:
runs-on: ubuntu-22.04
name: test-linux-x86-64 / ubuntu-22.04 / OTP ${{matrix.otp}} / Elixir ${{matrix.elixir}}
strategy:
matrix:
otp: ['25']
elixir: ['1.14']
env:
MIX_ENV: test
steps:
- uses: actions/checkout@v2
- uses: erlef/setup-beam@v1
with:
otp-version: ${{matrix.otp}}
elixir-version: ${{matrix.elixir}}
- run: sudo apt install libavcodec-dev libavformat-dev libavutil-dev libswscale-dev libavdevice-dev
- run: mix deps.get
- run: mix test
test-linux-coverage:
runs-on: ubuntu-24.04
name: test-linux-x86-64 / ubuntu-24.04 / OTP ${{matrix.otp}} / Elixir ${{matrix.elixir}}
strategy:
matrix:
otp: ['25']
elixir: ['1.14']
env:
MIX_ENV: test
steps:
- uses: actions/checkout@v2
- uses: erlef/setup-beam@v1
with:
otp-version: ${{matrix.otp}}
elixir-version: ${{matrix.elixir}}
- run: sudo apt install libavcodec-dev libavformat-dev libavutil-dev libswscale-dev libavdevice-dev
- run: mix deps.get
- run: mix coveralls.json
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v4.0.1
with:
token: ${{ secrets.CODECOV_TOKEN }}
test-macos:
runs-on: macos-13
name: test-macos-x86-64 / macos-13 / OTP latest / Elixir latest
env:
MIX_ENV: test
# MacOS runners seem to have static IP addresses
# which results in GitHub rate limiting our requests
# for downloading prebuilt XLA binaries.
# Adding token seems to help.
XLA_HTTP_HEADERS: "Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}"
steps:
- uses: actions/checkout@v2
- run: brew install ffmpeg elixir
- run: mix deps.get
- run: mix test
test-macos-arm:
runs-on: macos-14
name: test-macos-arm / macos-14 / OTP latest / Elixir latest
env:
MIX_ENV: test
XLA_HTTP_HEADERS: "Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}"
steps:
- uses: actions/checkout@v2
- run: brew install ffmpeg elixir
- run: mix deps.get
- run: mix test