-
-
Notifications
You must be signed in to change notification settings - Fork 61
84 lines (84 loc) · 2.53 KB
/
build.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
on:
push:
branches: [main]
pull_request:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
name: CI
jobs:
lint:
name: "Vala Lint"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: elementary/actions/vala-lint@master
with:
conf: vala-lint.conf
flatpak-builder:
name: "Flatpak Builder"
runs-on: ubuntu-latest
needs: [ lint ]
container:
image: bilelmoussaoui/flatpak-github-actions:gnome-43
options: --privileged
strategy:
matrix:
arch: [x86_64, aarch64]
# Don't fail the whole workflow if one architecture fails
fail-fast: false
steps:
- uses: actions/checkout@v4
# Docker is required by the docker/setup-qemu-action which enables emulation
- name: Install deps
if: matrix.arch == 'aarch64'
run: dnf -y install docker
- name: Set up QEMU
if: matrix.arch == 'aarch64'
id: qemu
uses: docker/setup-qemu-action@v2
with:
platforms: arm64
- uses: flatpak/flatpak-github-actions/flatpak-builder@v6
with:
bundle: "dev.geopjr.Tuba.Devel.flatpak"
run-tests: true
manifest-path: "build-aux/dev.geopjr.Tuba.Devel.json"
cache-key: flatpak-builder-${{ github.sha }}
arch: ${{ matrix.arch }}
repository-name: flathub
repository-url: https://dl.flathub.org/repo/flathub.flatpakrepo
snap-builder:
name: "Snap Builder"
runs-on: ubuntu-latest
if: ${{ false }} # disable until snap updates the sdk to GNOME 47
needs: [ lint ]
strategy:
matrix:
arch:
- x86_64
# - aarch64 # needs some changes in the action to incorporate core24
# Don't fail the whole workflow if one architecture fails
fail-fast: false
steps:
- uses: actions/checkout@v4
- uses: docker/setup-qemu-action@v2
if: matrix.arch == 'aarch64'
- run: |
mv ./build-aux/snap/snapcraft.yaml .
sed -i '/version: git/d' snapcraft.yaml
if: matrix.arch == 'aarch64'
- uses: diddlesnaps/snapcraft-multiarch-action@v1
if: matrix.arch == 'aarch64'
id: snapcraft_docker
with:
architecture: arm64
- uses: snapcore/action-build@v1
id: snapcraft
if: matrix.arch == 'x86_64'
env:
SNAPCRAFT_ENABLE_EXPERIMENTAL_EXTENSIONS: 1
- uses: actions/upload-artifact@v4
with:
name: snap-${{ matrix.arch }}
path: ${{ steps.snapcraft_docker.outputs.snap }}${{ steps.snapcraft.outputs.snap }}