-
Notifications
You must be signed in to change notification settings - Fork 35
169 lines (166 loc) · 6.06 KB
/
nightly.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
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
# Copyright 2024 the Cartero authors
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <https://www.gnu.org/licenses/>.
#
# SPDX-License-Identifier: GPL-3.0-or-later
on:
push:
branches:
- trunk
- "fix/*"
- "release/*"
name: Nightly build
jobs:
flatpak:
runs-on: ubuntu-latest
container:
image: bilelmoussaoui/flatpak-github-actions:gnome-46
options: --privileged
strategy:
matrix:
arch: [x86_64, aarch64]
fail-fast: false
name: "Flatpak (${{ matrix.arch }})"
steps:
- uses: actions/checkout@v4
- name: (ARM) Install Docker
if: ${{ matrix.arch != 'x86_64' }}
run: |
dnf -y install docker
- name: (ARM) Set up QEMU
if: ${{ matrix.arch != 'x86_64' }}
id: qemu
uses: docker/setup-qemu-action@v2
with:
platforms: arm64
- uses: flatpak/flatpak-github-actions/flatpak-builder@v6
with:
bundle: es.danirod.Cartero.Devel.flatpak
manifest-path: build-aux/es.danirod.Cartero.Devel.json
cache-key: flatpak-builder-${{ github.sha }}
build-bundle: true
arch: ${{ matrix.arch }}
windows:
name: "Windows"
runs-on: windows-latest
defaults:
run:
shell: msys2 {0}
steps:
- uses: msys2/setup-msys2@v2
with:
update: true
install: >-
git
msystem: ucrt64
- uses: actions/checkout@v4
- name: Build Windows version
run: |
export PATH=/c/Users/$USER/.cargo/bin:$PATH
rustup toolchain install stable-gnu
rustup default stable-gnu
build-aux/msys-build.sh devel
- uses: Minionguyjpro/Inno-Setup-Action@v1.2.2
name: Create Windows installer
with:
path: build/win32-installer.iss
- uses: actions/upload-artifact@v4
name: Upload Windows version
with:
name: es.danirod.Cartero-windows-x86_64
path: build/cartero-win32
- uses: actions/upload-artifact@v4
name: Upload Windows version
with:
name: es.danirod.Cartero-windows-x86_64-installer
path: build/Output/cartero.exe
macos:
strategy:
matrix:
# macOS 13 for x86_64, macOS 15 for aarch64
os: [macos-13, macos-15]
fail-fast: false
name: "macOS (${{ matrix.os }})"
runs-on: ${{ matrix.os }}
env:
# The minimum supported macOS version.
MACOSX_DEPLOYMENT_TARGET: 11.0
steps:
- uses: actions/checkout@v4
- name: Reload the patched Homebrew environment
id: patched-homebrew
uses: actions/cache@v4
with:
path: homebrew
key: ${{ runner.os }}-${{ runner.arch }}-homebrew
- name: Install patched Homebrew environment
if: steps.patched-homebrew.outputs.cache-hit != 'true'
run: |
# Manually download Homebrew
mkdir homebrew && curl -L https://github.com/Homebrew/brew/tarball/master | tar xz --strip-components 1 -C homebrew
eval "$(homebrew/bin/brew shellenv)"
brew update --force --quiet
export PATH=$PWD/homebrew/bin:$PATH
# Patch Homebrew to support injecting the deployment target
sed -i 's/MACOSX_DEPLOYMENT_TARGET//g' $HOME/homebrew/Library/build_environment.rb
sed -i 's/MACOSX_DEPLOYMENT_TARGET//g' $HOME/homebrew/Library/extend/ENV/shared.rb
- name: Install dependencies
if: steps.patched-homebrew.outputs.cache-hit != 'true'
run: |
export PATH=$PWD/homebrew/bin:$PATH
# Note: the --build-from-source flag does not affect dependencies, so install
# each dependency separately. Since this is not a real Homebrew distribution,
# it doesn't matter if dependencies are not treated as such.
for pkg in meson gtk4 desktop-file-utils pygobject3 adwaita-icon-theme shared-mime-info gtksourceview5 libadwaita; do
brew install $(brew deps $pkg) --build-from-source
brew install $pkg --build-from-source
done
- name: Fix PYTHONPATH for blueprint-compiler
run: |
export PATH=$PWD/homebrew/bin:$PATH
echo "PYTHONPATH=$(brew --prefix)/lib/python3.13/site-packages:$PYTHONPATH" >> $GITHUB_ENV
- name: Build macOS version
run: |
export PATH=$PWD/homebrew/bin:$PATH
build-aux/macos-build.sh devel
- name: Build installer
run: |
export PATH=$PWD/homebrew/bin:$PATH
build-aux/macos-installer.sh
- uses: actions/upload-artifact@v4
name: Upload macOS version
with:
name: es.danirod.Cartero-${{ runner.arch }}
path: build/Cartero-*.dmg
appimage:
name: "AppImage (GNU/Linux)"
runs-on: ubuntu-22.04
steps:
- name: Install dependencies
run: |
sudo apt install --no-install-recommends libfuse2
eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)"
brew install meson gtk4 gtksourceview5 desktop-file-utils pygobject3 libadwaita adwaita-icon-theme gettext shared-mime-info
- uses: actions/checkout@v4
- name: Build
run: |
eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)"
export VENDOR_BASE="$(brew --prefix)"
export LD_LIBRARY_PATH="$(brew --prefix)/lib"
build-aux/appimage-build.sh devel
- name: Upload
uses: actions/upload-artifact@v4
with:
name: es.danirod.Cartero.Devel-AppImage
path: build/appimagetool/Cartero-x86_64.AppImage