-
Notifications
You must be signed in to change notification settings - Fork 26
122 lines (106 loc) · 3.49 KB
/
build.yaml
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
name: Build Packages
on:
push:
paths-ignore:
- screenshots
- README.md
- LICENSE
schedule:
- cron: '0 0 * * 6'
env:
IN_GITHUB_ACTION: TRUE
jobs:
build-in-ubuntu:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
distro: ['Pop!_OS', 'Ubuntu']
version: ['21.10', '22.04']
container: ubuntu:${{ matrix.version }}
name: ${{ matrix.distro }} ${{ matrix.version }}
env:
DEBIAN_FRONTEND: noninteractive
LANG: en_US.UTF-8
DEB_BUILD_OPTIONS: nocheck
steps:
- uses: actions/checkout@v3
- name: Setup enviroment
shell: bash
run: |
codename=$(. /etc/os-release; echo $VERSION_CODENAME)
if [[ '${{ matrix.distro }}' == 'Pop!_OS' ]]; then
echo '::group::Add Pop!_Os APT Repository'
apt update
apt install -y gnupg software-properties-common
apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 63C46DF0140D738961429F4E204DD8AEC33A7AFF
sed -i -e "1ideb http://apt.pop-os.org/release $codename main" /etc/apt/sources.list
sed -i -e "1ideb-src http://apt.pop-os.org/release $codename main" /etc/apt/sources.list
echo '::endgroup::'
fi
echo '::group::Install wget locales lsb-core'
apt update
apt install -y wget locales lsb-core
echo '::endgroup::'
echo '::group::Setup locale'
rm -rf /var/lib/apt/lists/*
localedef -i en_US -c -f UTF-8 -A /usr/share/locale/locale.alias en_US.UTF-8
echo '::endgroup::'
- name: Build packages
id: build
run: |
cd ./ubuntu
./package.sh
echo "::set-output name=pkgver::$(ls mutter-common*|cut -d '_' -f 2)"
- name: Upload Artifact
uses: actions/upload-artifact@v3
with:
name: "[${{ matrix.distro }} ${{ matrix.version }}][${{ steps.build.outputs.pkgver }}]"
path: |
ubuntu/mutter-common*.deb
ubuntu/libmutter-*-0*.deb
- name: Install packages
run: |
echo '::group::Upgrade system before install'
apt upgrade -y
echo '::endgroup::'
echo '::group::Install mutter'
dpkg -i ubuntu/*.deb
echo '::endgroup::'
build-in-fedora:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
version: ['35', '36']
container: fedora:${{ matrix.version }}
name: Fedora ${{ matrix.version }}
steps:
- uses: actions/checkout@v3
- name: Setup enviroment
run: |
echo '::group::Install wget dnf-command(download)'
dnf -y update
dnf -y install 'dnf-command(download)' wget
echo '::endgroup::'
- name: Build packages
id: build
run: |
./fedora/package.sh
cd ~/rpmbuild/RPMS/x86_64/
echo "::set-output name=pkgver::$(ls mutter-[0-9]*)"
- name: Upload Artifact
uses: actions/upload-artifact@v3
with:
name: "[Fedora ${{ matrix.version }}][${{ steps.build.outputs.pkgver }}]"
path: |
~/rpmbuild/RPMS/x86_64/mutter-[0-9]*
- name: Install packages
run: |
echo '::group::Install original packages'
cd ~/rpmbuild/RPMS/x86_64/
dnf -y install mutter
echo '::endgroup::'
echo '::group::Install patched packages'
rpm --reinstall mutter-*
echo '::endgroup::'