-
Notifications
You must be signed in to change notification settings - Fork 1
249 lines (191 loc) · 7.6 KB
/
makefile.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
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
name: Makefile CI (Test customfetch)
on:
push:
branches: [ "main", "test", "android" ]
pull_request:
branches: [ "main", "test", "android" ]
jobs:
build-deb:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v4
- name: create tmp directory
run: mkdir /tmp/customfetch-0.10.2.orig
- name: Install Packages
run: |
sudo add-apt-repository ppa:ubuntu-toolchain-r/test
sudo apt-get update
sudo apt-get upgrade -y
sudo apt-get install libwayland-dev g++-10 libgtk-3-dev pkg-config libgtkmm-3.0-dev libdconf-dev libglib2.0-dev libarchive-tools
sudo apt-get install binutils gettext lintian debhelper devscripts debmake autoconf automake autotools-dev dh-make fakeroot xutils pbuilder -y
- name: Clean
run: make clean
- name: Create deb
run: |
cp -r $GITHUB_WORKSPACE /tmp/customfetch-0.10.2.orig
cd /tmp/customfetch-0.10.2.orig/customfetch
mkdir -p Debian/Debhelper/Buildsystem/
wget https://github.com/Debian/debhelper/raw/master/lib/Debian/Debhelper/Buildsystem/makefile.pm -O Debian/Debhelper/Buildsystem/make.pm
sed -i "s#package Debian::Debhelper::Buildsystem::makefile#package Debian::Debhelper::Buildsystem::make#g" Debian/Debhelper/Buildsystem/make.pm
sed -i "s#DEBUG=0#DEBUG=0 CXX=x86_64-linux-gnu-g++-10#g" debian/rules
dpkg-buildpackage -us -uc
- name: Install test customfetch
run: |
cd /tmp/customfetch-0.10.2.orig
sudo dpkg -i customfetch_0.10.2-1_amd64.deb
customfetch --wrap-lines
- name: Upload to github artifacts
uses: actions/upload-artifact@v4
with:
if-no-files-found: error
name: customfetch_amd64
path: /tmp/customfetch-0.10.2.orig/customfetch_0.10.2-1_amd64.deb
build_ubuntu-20_04:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v4
- name: Install Packages
run: |
sudo add-apt-repository ppa:ubuntu-toolchain-r/test
sudo apt-get update && sudo apt upgrade -y
sudo apt-get install neofetch tree build-essential g++-10 libwayland-dev gettext libgtk-3-dev pkg-config libdconf-dev libglib2.0-dev libgtkmm-3.0-dev libarchive-tools -y
- name: Clean
run: make clean
- name: Compile and install
run: make DEBUG=1 GUI_MODE=0 CXX=x86_64-linux-gnu-g++-10 && sudo make install
- name: Test neofetch
run: neofetch
- name: Check system values
run: |
ls -l /sys/devices/virtual/dmi/id/ /sys/class/dmi/id/
grep -Eri "virtual" /sys/class/dmi/id/ || true
cat /sys/devices/virtual/dmi/id/board_name /sys/devices/virtual/dmi/id/board_vendor /sys/devices/virtual/dmi/id/board_version
tree /sys/devices/system/cpu/cpu0/
printf "/etc/os-release\n" && cat /etc/os-release
printf "getting 0x5353 hexcode\n" && grep -nri "5353" /sys/class/ || true
- name: Test customfetch
run: ./build/debug/customfetch --wrap-lines
- name: Upload to github artifacts
uses: actions/upload-artifact@v4
with:
if-no-files-found: error
name: customfetch
path: ./build/debug/customfetch
build_ubuntu-20_04-GUI:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v4
- name: Install Packages
run: |
sudo add-apt-repository ppa:ubuntu-toolchain-r/test
sudo apt-get update && sudo apt upgrade -y
sudo apt-get install neofetch tree build-essential g++-10 libwayland-dev gettext libgtk-3-dev pkg-config libdconf-dev libglib2.0-dev libgtkmm-3.0-dev -y
- name: Clean
run: make clean
- name: Compile and install
run: make DEBUG=1 GUI_MODE=1 CXX=x86_64-linux-gnu-g++-10 && sudo make install GUI_MODE=1
- name: Test neofetch
run: neofetch
- name: Test customfetch
run: ./build/debug/customfetch --wrap-lines
- name: Upload to github artifacts
uses: actions/upload-artifact@v4
with:
if-no-files-found: error
name: customfetch-gui
path: ./build/debug/customfetch
build_Arch-AUR:
runs-on: ubuntu-latest
container:
image: archlinux
steps:
- uses: actions/checkout@v4
- name: Install the packages
run: pacman -Syyu git sudo base-devel fakeroot pkgconf tree neofetch --noconfirm --needed
- name: Create a dedicated build user
run: |
useradd -m -s /bin/bash builduser
echo "builduser ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers
- name: get /etc/makepkg.conf
run: |
sed -i "s#purge debug lto#purge debug lto#" /etc/makepkg.conf
cat /etc/makepkg.conf
- name: Build and install using makepkg
run: |
git clone https://aur.archlinux.org/customfetch-git.git
chown -R builduser customfetch-git
cd customfetch-git
sudo -u builduser makepkg -si --noconfirm
#- name: Setup SSH session
# uses: mxschmitt/action-tmate@v3
- name: Test neofetch
run: neofetch
- name: Test customfetch
run: customfetch --wrap-lines
build_Arch:
runs-on: ubuntu-latest
container:
image: archlinux
steps:
- uses: actions/checkout@v4
- name: Install the packages
run: pacman -Syyu git sudo binutils gdb base-devel fakeroot pkgconf tree neofetch fastfetch --noconfirm --needed
- name: get /etc/sudoers
run: |
sed -i "s#root ALL=(ALL:ALL) ALL#root ALL=(ALL:ALL) NOPASSWD: ALL\nnobody ALL=(ALL:ALL) NOPASSWD: ALL#g" /etc/sudoers
cat /etc/sudoers
- name: get /etc/makepkg.conf
run: |
sed -i "s#purge debug lto#purge !debug lto#" /etc/makepkg.conf
cat /etc/makepkg.conf
- name: Clean
run: make clean
- name: Compile and install
run: make install DEBUG=1 VENDOR_TEST=1 GUI_MODE=0
- name: Test neofetch
run: neofetch
- name: Test fastfetch
run: fastfetch
- name: Check system values
run: |
ls -l /sys/devices/virtual/dmi/id/ /sys/class/dmi/id/
grep -Eri "virtual" /sys/class/dmi/id/ || true
cat /sys/devices/virtual/dmi/id/board_name /sys/devices/virtual/dmi/id/board_vendor /sys/devices/virtual/dmi/id/board_version
tree /sys/devices/system/cpu/cpu0/
printf "/etc/os-release\n" && cat /etc/os-release
- name: Test customfetch
run: ./build/debug/customfetch --wrap-lines
build-android-app:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up JDK 17
uses: actions/setup-java@v4
with:
java-version: '17'
distribution: 'temurin'
cache: gradle
- name: Grant execute permission for gradlew
run: chmod +x android/gradlew
- name: Build with Gradle
run: make distclean && make android_app
- name: Check files
run: tree android/app/build/outputs/apk
- name: Upload to github artifacts
uses: actions/upload-artifact@v4
with:
if-no-files-found: error
name: customfetch-android-app
path: android/app/build/outputs/apk/debug/app-debug.apk
test-all-ascii-art:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install Packages
run: sudo apt-get update && sudo apt-get install build-essential gettext tree pkg-config -y
- name: Clean
run: make clean
- name: Compile and install
run: sudo make install DEBUG=0 VENDOR_TEST=0 GUI_MODE=0
- name: Test all the ascii art logos
run: for f in assets/ascii/*; do printf "\e[31m%s\e[0m\n" "$f" && customfetch --wrap-lines --source "$f" -D assets && sleep 1; done