forked from imperviousinc/fingertip
-
Notifications
You must be signed in to change notification settings - Fork 0
99 lines (82 loc) · 3.07 KB
/
build-linux.yml
File metadata and controls
99 lines (82 loc) · 3.07 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
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
name: Build and Package - Linux
on: [push, pull_request]
jobs:
build-hnsd:
runs-on: ubuntu-18.04
steps:
- name: Checkout hnsd repository
uses: actions/checkout@v2
with:
repository: 'handshake-org/hnsd'
- name: Install dependencies
run: sudo apt install -y libunbound-dev
- name: Build hnsd
run: |
./autogen.sh && ./configure && make
ls -l
- name: Store hnsd binary
uses: actions/upload-artifact@v2
with:
name: hnsd-bin
path: ./hnsd
build-fingertip:
needs: build-hnsd
runs-on: ubuntu-18.04
steps:
- name: Install go
uses: actions/setup-go@v1
with:
go-version: '1.17'
- name: Checkout repository
uses: actions/checkout@v2
- name: Install dependencies
run: sudo apt install -y libgtk-3-dev libappindicator3-dev libunbound-dev
- name: Cache go modules
uses: actions/cache@v2
with:
path: |
~/.cache/go-build
~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-
- name: Build fingertip
run: |
go build -trimpath -o ./builds/linux/appdir/usr/bin
ls -l builds/linux/appdir/usr/bin/
- name: Store fingertip binary
uses: actions/upload-artifact@v2
with:
name: fingertip-bin
path: ./builds/linux/appdir/usr/bin/fingertip
- name: Download hnsd binary
uses: actions/download-artifact@v2
with:
name: hnsd-bin
path: builds/linux/appdir/usr/bin
- name: Package as AppImage
working-directory: ./builds/linux
run: |
ls -l appdir/usr/bin/
chmod +x appdir/usr/bin/hnsd
wget -c -nv "https://github.com/linuxdeploy/linuxdeploy/releases/download/continuous/linuxdeploy-x86_64.AppImage"
chmod +x linuxdeploy-x86_64.AppImage
./linuxdeploy-x86_64.AppImage --appdir appdir --output appimage
# https://bbs.archlinux.org/viewtopic.php?pid=1994258#p1994258
# Most systems don't have the latest glib and we require (2.69.1+),
# so we extract the AppImage, copy glib into it, then replace the AppImage
- name: Patch AppImage to include glib
working-directory: ./builds/linux
run: |
wget -c -nv "https://github.com/AppImage/AppImageKit/releases/download/continuous/appimagetool-x86_64.AppImage"
chmod +x appimagetool-x86_64.AppImage
OUTPUT=$(ls Fingertip-*.AppImage)
./$OUTPUT --appimage-extract
wget -c -nv "https://archive.archlinux.org/packages/g/glib2/glib2-2.70.2-1-x86_64.pkg.tar.zst"
tar xvf glib2-2.70.2-1-x86_64.pkg.tar.zst -C squashfs-root --use-compress-program=unzstd
./appimagetool-x86_64.AppImage squashfs-root $OUTPUT
- name: Store fingertip AppImage
uses: actions/upload-artifact@v2
with:
name: fingertip-appimage
path: ./builds/linux/Fingertip*.AppImage