Skip to content

Commit 74154d5

Browse files
authored
Merge pull request #198 from OpenBrickProtocolFoundation/add_flatpak_repo
Chore: Improve flatpak support
2 parents d01fd59 + 92b8bad commit 74154d5

File tree

18 files changed

+212
-33
lines changed

18 files changed

+212
-33
lines changed

.github/workflows/flatpak.yml

Lines changed: 37 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Flatpak build
1+
name: Flatpak CI
22

33
on:
44
release:
@@ -10,15 +10,49 @@ on:
1010

1111
jobs:
1212
flatpak:
13-
name: 'Flatpak build'
13+
name: Flatpak build (${{ matrix.config.arch }})
1414
runs-on: ubuntu-24.04
15+
strategy:
16+
matrix:
17+
config:
18+
- arch: x86_64
19+
use_qemu: false
20+
21+
- arch: aarch64
22+
use_qemu: true
23+
qemu_arch: arm64
24+
# Don't fail the whole workflow if one architecture fails
25+
fail-fast: false
1526
container:
1627
image: bilelmoussaoui/flatpak-github-actions:freedesktop-24.08
1728
options: --privileged
1829
steps:
1930
- uses: actions/checkout@v4
31+
32+
- name: Install deps
33+
if: ${{ matrix.config.use_qemu == true }}
34+
run: |
35+
dnf -y install docker
36+
37+
- name: Set up QEMU
38+
if: ${{ matrix.config.use_qemu == true }}
39+
id: qemu
40+
uses: docker/setup-qemu-action@v2
41+
with:
42+
platforms: ${{ matrix.config.qemu_arch }}
43+
2044
- uses: bilelmoussaoui/flatpak-github-actions/flatpak-builder@v6
2145
with:
2246
bundle: oopetris.flatpak
23-
manifest-path: com.github.mgerhold.OOPetris.yml
47+
manifest-path: io.github.openbrickprotocolfoundation.oopetris.yml
2448
verbose: ${{ runner.debug == '1' && 'true' || 'false' }}
49+
cache-key: flatpak-builder-${{ github.sha }}
50+
arch: ${{ matrix.config.arch }}
51+
52+
- uses: flatpak/flatpak-github-actions/flat-manager@v4
53+
name: 'Deploy'
54+
if: github.event_name != 'pull_request'
55+
with:
56+
repository: beta
57+
flat-manager-url: http://flat-man.oopetris.totto.lt
58+
token: ${{ secrets.FLAT_MANAGER_TOKEN }}

.github/workflows/cpp-linter.yml renamed to .github/workflows/lint.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: C++ lints(clang-format + clang-tidy)
1+
name: Lint CI
22
on:
33
push:
44
branches: ['main']
@@ -7,6 +7,7 @@ on:
77

88
jobs:
99
cpp-linter:
10+
name: C++ lints(clang-format + clang-tidy)
1011
runs-on: ubuntu-24.04
1112
permissions:
1213
pull-requests: write
@@ -31,7 +32,7 @@ jobs:
3132
- name: Prepare compile_commands.json
3233
run: |
3334
sudo apt-get update
34-
sudo apt-get install ninja-build libsdl2-2.0-0 libsdl2-dev libsdl2-ttf* libsdl2-mixer* libsdl2-image* -y --no-install-recommends
35+
sudo apt-get install ninja-build libsdl2-2.0-0 libsdl2-dev libsdl2-ttf* libsdl2-mixer* libsdl2-image* desktop-file-utils -y --no-install-recommends
3536
3637
meson setup build -Dbuildtype=release -Dclang_libcpp=disabled -Dtests=true
3738
meson compile -C build git_version.hpp

.github/workflows/musl.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: musl CI
1+
name: Musl CI
22

33
on:
44
push:

.github/workflows/test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ jobs:
3232
- name: Install dependencies
3333
run: |
3434
sudo apt-get update
35-
sudo apt-get install ninja-build libsdl2-2.0-0 libsdl2-dev libsdl2-ttf* libsdl2-mixer* libsdl2-image* gcovr -y --no-install-recommends
35+
sudo apt-get install ninja-build libsdl2-2.0-0 libsdl2-dev libsdl2-ttf* libsdl2-mixer* libsdl2-image* gcovr desktop-file-utils -y --no-install-recommends
3636
3737
- name: Configure
3838
run: meson setup build -Dbuildtype=debug -Db_coverage=true -Dtests=true -Dclang_libcpp=enabled

.github/workflows/installer.yml renamed to .github/workflows/windows_installer.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Installer CI
1+
name: Windows Installer CI
22

33
on:
44
push:

README.md

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,14 +23,21 @@ Or you can download and use prebuilt binaries from the CI-builds. You can find s
2323

2424
To download artifacts, click on the newest action and download the artifacts.
2525

26-
[Android](https://github.com/mgerhold/oopetris/actions/workflows/android.yml)
26+
[Android](https://github.com/OpenBrickProtocolFoundation/oopetris/actions/workflows/android.yml)
2727

28-
[Linux (Flatpak)](https://github.com/mgerhold/oopetris/actions/workflows/flatpak.yml)
28+
[Linux (Flatpak)](https://github.com/OpenBrickProtocolFoundation/oopetris/actions/workflows/flatpak.yml)
2929

30-
[Nintendo Switch /3DS](https://github.com/mgerhold/oopetris/actions/workflows/nintendo.yml)
30+
[Nintendo Switch / 3DS](https://github.com/OpenBrickProtocolFoundation/oopetris/actions/workflows/nintendo.yml)
3131

32-
There is no correct Windows and MacOS build atm, you have to built it yourself or use the (maybe not published yet) release builds on github.
32+
[Windows](https://github.com/OpenBrickProtocolFoundation/oopetris/actions/workflows/windows_installer.yml)
3333

34+
There is no correct MacOS build atm, you have to built it yourself or use the (maybe not published yet) releases on GitHub.
35+
36+
## Releases
37+
38+
There is an official website for OOPetris, where you also can find different links to auto updatable releases.
39+
40+
For concrete instructions see [here](docs/releases.md)
3441

3542
## Logo
3643

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<component type="desktop-application">
3+
<id>@APP_ID@</id>
4+
<name>OOPetris</name>
5+
<summary>A Tetris clone in OOP</summary>
6+
<metadata_license>MIT</metadata_license>
7+
<project_license>MIT</project_license>
8+
<supports>
9+
<control>pointing</control>
10+
<control>keyboard</control>
11+
<control>touch</control>
12+
<control>gamepad</control>
13+
</supports>
14+
<description>
15+
<p>
16+
A Tetris clone in OOP. Supports multiplayer, recordings and many more features. For more information vist the github repository.
17+
</p>
18+
</description>
19+
<launchable type="desktop-id">@[email protected]</launchable>
20+
<content_rating type="oars-1.0" />
21+
<developer id="lt.totto">
22+
<name>Totto16</name>
23+
</developer>
24+
<releases>
25+
<release version="0.5.6" date="2024-05-17">
26+
<url type="details">https://github.com/OpenBrickProtocolFoundation/oopetris/releases/tag/0.5.6</url>
27+
</release>
28+
</releases>
29+
<url type="homepage">https://oopetris.totto.lt/</url>
30+
<url type="bugtracker">https://github.com/OpenBrickProtocolFoundation/oopetris/issues</url>
31+
<url type="contribute">https://github.com/OpenBrickProtocolFoundation/oopetris/pulls</url>
32+
<url type="vcs-browser">https://github.com/OpenBrickProtocolFoundation/oopetris</url>
33+
</component>

docs/develop.md

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,12 @@ For concrete instructions, see the list below:
88

99
## Linux
1010

11-
[linux](linux.md)
11+
[Linux](linux.md)
1212

1313
## Serenity OS
1414

1515
[serenity](serenity.md)
1616

17-
1817
## Windows
1918

2019
[windows](windows.md)
@@ -27,12 +26,10 @@ For concrete instructions, see the list below:
2726

2827
[switch](switch.md)
2928

30-
3129
## Nintendo 3DS
3230

3331
[switch](3ds.md)
3432

35-
3633
## Android
3734

3835
[android](android.md)

docs/linux.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010

1111
You just have to call these commands:
1212

13-
1413
```bash
1514
meson setup build
1615

@@ -19,14 +18,15 @@ meson compile -C build
1918
./build/oopetris # to run the executable
2019
```
2120

22-
2321
## Compiling for flatpak
2422

2523
You optionally can compile a flatpak image.
2624

2725
For that you need some additional binaries, namely the flatpak-builder, than just run:
2826

29-
<!-- WIP: that is not entirely correct -->
27+
> [!NOTE]
28+
> that is not entirely correct
29+
3030
```bash
31-
flatpak-build com.github.mgerhold.OOPetris.yml
31+
flatpak-build io.github.openbrickprotocolfoundation.oopetris.yml
3232
```

docs/releases.md

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
<!-- LTeX: enabled=true, language=en -->
2+
3+
# OOPetris Releases
4+
5+
6+
We support multiple platforms and different types of executables / packages.
7+
So here is a list of supported "package managers" / installation platforms.
8+
9+
## Android / FDroid
10+
11+
> [!NOTE]
12+
> This is still WIP
13+
14+
## Linux / Flatpak
15+
16+
We provide stable and beta releases via 2 remotes:
17+
18+
To use the stable version, use this repo:
19+
20+
```bash
21+
flatpak remote-add --if-not-exists oopetris-stable https://oopetris.totto.lt/repo/assets/oopetris.stable.flatpakrepo
22+
23+
```
24+
25+
And to use beta version:
26+
27+
```bash
28+
flatpak remote-add --if-not-exists oopetris-beta https://oopetris.totto.lt/repo/assets/oopetris.beta.flatpakrepo
29+
30+
```
31+
32+
Than install it by using this command:
33+
34+
```bash
35+
flatpak install -v io.github.openbrickprotocolfoundation.oopetris
36+
```
37+
38+
To update use the normal flatpak update command, keep in mind, that the bet may be unstable and break things, use with caution!
39+
40+
## Other
41+
42+
> [!NOTE]
43+
> This is still WIP
44+
45+
All other platforms have more difficult to support auto update capabilities, so you can find more on our [website](https://oopetris.totto.lt/releases).

0 commit comments

Comments
 (0)