forked from mpv-player/mpv
-
Notifications
You must be signed in to change notification settings - Fork 1
88 lines (75 loc) 路 2.42 KB
/
build-on-ubuntu.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
name: Build ubuntu packages
env:
version: '0.35.1'
branch: 'mod-0.35.1'
on:
workflow_dispatch:
release:
types: [published]
jobs:
build:
strategy:
fail-fast: false
matrix:
config:
- { name: 'xenial', os: 'ubuntu-latest', container: 'wachii/ubuntu-qt:16.04' }
#- { name: 'bionic', os: 'ubuntu-18.04', container: '' }
- { name: 'focal', os: 'ubuntu-20.04', container: '' }
runs-on: ${{ matrix.config.os }}
container: ${{ matrix.config.container }}
steps:
- name: Checkout
uses: actions/checkout@v2
with:
path: 'mpv'
ref: ${{ env.branch }}
- name: Install debian dir
run: |
git clone https://github.com/smplayer-dev/mpv-deb-packages.git deb
mv deb/debian mpv/debian
- name: Add ffmpeg repository
if: ${{ matrix.config.name == 'xenial' || matrix.config.name == 'bionic' }}
run: sudo add-apt-repository -y ppa:jonathonf/ffmpeg-4
- name: Install devscripts
run: |
sudo apt-get -y update
sudo apt-get -y install devscripts equivs
#sudo apt-get -y upgrade
- name: Install build dependencies
run: |
cd mpv
dch -b -v ${{ env.version }}-1~`lsb_release -cs` "Automatic build"
mk-build-deps
ls *.deb
dpkg --info ./mpv-build-deps*.deb
sudo apt-get -y install ./mpv-build-deps*.deb --no-install-recommends
- name: Prepare sources
run: |
#mkdir mpv/debian
#cp -R debian/* mpv/debian
cd mpv
./bootstrap.py
- name: Build
run: |
cd mpv
fakeroot debian/rules build
fakeroot debian/rules binary
ls -l ../*.deb
- name: Rename package
run: |
sudo apt-get -y install rename
rename 's/mpv_/mpv-mod_/' mpv_*.deb
- name: Create artifact
uses: actions/upload-artifact@v2
with:
name: mpv-${{ env.version }}-${{ matrix.config.name }}
path: ./*.deb
- name: Upload package to release
if: github.event_name == 'release'
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: ./*.deb
tag: ${{ github.ref }}
overwrite: true
file_glob: true