-
Notifications
You must be signed in to change notification settings - Fork 236
ci: publish Fedora RPM releases #1321
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||
|---|---|---|---|---|
|
|
@@ -351,6 +351,64 @@ jobs: | |||
| path: build/lemonade-server_${{ env.LEMONADE_VERSION }}_amd64.deb | ||||
| retention-days: 7 | ||||
|
|
||||
| build-lemonade-rpm: | ||||
| name: Build Lemonade .rpm Package | ||||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Also please add a line here to add Fedora and the .rpm artifact to the tabe:
And remove the Fedora mention from the "Other platforms: ..." note. Currently looks like this when rendered:
|
||||
| runs-on: ubuntu-latest | ||||
| container: | ||||
| image: fedora:latest | ||||
| outputs: | ||||
| version: ${{ steps.get_version.outputs.version }} | ||||
| steps: | ||||
| - uses: actions/checkout@v4 | ||||
| with: | ||||
| clean: true | ||||
| fetch-depth: 0 | ||||
|
|
||||
| - name: Install RPM packaging tools | ||||
| shell: bash | ||||
| run: | | ||||
| set -e | ||||
| dnf install -y rpm-build | ||||
|
|
||||
| - name: Get version from CMakeLists.txt | ||||
| id: get_version | ||||
| uses: ./.github/actions/get-version | ||||
|
|
||||
| - name: Build Linux .rpm package | ||||
| shell: bash | ||||
| run: | | ||||
| set -e | ||||
|
|
||||
| echo "Running setup.sh to configure build environment..." | ||||
| bash setup.sh | ||||
|
|
||||
| echo "Building lemonade-router and lemonade-server for Fedora..." | ||||
| cmake --build --preset default | ||||
|
|
||||
| RPM_FILE="lemonade-server-${LEMONADE_VERSION}.x86_64.rpm" | ||||
|
|
||||
| cd build | ||||
|
|
||||
| echo "Creating .rpm package with CPack..." | ||||
| cpack -G RPM -V | ||||
|
|
||||
| if [ ! -f "$RPM_FILE" ]; then | ||||
| echo "ERROR: .rpm package not created!" | ||||
| echo "Contents of build directory:" | ||||
| ls -lR . | ||||
| exit 1 | ||||
| fi | ||||
|
|
||||
| echo "Package information:" | ||||
| rpm -qip "$RPM_FILE" | ||||
|
|
||||
| - name: Upload .rpm package | ||||
| uses: actions/upload-artifact@v4 | ||||
| with: | ||||
| name: lemonade-rpm | ||||
| path: build/lemonade-server-${{ env.LEMONADE_VERSION }}.x86_64.rpm | ||||
| retention-days: 7 | ||||
|
|
||||
| build-lemonade-macos-dmg: | ||||
| name: Build Lemonade macOS .dmg (with Electron App) | ||||
| runs-on: macos-latest | ||||
|
|
@@ -794,6 +852,49 @@ jobs: | |||
| if: always() | ||||
| uses: ./.github/actions/cleanup-processes-linux | ||||
|
|
||||
| test-rpm-package: | ||||
| name: Test .rpm - Fedora | ||||
| runs-on: ubuntu-latest | ||||
| needs: build-lemonade-rpm | ||||
| container: | ||||
| image: fedora:latest | ||||
| env: | ||||
| LEMONADE_VERSION: ${{ needs.build-lemonade-rpm.outputs.version }} | ||||
| steps: | ||||
| - name: Download Lemonade .rpm Package | ||||
| uses: actions/download-artifact@v4 | ||||
| with: | ||||
| name: lemonade-rpm | ||||
| path: . | ||||
|
|
||||
| - name: Install and verify Lemonade (.rpm) | ||||
| shell: bash | ||||
| run: | | ||||
| set -e | ||||
|
|
||||
| RPM_FILE="lemonade-server-${LEMONADE_VERSION}.x86_64.rpm" | ||||
|
|
||||
| if [ ! -f "$RPM_FILE" ]; then | ||||
| echo "ERROR: .rpm file not found: $RPM_FILE" | ||||
| ls -la *.rpm 2>/dev/null || echo "No .rpm files found in current directory" | ||||
| exit 1 | ||||
| fi | ||||
|
|
||||
| dnf install -y shadow-utils "$RPM_FILE" | ||||
|
|
||||
| echo "Installed package information:" | ||||
| rpm -qi lemonade-server | ||||
|
|
||||
| echo "Installed file list:" | ||||
| rpm -ql lemonade-server | sort | ||||
|
|
||||
| test -f /etc/lemonade/lemonade.conf | ||||
| test -f /opt/bin/lemonade-server | ||||
| test -f /opt/bin/lemonade-router | ||||
|
|
||||
| lemonade-server --version | ||||
| lemonade-router --version | ||||
|
||||
|
|
||||
| test-dmg-inference: | ||||
| name: Test .dmg - llamacpp (metal) | ||||
| runs-on: macos-latest | ||||
|
|
@@ -1040,9 +1141,11 @@ jobs: | |||
| needs: | ||||
| - sign-msi-installers | ||||
| - build-lemonade-deb | ||||
| - build-lemonade-rpm | ||||
| - build-lemonade-macos-dmg | ||||
| - build-lemonade-appimage | ||||
| - test-cli-endpoints | ||||
| - test-rpm-package | ||||
| if: startsWith(github.ref, 'refs/tags/v') | ||||
| env: | ||||
| LEMONADE_VERSION: ${{ needs.build-lemonade-deb.outputs.version }} | ||||
|
|
@@ -1064,6 +1167,12 @@ jobs: | |||
| name: lemonade-deb | ||||
| path: . | ||||
|
|
||||
| - name: Download Lemonade .rpm Package | ||||
| uses: actions/download-artifact@v4 | ||||
| with: | ||||
| name: lemonade-rpm | ||||
| path: . | ||||
|
|
||||
| - name: Download Lemonade macOS .pkg Package | ||||
| uses: actions/download-artifact@v4 | ||||
| with: | ||||
|
|
@@ -1082,6 +1191,7 @@ jobs: | |||
| ls -lh lemonade-server-minimal.msi | ||||
| ls -lh lemonade.msi | ||||
| ls -lh lemonade-server_${LEMONADE_VERSION}_amd64.deb | ||||
| ls -lh lemonade-server-${LEMONADE_VERSION}.x86_64.rpm | ||||
| ls -lh *.pkg | ||||
| ls -lh Lemonade-${LEMONADE_VERSION}-x86_64.AppImage | ||||
|
|
||||
|
|
@@ -1102,6 +1212,7 @@ jobs: | |||
| lemonade-server-minimal.msi | ||||
| lemonade.msi | ||||
| lemonade-server_${{ env.LEMONADE_VERSION }}_amd64.deb | ||||
| lemonade-server-${{ env.LEMONADE_VERSION }}.x86_64.rpm | ||||
| *.pkg | ||||
| Lemonade-${{ env.LEMONADE_VERSION }}-x86_64.AppImage | ||||
| fail_on_unmatched_files: true | ||||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,25 @@ | ||
| #!/bin/bash | ||
| set -e | ||
|
|
||
| if ! getent group lemonade > /dev/null 2>&1; then | ||
| groupadd -r lemonade > /dev/null 2>&1 || true | ||
| fi | ||
|
|
||
| if ! getent passwd lemonade > /dev/null 2>&1; then | ||
| useradd -m -r -g lemonade -d /opt/var/lib/lemonade -s /usr/sbin/nologin lemonade > /dev/null 2>&1 || true | ||
| fi | ||
|
|
||
| mkdir -p /opt/var/lib/lemonade | ||
| chown lemonade:lemonade /opt/var/lib/lemonade > /dev/null 2>&1 || true | ||
|
|
||
| usermod -a -G render lemonade > /dev/null 2>&1 || true | ||
|
|
||
| if getent group systemd-journal > /dev/null 2>&1; then | ||
| usermod -a -G systemd-journal lemonade > /dev/null 2>&1 || true | ||
| fi | ||
|
|
||
| if command -v systemctl > /dev/null 2>&1 && [ -d /run/systemd/system ]; then | ||
| systemctl daemon-reload > /dev/null 2>&1 || true | ||
| fi | ||
|
|
||
| exit 0 |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,8 @@ | ||
| #!/bin/bash | ||
| set -e | ||
|
|
||
| if command -v systemctl > /dev/null 2>&1 && [ -d /run/systemd/system ]; then | ||
| systemctl daemon-reload > /dev/null 2>&1 || true | ||
| fi | ||
|
|
||
| exit 0 |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,8 @@ | ||
| #!/bin/bash | ||
| set -e | ||
|
|
||
| if command -v systemctl > /dev/null 2>&1 && [ -d /run/systemd/system ]; then | ||
| systemctl stop lemonade-server.service > /dev/null 2>&1 || true | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
The new Useful? React with 👍 / 👎. |
||
| fi | ||
|
|
||
| exit 0 | ||

There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@OmerFarukOruc please replace the existing Fedora instructions in the Install Options website with a link to the RPM in the release, and provide a screenshot of the rendered page.
Currently looks like this:

Should look like this:
If the plan is to use the AppImage as an optional frontend, please include this text too: