forked from boehs/Lightly
-
Notifications
You must be signed in to change notification settings - Fork 23
74 lines (73 loc) · 3.3 KB
/
fedora.yml
File metadata and controls
74 lines (73 loc) · 3.3 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
# Fedora 41/40
# Build Darkly from release tag and publish .rpm package
on:
workflow_call:
inputs:
cache-file-path:
required: true
type: string
version:
required: true
type: string
containers:
required: true
type: string
jobs:
build:
strategy:
max-parallel: 2
matrix:
image: ${{ fromJson(inputs.containers) }}
runs-on: ubuntu-24.04
container: ${{ matrix.image }}
steps:
- uses: actions/cache/restore@v4
id: cache
with:
key: ${{ runner.os }}-v${{ inputs.version }}-${{ hashFiles(inputs.cache-file-path) }}
path: ${{ inputs.cache-file-path }}
fail-on-cache-miss: true
- name: Install dependencies
run: |
sudo dnf install -y -q git rpmdevtools rpmlint cmake extra-cmake-modules "cmake(KDecoration3)" kwin-devel libepoxy-devel \
"cmake(Qt5Core)" "cmake(Qt5Gui)" "cmake(Qt5DBus)" "cmake(KF5GuiAddons)" "cmake(KF5WindowSystem)" \
"cmake(KF5I18n)" "cmake(KF5CoreAddons)" "cmake(KF5ConfigWidgets)" "cmake(Qt5UiTools)" "cmake(KF5GlobalAccel)" \
"cmake(KF5IconThemes)" "cmake(KF5Init)" "cmake(KF5KIO)" "cmake(KF5Notifications)" kf5-kpackage-devel kf5-kcmutils-devel \
qt5-qtquickcontrols2-devel kf5-kirigami2-devel "cmake(KF5Crash)" "cmake(KF5FrameworkIntegration)" \
kf6-kcolorscheme-devel kf6-kguiaddons-devel kf6-ki18n-devel kf6-kiconthemes-devel \
kf6-kirigami-devel kf6-kcmutils-devel kf6-frameworkintegration-devel \
"cmake(KF6Crash)" "cmake(KF6GlobalAccel)" "cmake(KF6KIO)" "cmake(KF6Notifications)" \
"cmake(KF6Package)" "cmake(KWayland)" "cmake(Plasma)" "cmake(Plasma5Support)" \
kf6-kpackage-devel libepoxy-devel fdupes
- name: Extract tarball
run: tar xf ${{ inputs.cache-file-path }}
- name: Build source
run: |
cmake_opts=(
-B Darkly-${{ inputs.version }}/build
-S Darkly-${{ inputs.version }}
-DBUILD_RPMS=ON
)
echo "${cmake_opts[@]}"
cmake "${cmake_opts[@]}" && cmake --build Darkly-${{ inputs.version }}/build -j$(nproc) && echo "Build completed!" || echo "Build failed!" || exit 1
- name: Build RPM package
id: step_build
run: |
cd Darkly-${{ inputs.version }}/build; cpack -G RPM -V -DCPACK_THREADS=$(nproc)
artifact=$GITHUB_WORKSPACE/Darkly-${{ inputs.version }}/packages/darkly-${{ inputs.version }}.x86_64.rpm
source /etc/os-release
echo "Version ID = $VERSION_ID"
publish_filename=darkly-${{ inputs.version }}.fc$VERSION_ID.x86_64.rpm
echo "Moving file to $GITHUB_WORKSPACE/$publish_filename"
mv $artifact $GITHUB_WORKSPACE/$publish_filename
echo "ARTIFACT=$publish_filename" >> "$GITHUB_ENV"
SHA256SUM=$(sha256sum $GITHUB_WORKSPACE/$publish_filename | awk '{ print $1 }')
echo "ARTIFACT = $publish_filename | SHA256SUM = $SHA256SUM"
echo "SHA256SUM=$SHA256SUM" >> "$GITHUB_ENV"
- name: Publish RPM
if: ${{ env.SHA256SUM != '' }}
uses: actions/upload-artifact@v5
with:
name: ${{ env.ARTIFACT }}
path: ${{ env.ARTIFACT }}
retention-days: 1