-
Notifications
You must be signed in to change notification settings - Fork 2
73 lines (71 loc) · 2.37 KB
/
annie-gtk.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
name: annie-gtk builder (CI)
on:
push:
branches:
- master
workflow_dispatch:
jobs:
linux:
runs-on: ubuntu-latest
steps:
- name: Checkout repo
uses: actions/checkout@v2
- name: Setup go
uses: actions/setup-go@v2
with:
go-version: "1.17.5"
- name: Setup GTK environment
run: |
sudo apt-get update
sudo apt install -y git meson build-essential libgtk-3-dev gettext
- name: Build annie-gtk
run: |
go mod tidy
go build -o build/annie-gtk
- name: Copy files to build path
run: |
echo "Copying logo..."
cp -v logo.png build/logo.png
echo "Copying README..."
cp -v README.md build/README.md
echo "Copying i18n files..."
bash scripts/generate-mos
- name: Upload annie-gtk
uses: actions/upload-artifact@v2
with:
path: build/
name: annie-gtk_linux
windows:
runs-on: ubuntu-latest
container: 135e2/mingw-gtk-docker:master
steps:
- name: Checkout repo
uses: actions/checkout@v2
- name: Update Archlinux repo
run: pacman -Syu --noconfirm
- name: Build annie-gtk
run: |
sed -i -e 's/-Wl,-luuid/-luuid/g' /mingw64/lib/pkgconfig/gdk-3.0.pc
CGO_ENABLED=1 CC=x86_64-w64-mingw32-cc GOOS=windows GOARCH=amd64 \
go install github.com/gotk3/gotk3/gtk
go mod tidy
CGO_ENABLED=1 CC=x86_64-w64-mingw32-cc GOOS=windows GOARCH=amd64 \
go build -ldflags -H=windowsgui -o build/annie-gtk.exe
- name: Copy files to build path
run: |
echo "Copying logo..."
cp -v logo.png build/logo.png
echo "Copying README..."
cp -v README.md build/README.md
echo "Copying i18n files..."
bash scripts/generate-mos
- name: Bundle extra GTK runtime in pack
run: |
echo "Downloading GTK Runtime Installer (Windows)"
pacman -S wget --noconfirm
wget https://github.com/tschoonj/GTK-for-Windows-Runtime-Environment-Installer/releases/download/2021-04-29/gtk3-runtime-3.24.29-2021-04-29-ts-win64.exe -O build/gtk3-runtime-3.24.29-2021-04-29-ts-win64.exe
- name: Upload annie-gtk
uses: actions/upload-artifact@v2
with:
path: build/
name: annie-gtk_windows