-
-
Notifications
You must be signed in to change notification settings - Fork 11
103 lines (84 loc) · 3.38 KB
/
daily.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
100
101
102
103
---
name: Daily
on:
push:
branches:
- main
schedule:
- cron: "10 2 * * *"
jobs:
publish_platform:
name: Publish Platform (${{ matrix.configuration.name }})
runs-on: ubuntu-22.04
strategy:
fail-fast: false
matrix:
configuration:
- name: x86
platform: false
architecture: x86_64
- name: ARM
platform: arm64
architecture: aarch64
steps:
- name: Clean
uses: easimon/maximize-build-space@v10
with:
# Reserve some space on the / partition to install the needed org.gnome runtimes and their Debug extensions.
# This probably needs around 10-12GB, the rest of the free space on / then gets assigned to the build directory
# where we need the most space
root-reserve-mb: 16000
swap-size-mb: 1024
remove-dotnet: 'true'
remove-android: 'true'
remove-haskell: 'true'
remove-codeql: 'true'
remove-docker-images: 'true'
- name: Checkout
uses: actions/checkout@v4
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
if: ${{ matrix.configuration.platform }}
with:
platforms: ${{ matrix.configuration.platform }}
- name: Setup
run: |
sudo apt update
sudo apt install -y ccache flatpak flatpak-builder gir1.2-ostree-1.0 meson python3-aiohttp python3-gi python3-tenacity xvfb zstd
sudo rm -rf /var/lib/{apt,dpkg,cache,log}/
curl https://raw.githubusercontent.com/flatpak/flat-manager/0.3.7/flat-manager-client > ./flat-manager-client
sudo mv ./flat-manager-client /usr/bin/flat-manager-client
sudo chown root: /usr/bin/flat-manager-client
sudo chmod +x /usr/bin/flat-manager-client
sudo flatpak remote-add --system --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo
- name: Build
env:
DISPLAY: "0:0"
run: |
meson setup build -Dbranch=daily --cross-file="architectures/${{ matrix.configuration.architecture }}.crossfile"
sudo xvfb-run --auto-servernum flatpak-builder --arch=${{ matrix.configuration.architecture }} --default-branch=daily --disable-rofiles-fuse --keep-build-dirs --install-deps-from=flathub --ccache --repo=elementary builddir ./build/io.elementary.Sdk.json
- name: Fix Permissions
run: sudo chown -R runner:docker .
- name: Create Build
env:
REPO_TOKEN: ${{ secrets.FLAT_MANAGER_TOKEN }}
run: |
BUILD_ID=`flat-manager-client create https://flatpak-api.elementary.io appcenter`
echo "build_id=$BUILD_ID" >> $GITHUB_ENV
- name: Push Build
env:
REPO_TOKEN: ${{ secrets.FLAT_MANAGER_TOKEN }}
run: flat-manager-client push ${{ env.build_id }} ./elementary
- name: Commit Build
env:
REPO_TOKEN: ${{ secrets.FLAT_MANAGER_TOKEN }}
run: flat-manager-client commit --wait ${{ env.build_id }}
- name: Publish Build
env:
REPO_TOKEN: ${{ secrets.FLAT_MANAGER_TOKEN }}
run: flat-manager-client publish --wait ${{ env.build_id }}
- name: Purge Build
if: ${{ always() && env.build_id }}
env:
REPO_TOKEN: ${{ secrets.FLAT_MANAGER_TOKEN }}
run: flat-manager-client purge ${{ env.build_id }}