mirror of
https://forgejo.ellis.link/continuwuation/continuwuity.git
synced 2025-09-10 19:02:50 +02:00
test: Add minimal Fedora runner test workflow
This commit is contained in:
parent
9c374a5483
commit
610f81c2f3
2 changed files with 98 additions and 1 deletions
|
@ -21,7 +21,7 @@ on:
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
rpm-build:
|
rpmbuild:
|
||||||
name: Build RPM Package
|
name: Build RPM Package
|
||||||
runs-on: fedora-latest
|
runs-on: fedora-latest
|
||||||
|
|
||||||
|
|
97
.forgejo/workflows/test-fedora.yml
Normal file
97
.forgejo/workflows/test-fedora.yml
Normal file
|
@ -0,0 +1,97 @@
|
||||||
|
name: Test Fedora Runner
|
||||||
|
|
||||||
|
concurrency:
|
||||||
|
group: "test-fedora-${{ github.ref }}"
|
||||||
|
cancel-in-progress: true
|
||||||
|
|
||||||
|
on:
|
||||||
|
workflow_dispatch:
|
||||||
|
push:
|
||||||
|
paths:
|
||||||
|
- '.forgejo/workflows/test-fedora.yml'
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
test:
|
||||||
|
runs-on: fedora-latest
|
||||||
|
steps:
|
||||||
|
- name: Detect Fedora version
|
||||||
|
id: fedora
|
||||||
|
run: |
|
||||||
|
VERSION=$(rpm -E %fedora)
|
||||||
|
echo "version=$VERSION" >> $GITHUB_OUTPUT
|
||||||
|
echo "Fedora version: $VERSION"
|
||||||
|
|
||||||
|
- name: Test basic command
|
||||||
|
run: |
|
||||||
|
echo "Fedora runner works!"
|
||||||
|
rpm -E %fedora
|
||||||
|
echo "Runner is alive and executing commands"
|
||||||
|
|
||||||
|
- name: Checkout repository with full history
|
||||||
|
uses: https://code.forgejo.org/actions/checkout@v4
|
||||||
|
with:
|
||||||
|
fetch-depth: 0
|
||||||
|
|
||||||
|
- name: Verify checkout
|
||||||
|
run: |
|
||||||
|
echo "Checking if checkout worked:"
|
||||||
|
ls -la
|
||||||
|
echo "Git status:"
|
||||||
|
git status
|
||||||
|
|
||||||
|
- name: Cache DNF packages
|
||||||
|
uses: https://code.forgejo.org/actions/cache@v4
|
||||||
|
with:
|
||||||
|
path: |
|
||||||
|
/var/cache/dnf
|
||||||
|
/var/cache/yum
|
||||||
|
key: dnf-fedora${{ steps.fedora.outputs.version }}-${{ hashFiles('fedora/continuwuity.spec.rpkg') }}-v1
|
||||||
|
restore-keys: |
|
||||||
|
dnf-fedora${{ steps.fedora.outputs.version }}-
|
||||||
|
|
||||||
|
- name: Test cache action with step output
|
||||||
|
uses: https://code.forgejo.org/actions/cache@v4
|
||||||
|
with:
|
||||||
|
path: /tmp/test-cache
|
||||||
|
key: test-fedora${{ steps.fedora.outputs.version }}-${{ github.sha }}
|
||||||
|
restore-keys: |
|
||||||
|
test-fedora${{ steps.fedora.outputs.version }}-
|
||||||
|
test-
|
||||||
|
|
||||||
|
- name: Verify cache
|
||||||
|
run: |
|
||||||
|
echo "Cache test completed"
|
||||||
|
echo "Creating test cache file"
|
||||||
|
mkdir -p /tmp/test-cache
|
||||||
|
echo "Test data $(date)" > /tmp/test-cache/data.txt
|
||||||
|
cat /tmp/test-cache/data.txt
|
||||||
|
|
||||||
|
- name: Test sccache action
|
||||||
|
uses: https://github.com/mozilla-actions/sccache-action@v0.0.9
|
||||||
|
with:
|
||||||
|
token: ${{ secrets.GH_PUBLIC_RO }}
|
||||||
|
|
||||||
|
- name: Verify sccache
|
||||||
|
run: |
|
||||||
|
echo "Sccache test completed"
|
||||||
|
which sccache || echo "sccache not found"
|
||||||
|
|
||||||
|
- name: Install build dependencies
|
||||||
|
run: |
|
||||||
|
dnf install -y --setopt=keepcache=1 \
|
||||||
|
wget \
|
||||||
|
rpm-build \
|
||||||
|
rpmdevtools \
|
||||||
|
rpkg \
|
||||||
|
cargo-rpm-macros \
|
||||||
|
systemd-rpm-macros \
|
||||||
|
clang \
|
||||||
|
liburing-devel \
|
||||||
|
rust \
|
||||||
|
cargo \
|
||||||
|
gcc \
|
||||||
|
gcc-c++ \
|
||||||
|
make \
|
||||||
|
openssl-devel \
|
||||||
|
pkg-config \
|
||||||
|
python3-pip
|
Loading…
Add table
Add a link
Reference in a new issue