-
-
Notifications
You must be signed in to change notification settings - Fork 36
99 lines (84 loc) · 2.83 KB
/
ci.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
name: CI
on:
push:
branches: [main]
pull_request:
concurrency:
group: release-${{ github.sha }}
jobs:
flatpak:
name: Flatpak
runs-on: ubuntu-latest
container:
image: bilelmoussaoui/flatpak-github-actions:gnome-46
options: --privileged
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Flatpak Builder
uses: flatpak/flatpak-github-actions/flatpak-builder@v6.3
with:
bundle: page.kramo.Cartridges.Devel.flatpak
manifest-path: build-aux/flatpak/page.kramo.Cartridges.Devel.json
windows:
name: Windows
runs-on: windows-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup MSYS2
uses: msys2/setup-msys2@v2
with:
msystem: UCRT64
update: true
install: mingw-w64-ucrt-x86_64-gtk4 mingw-w64-ucrt-x86_64-libadwaita mingw-w64-ucrt-x86_64-python-gobject mingw-w64-ucrt-x86_64-python-yaml mingw-w64-ucrt-x86_64-python-requests mingw-w64-ucrt-x86_64-python-pillow mingw-w64-ucrt-x86_64-desktop-file-utils mingw-w64-ucrt-x86_64-ca-certificates mingw-w64-ucrt-x86_64-meson git
- name: Compile
shell: msys2 {0}
run: |
meson setup _build
ninja -C _build install
pacman --noconfirm -Rs mingw-w64-ucrt-x86_64-desktop-file-utils mingw-w64-ucrt-x86_64-meson git
- name: Test
shell: msys2 {0}
run: |
set +e
timeout 2 cartridges; [ "$?" -eq "124" ]
- name: Inno Setup
run: iscc ".\_build\build-aux\windows\Cartridges.iss"
- name: Upload Artifact
uses: actions/upload-artifact@v4
with:
name: Windows Installer
path: _build/build-aux/windows/Output/Cartridges Windows.exe
macos:
name: macOS
runs-on: macos-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Homebrew
id: set-up-homebrew
uses: Homebrew/actions/setup-homebrew@master
- name: Install Dependencies
run: |
brew install meson pygobject3 libadwaita adwaita-icon-theme desktop-file-utils pyinstaller pillow
pip3 install --break-system-packages requests PyYAML pyobjc
- name: Meson Build
run: |
meson setup _build -Dtiff_compression=jpeg
ninja install -C _build
- name: PyInstaller
env:
PYTHONPATH: /opt/homebrew/opt/homebrew/lib/python3.12/site-packages
run: |
cd build-aux/macos
pyinstaller ./cartridges.spec
- name: Zip
run: |
cd build-aux/macos/dist
zip -yr Cartridges\ macOS.zip Cartridges.app
- name: Upload Artifact
uses: actions/upload-artifact@v4
with:
path: build-aux/macos/dist/Cartridges macOS.zip
name: macOS Application