Repository navigation
73 lines (61 loc) · 2.04 KB
/
Copy pathci.test.yml
File metadata and controls
73 lines (61 loc) · 2.04 KB
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
name: Test
on:
push:
branches: [ 'main' ]
pull_request:
branches: [ 'main' ]
workflow_dispatch:
permissions:
contents: read
jobs:
test:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
ruby-version: ['3.2', '3.3', '3.4']
# 'system' = the ffmpeg package from the runner's Ubuntu (apt)
ffmpeg-version: ['system', 'release', '6.0.1', '5.1.1', '4.4.1']
include:
- ffmpeg-version: 'release'
ffmpeg-download-path: 'releases'
steps:
- uses: actions/checkout@v7
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby-version }}
bundler-cache: true
rubygems: latest
- name: Install FFMPEG from apt
if: matrix.ffmpeg-version == 'system'
run: |
sudo apt-get update
sudo apt-get install -y --no-install-recommends ffmpeg
- name: Cache FFMPEG Package
if: matrix.ffmpeg-version != 'system'
id: cache-ffmpeg
uses: actions/cache@v6
with:
path: /tmp/ffmpeg.tar.xz
key: ffmpeg-${{ matrix.ffmpeg-version }}-${{ runner.os }}.tar.xz
- name: Download FFMPEG Package
if: matrix.ffmpeg-version != 'system' && steps.cache-ffmpeg.outputs.cache-hit != 'true'
working-directory: /tmp
run: |
wget -O ffmpeg.tar.xz https://johnvansickle.com/ffmpeg/${{ matrix.ffmpeg-download-path || 'old-releases' }}/ffmpeg-${{ matrix.ffmpeg-version }}-amd64-static.tar.xz
- name: Install FFMPEG from static build
if: matrix.ffmpeg-version != 'system'
working-directory: /tmp
run: |
mkdir ffmpeg
tar -xf ffmpeg.tar.xz --strip=1 -C ffmpeg
sudo mv ffmpeg/ffmpeg /usr/local/bin/ffmpeg
sudo mv ffmpeg/ffprobe /usr/local/bin/ffprobe
rm -rf ffmpeg
- name: Show FFMPEG version
run: |
ffmpeg -version | head -1
ffprobe -version | head -1
- name: Run RSpec
run: bundle exec rspec