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