-
Notifications
You must be signed in to change notification settings - Fork 0
120 lines (112 loc) · 3.92 KB
/
build-gnome48.yml
File metadata and controls
120 lines (112 loc) · 3.92 KB
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
name: Build GNOME 48 Packages
on:
push:
branches:
- main
paths:
- 'packages/gnome-shell/**'
- 'packages/mutter/**'
- '.github/workflows/build-gnome48.yml'
- '.github/workflows/reusable-build-package.yml'
- 'scripts/**'
pull_request:
paths:
- 'packages/gnome-shell/**'
- 'packages/mutter/**'
- '.github/workflows/build-gnome48.yml'
- '.github/workflows/reusable-build-package.yml'
- 'scripts/**'
workflow_dispatch:
inputs:
package:
description: 'Specific package to build (leave empty for all)'
required: false
type: choice
options:
- ''
- gnome-shell
- mutter
schedule:
# Rebuild weekly on Sundays at 2 AM UTC
- cron: '0 2 * * 0'
jobs:
# Determine which packages to build
prepare:
name: Prepare build matrix
runs-on: ubuntu-latest
outputs:
packages: ${{ steps.set-matrix.outputs.packages }}
publish: ${{ steps.set-publish.outputs.publish }}
steps:
- name: Determine packages to build
id: set-matrix
run: |
if [ -n "${{ inputs.package }}" ]; then
# Manual trigger with specific package
PACKAGES='["${{ inputs.package }}"]'
else
# Build all GNOME packages
PACKAGES='["gnome-shell", "mutter"]'
fi
echo "packages=${PACKAGES}" >> "${GITHUB_OUTPUT}"
echo "Building packages: ${PACKAGES}"
- name: Determine publish flag
id: set-publish
run: |
# Publish on push to main or manual dispatch
if [ "${{ github.event_name }}" = "push" ] || [ "${{ github.event_name }}" = "workflow_dispatch" ] || [ "${{ github.event_name }}" = "schedule" ]; then
echo "publish=true" >> "${GITHUB_OUTPUT}"
else
echo "publish=false" >> "${GITHUB_OUTPUT}"
fi
# Build GNOME packages
build-gnome-shell:
name: Build gnome-shell
if: ${{ contains(fromJson(needs.prepare.outputs.packages), 'gnome-shell') }}
needs: prepare
uses: ./.github/workflows/reusable-build-package.yml
with:
package-name: gnome-shell
arches: '["x86_64", "x86_64_v2", "aarch64"]'
publish: ${{ needs.prepare.outputs.publish == 'true' }}
secrets:
COSIGN_PRIVATE_KEY: ${{ secrets.COSIGN_PRIVATE_KEY }}
GPG_PRIVATE_KEY: ${{ secrets.GPG_PRIVATE_KEY }}
GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}
build-mutter:
name: Build mutter
if: ${{ contains(fromJson(needs.prepare.outputs.packages), 'mutter') }}
needs: prepare
uses: ./.github/workflows/reusable-build-package.yml
with:
package-name: mutter
arches: '["x86_64", "x86_64_v2", "aarch64"]'
publish: ${{ needs.prepare.outputs.publish == 'true' }}
secrets:
COSIGN_PRIVATE_KEY: ${{ secrets.COSIGN_PRIVATE_KEY }}
GPG_PRIVATE_KEY: ${{ secrets.GPG_PRIVATE_KEY }}
GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}
# Summary job
summary:
name: Build Summary
needs: [prepare, build-gnome-shell, build-mutter]
if: always()
runs-on: ubuntu-latest
steps:
- name: Check build status
run: |
echo "GNOME 48 Package Build Summary"
echo "=============================="
echo "Event: ${{ github.event_name }}"
echo "Packages: ${{ needs.prepare.outputs.packages }}"
echo "Publish: ${{ needs.prepare.outputs.publish }}"
echo ""
echo "Build Results:"
echo " gnome-shell: ${{ needs.build-gnome-shell.result }}"
echo " mutter: ${{ needs.build-mutter.result }}"
# Fail if any build failed
if [ "${{ needs.build-gnome-shell.result }}" = "failure" ] || [ "${{ needs.build-mutter.result }}" = "failure" ]; then
echo "ERROR: One or more builds failed"
exit 1
fi
echo "✓ All builds completed successfully"