Skip to content

Commit

Permalink
build(fedora): add copr build
Browse files Browse the repository at this point in the history
  • Loading branch information
ReenigneArcher committed Oct 5, 2024
1 parent 0107ca4 commit 4474592
Show file tree
Hide file tree
Showing 9 changed files with 648 additions and 226 deletions.
56 changes: 56 additions & 0 deletions .github/workflows/ci-copr.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
---
name: CI Copr

on:
pull_request:
branches:
- master
types:
- opened
- synchronize
- reopened
release:
types:
- prereleased
- released
workflow_dispatch:

concurrency:
group: "${{ github.workflow }}-${{ github.ref }}"
cancel-in-progress: true

jobs:
build:
name: Copr build
if: github.repository_owner == 'LizardByte'
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Get properties
run: |
# package name = repository name
package=${{ github.event.repository.name }}
copr_base="https://copr.fedorainfracloud.org/webhooks/custom-dir/lizardbyte"
# release and released type
if [ "${{ github.event_name }}" = "release" ]; then
if [ "${{ github.event.action }}" = "prereleased" ]; then
COPR_PUSH_WEBHOOK="${copr_base}/beta/${{ secrets.COPR_BETA_WEBHOOK_TOKEN }}/${package}/"
elif [ "${{ github.event.action }}" = "released" ]; then
COPR_PUSH_WEBHOOK="${copr_base}/stable/${{ secrets.COPR_STABLE_WEBHOOK_TOKEN }}/${package}/"
fi
elif [ "${{ github.event_name }}" = "pull_request" ]; then
COPR_PR_WEBHOOK="${copr_base}/pulls:pr:${{github.event.number}}/${{vars.COPR_PR_WEBHOOK_TOKEN}}/${package}/"
fi
echo "COPR_PUSH_WEBHOOK=${COPR_PUSH_WEBHOOK}" >> $GITHUB_ENV
echo "COPR_PR_WEBHOOK=${COPR_PR_WEBHOOK}" >> $GITHUB_ENV
- name: Build
run: |
curl https://raw.githubusercontent.com/praiskup/copr-ci-tooling/main/copr-gh-actions-submit > submit
# if a PR number is added the script will use the PR webhook, otherwise it will use the push webhook
bash submit ${{ github.event.pull_request.number }}
2 changes: 1 addition & 1 deletion .github/workflows/update-flathub-repo.yml
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ jobs:
with:
path: "flathub/${{ env.FLATHUB_PKG }}"
token: ${{ secrets.GH_BOT_TOKEN }}
commit-message: Update ${{ env.FLATHUB_PKG }} to ${{ github.event.release.tag_name }}
commit-message: "chore: Update ${{ env.FLATHUB_PKG }} to ${{ github.event.release.tag_name }}"
branch: bot/bump-${{ env.FLATHUB_PKG }}-${{ github.event.release.tag_name }}
delete-branch: true
title: "chore: Update ${{ env.FLATHUB_PKG }} to ${{ github.event.release.tag_name }}"
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/update-pacman-repo.yml
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ jobs:
steps.check-label.outputs.hasTopic == 'true' &&
steps.check-release.outputs.isLatestRelease == 'true'
run: |
echo "pkg_name=$(echo ${{ github.repository }} | tr '[:upper:]' '[:lower:]')" >> $GITHUB_OUTPUT
echo "pkg_name=$(echo ${{ github.event.repository.name }} | tr '[:upper:]' '[:lower:]')" >> $GITHUB_OUTPUT
- name: Download release asset
id: download
Expand All @@ -97,7 +97,7 @@ jobs:
add-paths: |
pkgbuilds/*
token: ${{ secrets.GH_BOT_TOKEN }}
commit-message: Update ${{ github.repository }} to ${{ github.event.release.tag_name }}
commit-message: "chore: Update ${{ github.repository }} to ${{ github.event.release.tag_name }}"
branch: bot/bump-${{ github.repository }}-${{ github.event.release.tag_name }}
delete-branch: true
title: "chore: Update ${{ github.repository }} to ${{ github.event.release.tag_name }}"
Expand Down
104 changes: 0 additions & 104 deletions docker/fedora-39.dockerfile

This file was deleted.

104 changes: 0 additions & 104 deletions docker/fedora-40.dockerfile

This file was deleted.

32 changes: 17 additions & 15 deletions docs/getting_started.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ CUDA is used for NVFBC capture.
</tr>
<tr>
<td rowspan="1">12.4.0</td>
<td>sunshine-fedora-39-{arch}.rpm</td>
<td>Sunshine (copr fedora-39)</td>
</tr>
<tr>
<td rowspan="1">12.5.1</td>
Expand All @@ -72,10 +72,13 @@ CUDA is used for NVFBC capture.
<td>sunshine_{arch}.flatpak</td>
</tr>
<tr>
<td>n/a</td>
<td>n/a</td>
<td>n/a</td>
<td>sunshine-fedora-40-{arch}.rpm</td>
<td rowspan="2">n/a</td>
<td rowspan="2">n/a</td>
<td rowspan="2">n/a</td>
<td>Sunshine (copr fedora-40)</td>
</tr>
<tr>
<td>Sunshine (copr fedora-41)</td>
</tr>
</table>

Expand Down Expand Up @@ -166,21 +169,20 @@ sudo apt remove sunshine

#### Fedora
##### Install
1. Add `rpmfusion` repositories.
1. Enable copr repository.
```bash
sudo dnf install \
https://mirrors.rpmfusion.org/free/fedora/rpmfusion-free-release-$(rpm -E %fedora).noarch.rpm \
https://mirrors.rpmfusion.org/nonfree/fedora/rpmfusion-nonfree-release-$(rpm -E %fedora).noarch.rpm
sudo dnf copr enable lizardbyte/stable
```
2. Download `sunshine-{distro}-{distro-version}-{arch}.rpm` and run the following command.

or
```bash
sudo dnf install ./sunshine-{distro}-{distro-version}-{arch}.rpm
sudo dnf copr enable lizardbyte/beta
```

@note{The `{distro-version}` is the version of the distro we built the package on. The `{arch}` is the
architecture of your operating system.}

@tip{You can double-click the rpm file to see details about the package and begin installation.}
2. Install the package.
```bash
sudo dnf install Sunshine
```

##### Uninstall
```bash
Expand Down
Loading

0 comments on commit 4474592

Please sign in to comment.