forked from GeopJr/Tuba
-
Notifications
You must be signed in to change notification settings - Fork 0
69 lines (69 loc) · 2.09 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
on:
push:
branches: [main]
pull_request:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
name: CI
jobs:
flatpak-builder:
name: "Flatpak Builder"
runs-on: ubuntu-latest
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@v3
# 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@v5
with:
bundle: "dev.geopjr.Tuba.Devel.flatpak"
manifest-path: "build-aux/dev.geopjr.Tuba.Devel.json"
cache-key: flatpak-builder-${{ github.sha }}
arch: ${{ matrix.arch }}
snap-builder:
name: "Snap Builder"
runs-on: ubuntu-latest
strategy:
matrix:
arch: [x86_64, aarch64]
# Don't fail the whole workflow if one architecture fails
fail-fast: false
steps:
- uses: actions/checkout@v3
- uses: docker/setup-qemu-action@v2
if: matrix.arch == 'aarch64'
- uses: mikefarah/[email protected]
if: matrix.arch == 'aarch64'
- run: |
mv ./build-aux/snap/snapcraft.yaml .
sed -i '/version: git/d' snapcraft.yaml
yq -i 'del(.parts.cleanup)' 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'
- uses: actions/upload-artifact@v3
with:
name: snap-${{ matrix.arch }}
path: ${{ steps.snapcraft_docker.outputs.snap }}${{ steps.snapcraft.outputs.snap }}