Distributed Build and Publish RPMs #6
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Distributed Build and Publish RPMs | |
| 'on': | |
| workflow_dispatch: | |
| inputs: | |
| force: | |
| description: Force rebuild even if package exists in repo | |
| type: boolean | |
| default: false | |
| env: | |
| R2_BUCKET: bluefin | |
| LOCAL_REPO: ${{ github.workspace }}/local-repo | |
| MOCK_RUNNER_IMAGE: ghcr.io/tuna-os/mock-runner:centos-stream-10 | |
| RPM_SOURCES_CACHE: /root/rpmbuild/sources-cache | |
| jobs: | |
| seed-repo: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Install dependencies | |
| run: sudo apt-get update -q && sudo apt-get install -y -q createrepo-c | |
| - name: Configure rclone | |
| run: 'curl -fsSL https://rclone.org/install.sh | sudo bash | |
| mkdir -p ~/.config/rclone | |
| cat > ~/.config/rclone/rclone.conf << EOF | |
| [r2] | |
| type = s3 | |
| provider = Cloudflare | |
| access_key_id = ${{ secrets.R2_ACCESS_KEY_ID }} | |
| secret_access_key = ${{ secrets.R2_SECRET_ACCESS_KEY }} | |
| endpoint = https://${{ secrets.CLOUDFLARE_ACCOUNT_ID }}.r2.cloudflarestorage.com | |
| EOF | |
| ' | |
| - name: Seed local repo from R2 | |
| run: 'mkdir -p local-repo | |
| echo "Downloading existing repo from R2..." | |
| rclone sync "r2:${R2_BUCKET}/repo/10-stream-x86_64/" "local-repo/" --exclude "repodata/**" || true | |
| createrepo_c local-repo | |
| ' | |
| - name: Upload initial repo | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: repo-0 | |
| path: local-repo | |
| retention-days: 1 | |
| build-base-tools: | |
| needs: seed-repo | |
| runs-on: ubuntu-latest | |
| if: ${{ !cancelled() }} | |
| container: | |
| image: quay.io/centos/centos:stream10 | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| package: | |
| - src/deps/meson | |
| - src/deps/autoconf | |
| - src/deps/libldac | |
| - src/deps/python-smartypants | |
| - src/deps/python-typogrify | |
| steps: | |
| - name: Install build tools | |
| run: | | |
| dnf install -y git rpm-build rpmdevtools createrepo_c python3-pyyaml | |
| dnf install -y epel-release || true | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| with: | |
| submodules: recursive | |
| - name: Download previous repo | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: repo-0 | |
| path: local-repo | |
| - name: Set up local repo | |
| run: | | |
| createrepo_c local-repo | |
| cat > /etc/yum.repos.d/local-build.repo << EOF | |
| [local-build] | |
| name=Local Build Repo | |
| baseurl=file://${GITHUB_WORKSPACE}/local-repo | |
| enabled=1 | |
| gpgcheck=0 | |
| priority=1 | |
| module_hotfixes=1 | |
| EOF | |
| dnf makecache --repo local-build || true | |
| - name: Restore source cache | |
| uses: actions/cache@v4 | |
| with: | |
| path: ${{ env.RPM_SOURCES_CACHE }} | |
| key: sources-${{ matrix.package }}-${{ hashFiles(format('{0}/*.spec', matrix.package)) }} | |
| restore-keys: | | |
| sources-${{ matrix.package }}- | |
| - name: Build package | |
| run: "touch .build-marker\nARGS=(--backend native --package ${{ matrix.package }})\nif [[ \"${{ github.event.inputs.force }}\" == \"true\" ]]; then\n ARGS+=(--force)\nfi\n./scripts/build-chain.sh \"${ARGS[@]}\"\n" | |
| - name: Find new RPMs | |
| id: find-rpms | |
| run: 'mkdir -p new-rpms | |
| find local-repo -name "*.rpm" -newer .build-marker -exec cp {} new-rpms/ \; | |
| count=$(ls -1 new-rpms/*.rpm 2>/dev/null | wc -l) | |
| echo "count=$count" >> $GITHUB_OUTPUT | |
| ' | |
| - name: Upload RPMs | |
| if: steps.find-rpms.outputs.count > '0' | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: rpms-base-tools-${{ strategy.job-index }} | |
| path: new-rpms/*.rpm | |
| retention-days: 1 | |
| consolidate-base-tools: | |
| needs: build-base-tools | |
| if: ${{ !cancelled() }} | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Install createrepo_c | |
| run: sudo apt-get update -q && sudo apt-get install -y -q createrepo-c | |
| - name: Download previous repo | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: repo-0 | |
| path: local-repo | |
| - name: Download new RPMs | |
| uses: actions/download-artifact@v4 | |
| continue-on-error: true | |
| with: | |
| pattern: rpms-base-tools-* | |
| path: local-repo | |
| merge-multiple: true | |
| - name: Update repo | |
| run: createrepo_c --update local-repo | |
| - name: Upload new RPMs to R2 | |
| run: | | |
| sudo apt-get install -y -q rclone | |
| mkdir -p ~/.config/rclone | |
| cat > ~/.config/rclone/rclone.conf << EOF | |
| [r2] | |
| type = s3 | |
| provider = Cloudflare | |
| access_key_id = ${{ secrets.R2_ACCESS_KEY_ID }} | |
| secret_access_key = ${{ secrets.R2_SECRET_ACCESS_KEY }} | |
| endpoint = https://${{ secrets.CLOUDFLARE_ACCOUNT_ID }}.r2.cloudflarestorage.com | |
| EOF | |
| rclone copy local-repo/ "r2:${R2_BUCKET}/repo/10-stream-x86_64/" --exclude "repodata/**" | |
| - name: Upload updated repo | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: repo-1 | |
| path: local-repo | |
| retention-days: 1 | |
| build-build-tools: | |
| needs: consolidate-base-tools | |
| runs-on: ubuntu-latest | |
| if: ${{ !cancelled() }} | |
| container: | |
| image: quay.io/centos/centos:stream10 | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| package: | |
| - src/deps/wayland-protocols | |
| - src/deps/icu | |
| - src/deps/libxcvt | |
| - src/deps/shaderc | |
| - src/deps/umockdev | |
| - src/deps/python-dbusmock | |
| - src/deps/gi-docgen | |
| - src/deps/avahi | |
| steps: | |
| - name: Install build tools | |
| run: | | |
| dnf install -y git rpm-build rpmdevtools createrepo_c python3-pyyaml | |
| dnf install -y epel-release || true | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| with: | |
| submodules: recursive | |
| - name: Download previous repo | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: repo-1 | |
| path: local-repo | |
| - name: Set up local repo | |
| run: | | |
| createrepo_c local-repo | |
| cat > /etc/yum.repos.d/local-build.repo << EOF | |
| [local-build] | |
| name=Local Build Repo | |
| baseurl=file://${GITHUB_WORKSPACE}/local-repo | |
| enabled=1 | |
| gpgcheck=0 | |
| priority=1 | |
| module_hotfixes=1 | |
| EOF | |
| dnf makecache --repo local-build || true | |
| - name: Restore source cache | |
| uses: actions/cache@v4 | |
| with: | |
| path: ${{ env.RPM_SOURCES_CACHE }} | |
| key: sources-${{ matrix.package }}-${{ hashFiles(format('{0}/*.spec', matrix.package)) }} | |
| restore-keys: | | |
| sources-${{ matrix.package }}- | |
| - name: Build package | |
| run: "touch .build-marker\nARGS=(--backend native --package ${{ matrix.package }})\nif [[ \"${{ github.event.inputs.force }}\" == \"true\" ]]; then\n ARGS+=(--force)\nfi\n./scripts/build-chain.sh \"${ARGS[@]}\"\n" | |
| - name: Find new RPMs | |
| id: find-rpms | |
| run: 'mkdir -p new-rpms | |
| find local-repo -name "*.rpm" -newer .build-marker -exec cp {} new-rpms/ \; | |
| count=$(ls -1 new-rpms/*.rpm 2>/dev/null | wc -l) | |
| echo "count=$count" >> $GITHUB_OUTPUT | |
| ' | |
| - name: Upload RPMs | |
| if: steps.find-rpms.outputs.count > '0' | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: rpms-build-tools-${{ strategy.job-index }} | |
| path: new-rpms/*.rpm | |
| retention-days: 1 | |
| consolidate-build-tools: | |
| needs: build-build-tools | |
| if: ${{ !cancelled() }} | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Install createrepo_c | |
| run: sudo apt-get update -q && sudo apt-get install -y -q createrepo-c | |
| - name: Download previous repo | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: repo-1 | |
| path: local-repo | |
| - name: Download new RPMs | |
| uses: actions/download-artifact@v4 | |
| continue-on-error: true | |
| with: | |
| pattern: rpms-build-tools-* | |
| path: local-repo | |
| merge-multiple: true | |
| - name: Update repo | |
| run: createrepo_c --update local-repo | |
| - name: Upload new RPMs to R2 | |
| run: | | |
| sudo apt-get install -y -q rclone | |
| mkdir -p ~/.config/rclone | |
| cat > ~/.config/rclone/rclone.conf << EOF | |
| [r2] | |
| type = s3 | |
| provider = Cloudflare | |
| access_key_id = ${{ secrets.R2_ACCESS_KEY_ID }} | |
| secret_access_key = ${{ secrets.R2_SECRET_ACCESS_KEY }} | |
| endpoint = https://${{ secrets.CLOUDFLARE_ACCOUNT_ID }}.r2.cloudflarestorage.com | |
| EOF | |
| rclone copy local-repo/ "r2:${R2_BUCKET}/repo/10-stream-x86_64/" --exclude "repodata/**" | |
| - name: Upload updated repo | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: repo-2 | |
| path: local-repo | |
| retention-days: 1 | |
| build-icu-full: | |
| needs: consolidate-build-tools | |
| runs-on: ubuntu-latest | |
| if: ${{ !cancelled() }} | |
| container: | |
| image: quay.io/centos/centos:stream10 | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| package: | |
| - src/deps/icu | |
| steps: | |
| - name: Install build tools | |
| run: | | |
| dnf install -y git rpm-build rpmdevtools createrepo_c python3-pyyaml | |
| dnf install -y epel-release || true | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| with: | |
| submodules: recursive | |
| - name: Download previous repo | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: repo-2 | |
| path: local-repo | |
| - name: Set up local repo | |
| run: | | |
| createrepo_c local-repo | |
| cat > /etc/yum.repos.d/local-build.repo << EOF | |
| [local-build] | |
| name=Local Build Repo | |
| baseurl=file://${GITHUB_WORKSPACE}/local-repo | |
| enabled=1 | |
| gpgcheck=0 | |
| priority=1 | |
| module_hotfixes=1 | |
| EOF | |
| dnf makecache --repo local-build || true | |
| - name: Restore source cache | |
| uses: actions/cache@v4 | |
| with: | |
| path: ${{ env.RPM_SOURCES_CACHE }} | |
| key: sources-${{ matrix.package }}-${{ hashFiles(format('{0}/*.spec', matrix.package)) }} | |
| restore-keys: | | |
| sources-${{ matrix.package }}- | |
| - name: Build package | |
| run: "touch .build-marker\nARGS=(--backend native --package ${{ matrix.package }})\nif [[ \"${{ github.event.inputs.force }}\" == \"true\" ]]; then\n ARGS+=(--force)\nfi\n./scripts/build-chain.sh \"${ARGS[@]}\"\n" | |
| - name: Find new RPMs | |
| id: find-rpms | |
| run: 'mkdir -p new-rpms | |
| find local-repo -name "*.rpm" -newer .build-marker -exec cp {} new-rpms/ \; | |
| count=$(ls -1 new-rpms/*.rpm 2>/dev/null | wc -l) | |
| echo "count=$count" >> $GITHUB_OUTPUT | |
| ' | |
| - name: Upload RPMs | |
| if: steps.find-rpms.outputs.count > '0' | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: rpms-icu-full-${{ strategy.job-index }} | |
| path: new-rpms/*.rpm | |
| retention-days: 1 | |
| consolidate-icu-full: | |
| needs: build-icu-full | |
| if: ${{ !cancelled() }} | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Install createrepo_c | |
| run: sudo apt-get update -q && sudo apt-get install -y -q createrepo-c | |
| - name: Download previous repo | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: repo-2 | |
| path: local-repo | |
| - name: Download new RPMs | |
| uses: actions/download-artifact@v4 | |
| continue-on-error: true | |
| with: | |
| pattern: rpms-icu-full-* | |
| path: local-repo | |
| merge-multiple: true | |
| - name: Update repo | |
| run: createrepo_c --update local-repo | |
| - name: Upload new RPMs to R2 | |
| run: | | |
| sudo apt-get install -y -q rclone | |
| mkdir -p ~/.config/rclone | |
| cat > ~/.config/rclone/rclone.conf << EOF | |
| [r2] | |
| type = s3 | |
| provider = Cloudflare | |
| access_key_id = ${{ secrets.R2_ACCESS_KEY_ID }} | |
| secret_access_key = ${{ secrets.R2_SECRET_ACCESS_KEY }} | |
| endpoint = https://${{ secrets.CLOUDFLARE_ACCOUNT_ID }}.r2.cloudflarestorage.com | |
| EOF | |
| rclone copy local-repo/ "r2:${R2_BUCKET}/repo/10-stream-x86_64/" --exclude "repodata/**" | |
| - name: Upload updated repo | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: repo-3 | |
| path: local-repo | |
| retention-days: 1 | |
| build-glib2-bootstrap: | |
| needs: consolidate-icu-full | |
| runs-on: ubuntu-latest | |
| if: ${{ !cancelled() }} | |
| container: | |
| image: quay.io/centos/centos:stream10 | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| package: | |
| - src/gnome-50/glib2 | |
| steps: | |
| - name: Install build tools | |
| run: | | |
| dnf install -y git rpm-build rpmdevtools createrepo_c python3-pyyaml | |
| dnf install -y epel-release || true | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| with: | |
| submodules: recursive | |
| - name: Download previous repo | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: repo-3 | |
| path: local-repo | |
| - name: Set up local repo | |
| run: | | |
| createrepo_c local-repo | |
| cat > /etc/yum.repos.d/local-build.repo << EOF | |
| [local-build] | |
| name=Local Build Repo | |
| baseurl=file://${GITHUB_WORKSPACE}/local-repo | |
| enabled=1 | |
| gpgcheck=0 | |
| priority=1 | |
| module_hotfixes=1 | |
| EOF | |
| dnf makecache --repo local-build || true | |
| - name: Restore source cache | |
| uses: actions/cache@v4 | |
| with: | |
| path: ${{ env.RPM_SOURCES_CACHE }} | |
| key: sources-${{ matrix.package }}-${{ hashFiles(format('{0}/*.spec', matrix.package)) }} | |
| restore-keys: | | |
| sources-${{ matrix.package }}- | |
| - name: Build package | |
| run: "touch .build-marker\nARGS=(--backend native --package ${{ matrix.package }})\nif [[ \"${{ github.event.inputs.force }}\" == \"true\" ]]; then\n ARGS+=(--force)\nfi\n./scripts/build-chain.sh \"${ARGS[@]}\"\n" | |
| - name: Find new RPMs | |
| id: find-rpms | |
| run: 'mkdir -p new-rpms | |
| find local-repo -name "*.rpm" -newer .build-marker -exec cp {} new-rpms/ \; | |
| count=$(ls -1 new-rpms/*.rpm 2>/dev/null | wc -l) | |
| echo "count=$count" >> $GITHUB_OUTPUT | |
| ' | |
| - name: Upload RPMs | |
| if: steps.find-rpms.outputs.count > '0' | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: rpms-glib2-bootstrap-${{ strategy.job-index }} | |
| path: new-rpms/*.rpm | |
| retention-days: 1 | |
| consolidate-glib2-bootstrap: | |
| needs: build-glib2-bootstrap | |
| if: ${{ !cancelled() }} | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Install createrepo_c | |
| run: sudo apt-get update -q && sudo apt-get install -y -q createrepo-c | |
| - name: Download previous repo | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: repo-3 | |
| path: local-repo | |
| - name: Download new RPMs | |
| uses: actions/download-artifact@v4 | |
| continue-on-error: true | |
| with: | |
| pattern: rpms-glib2-bootstrap-* | |
| path: local-repo | |
| merge-multiple: true | |
| - name: Update repo | |
| run: createrepo_c --update local-repo | |
| - name: Upload new RPMs to R2 | |
| run: | | |
| sudo apt-get install -y -q rclone | |
| mkdir -p ~/.config/rclone | |
| cat > ~/.config/rclone/rclone.conf << EOF | |
| [r2] | |
| type = s3 | |
| provider = Cloudflare | |
| access_key_id = ${{ secrets.R2_ACCESS_KEY_ID }} | |
| secret_access_key = ${{ secrets.R2_SECRET_ACCESS_KEY }} | |
| endpoint = https://${{ secrets.CLOUDFLARE_ACCOUNT_ID }}.r2.cloudflarestorage.com | |
| EOF | |
| rclone copy local-repo/ "r2:${R2_BUCKET}/repo/10-stream-x86_64/" --exclude "repodata/**" | |
| - name: Upload updated repo | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: repo-4 | |
| path: local-repo | |
| retention-days: 1 | |
| build-gi-bootstrap: | |
| needs: consolidate-glib2-bootstrap | |
| runs-on: ubuntu-latest | |
| if: ${{ !cancelled() }} | |
| container: | |
| image: quay.io/centos/centos:stream10 | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| package: | |
| - src/gnome-50/gobject-introspection | |
| steps: | |
| - name: Install build tools | |
| run: | | |
| dnf install -y git rpm-build rpmdevtools createrepo_c python3-pyyaml | |
| dnf install -y epel-release || true | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| with: | |
| submodules: recursive | |
| - name: Download previous repo | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: repo-4 | |
| path: local-repo | |
| - name: Set up local repo | |
| run: | | |
| createrepo_c local-repo | |
| cat > /etc/yum.repos.d/local-build.repo << EOF | |
| [local-build] | |
| name=Local Build Repo | |
| baseurl=file://${GITHUB_WORKSPACE}/local-repo | |
| enabled=1 | |
| gpgcheck=0 | |
| priority=1 | |
| module_hotfixes=1 | |
| EOF | |
| dnf makecache --repo local-build || true | |
| - name: Restore source cache | |
| uses: actions/cache@v4 | |
| with: | |
| path: ${{ env.RPM_SOURCES_CACHE }} | |
| key: sources-${{ matrix.package }}-${{ hashFiles(format('{0}/*.spec', matrix.package)) }} | |
| restore-keys: | | |
| sources-${{ matrix.package }}- | |
| - name: Build package | |
| run: "touch .build-marker\nARGS=(--backend native --package ${{ matrix.package }})\nif [[ \"${{ github.event.inputs.force }}\" == \"true\" ]]; then\n ARGS+=(--force)\nfi\n./scripts/build-chain.sh \"${ARGS[@]}\"\n" | |
| - name: Find new RPMs | |
| id: find-rpms | |
| run: 'mkdir -p new-rpms | |
| find local-repo -name "*.rpm" -newer .build-marker -exec cp {} new-rpms/ \; | |
| count=$(ls -1 new-rpms/*.rpm 2>/dev/null | wc -l) | |
| echo "count=$count" >> $GITHUB_OUTPUT | |
| ' | |
| - name: Upload RPMs | |
| if: steps.find-rpms.outputs.count > '0' | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: rpms-gi-bootstrap-${{ strategy.job-index }} | |
| path: new-rpms/*.rpm | |
| retention-days: 1 | |
| consolidate-gi-bootstrap: | |
| needs: build-gi-bootstrap | |
| if: ${{ !cancelled() }} | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Install createrepo_c | |
| run: sudo apt-get update -q && sudo apt-get install -y -q createrepo-c | |
| - name: Download previous repo | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: repo-4 | |
| path: local-repo | |
| - name: Download new RPMs | |
| uses: actions/download-artifact@v4 | |
| continue-on-error: true | |
| with: | |
| pattern: rpms-gi-bootstrap-* | |
| path: local-repo | |
| merge-multiple: true | |
| - name: Update repo | |
| run: createrepo_c --update local-repo | |
| - name: Upload new RPMs to R2 | |
| run: | | |
| sudo apt-get install -y -q rclone | |
| mkdir -p ~/.config/rclone | |
| cat > ~/.config/rclone/rclone.conf << EOF | |
| [r2] | |
| type = s3 | |
| provider = Cloudflare | |
| access_key_id = ${{ secrets.R2_ACCESS_KEY_ID }} | |
| secret_access_key = ${{ secrets.R2_SECRET_ACCESS_KEY }} | |
| endpoint = https://${{ secrets.CLOUDFLARE_ACCOUNT_ID }}.r2.cloudflarestorage.com | |
| EOF | |
| rclone copy local-repo/ "r2:${R2_BUCKET}/repo/10-stream-x86_64/" --exclude "repodata/**" | |
| - name: Upload updated repo | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: repo-5 | |
| path: local-repo | |
| retention-days: 1 | |
| build-glib2-full: | |
| needs: consolidate-gi-bootstrap | |
| runs-on: ubuntu-latest | |
| if: ${{ !cancelled() }} | |
| container: | |
| image: quay.io/centos/centos:stream10 | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| package: | |
| - src/gnome-50/glib2 | |
| steps: | |
| - name: Install build tools | |
| run: | | |
| dnf install -y git rpm-build rpmdevtools createrepo_c python3-pyyaml | |
| dnf install -y epel-release || true | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| with: | |
| submodules: recursive | |
| - name: Download previous repo | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: repo-5 | |
| path: local-repo | |
| - name: Set up local repo | |
| run: | | |
| createrepo_c local-repo | |
| cat > /etc/yum.repos.d/local-build.repo << EOF | |
| [local-build] | |
| name=Local Build Repo | |
| baseurl=file://${GITHUB_WORKSPACE}/local-repo | |
| enabled=1 | |
| gpgcheck=0 | |
| priority=1 | |
| module_hotfixes=1 | |
| EOF | |
| dnf makecache --repo local-build || true | |
| - name: Restore source cache | |
| uses: actions/cache@v4 | |
| with: | |
| path: ${{ env.RPM_SOURCES_CACHE }} | |
| key: sources-${{ matrix.package }}-${{ hashFiles(format('{0}/*.spec', matrix.package)) }} | |
| restore-keys: | | |
| sources-${{ matrix.package }}- | |
| - name: Build package | |
| run: "touch .build-marker\nARGS=(--backend native --package ${{ matrix.package }})\nif [[ \"${{ github.event.inputs.force }}\" == \"true\" ]]; then\n ARGS+=(--force)\nfi\n./scripts/build-chain.sh \"${ARGS[@]}\"\n" | |
| - name: Find new RPMs | |
| id: find-rpms | |
| run: 'mkdir -p new-rpms | |
| find local-repo -name "*.rpm" -newer .build-marker -exec cp {} new-rpms/ \; | |
| count=$(ls -1 new-rpms/*.rpm 2>/dev/null | wc -l) | |
| echo "count=$count" >> $GITHUB_OUTPUT | |
| ' | |
| - name: Upload RPMs | |
| if: steps.find-rpms.outputs.count > '0' | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: rpms-glib2-full-${{ strategy.job-index }} | |
| path: new-rpms/*.rpm | |
| retention-days: 1 | |
| consolidate-glib2-full: | |
| needs: build-glib2-full | |
| if: ${{ !cancelled() }} | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Install createrepo_c | |
| run: sudo apt-get update -q && sudo apt-get install -y -q createrepo-c | |
| - name: Download previous repo | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: repo-5 | |
| path: local-repo | |
| - name: Download new RPMs | |
| uses: actions/download-artifact@v4 | |
| continue-on-error: true | |
| with: | |
| pattern: rpms-glib2-full-* | |
| path: local-repo | |
| merge-multiple: true | |
| - name: Update repo | |
| run: createrepo_c --update local-repo | |
| - name: Upload new RPMs to R2 | |
| run: | | |
| sudo apt-get install -y -q rclone | |
| mkdir -p ~/.config/rclone | |
| cat > ~/.config/rclone/rclone.conf << EOF | |
| [r2] | |
| type = s3 | |
| provider = Cloudflare | |
| access_key_id = ${{ secrets.R2_ACCESS_KEY_ID }} | |
| secret_access_key = ${{ secrets.R2_SECRET_ACCESS_KEY }} | |
| endpoint = https://${{ secrets.CLOUDFLARE_ACCOUNT_ID }}.r2.cloudflarestorage.com | |
| EOF | |
| rclone copy local-repo/ "r2:${R2_BUCKET}/repo/10-stream-x86_64/" --exclude "repodata/**" | |
| - name: Upload updated repo | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: repo-6 | |
| path: local-repo | |
| retention-days: 1 | |
| build-gi-full: | |
| needs: consolidate-glib2-full | |
| runs-on: ubuntu-latest | |
| if: ${{ !cancelled() }} | |
| container: | |
| image: quay.io/centos/centos:stream10 | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| package: | |
| - src/gnome-50/gobject-introspection | |
| steps: | |
| - name: Install build tools | |
| run: | | |
| dnf install -y git rpm-build rpmdevtools createrepo_c python3-pyyaml | |
| dnf install -y epel-release || true | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| with: | |
| submodules: recursive | |
| - name: Download previous repo | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: repo-6 | |
| path: local-repo | |
| - name: Set up local repo | |
| run: | | |
| createrepo_c local-repo | |
| cat > /etc/yum.repos.d/local-build.repo << EOF | |
| [local-build] | |
| name=Local Build Repo | |
| baseurl=file://${GITHUB_WORKSPACE}/local-repo | |
| enabled=1 | |
| gpgcheck=0 | |
| priority=1 | |
| module_hotfixes=1 | |
| EOF | |
| dnf makecache --repo local-build || true | |
| - name: Restore source cache | |
| uses: actions/cache@v4 | |
| with: | |
| path: ${{ env.RPM_SOURCES_CACHE }} | |
| key: sources-${{ matrix.package }}-${{ hashFiles(format('{0}/*.spec', matrix.package)) }} | |
| restore-keys: | | |
| sources-${{ matrix.package }}- | |
| - name: Build package | |
| run: "touch .build-marker\nARGS=(--backend native --package ${{ matrix.package }})\nif [[ \"${{ github.event.inputs.force }}\" == \"true\" ]]; then\n ARGS+=(--force)\nfi\n./scripts/build-chain.sh \"${ARGS[@]}\"\n" | |
| - name: Find new RPMs | |
| id: find-rpms | |
| run: 'mkdir -p new-rpms | |
| find local-repo -name "*.rpm" -newer .build-marker -exec cp {} new-rpms/ \; | |
| count=$(ls -1 new-rpms/*.rpm 2>/dev/null | wc -l) | |
| echo "count=$count" >> $GITHUB_OUTPUT | |
| ' | |
| - name: Upload RPMs | |
| if: steps.find-rpms.outputs.count > '0' | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: rpms-gi-full-${{ strategy.job-index }} | |
| path: new-rpms/*.rpm | |
| retention-days: 1 | |
| consolidate-gi-full: | |
| needs: build-gi-full | |
| if: ${{ !cancelled() }} | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Install createrepo_c | |
| run: sudo apt-get update -q && sudo apt-get install -y -q createrepo-c | |
| - name: Download previous repo | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: repo-6 | |
| path: local-repo | |
| - name: Download new RPMs | |
| uses: actions/download-artifact@v4 | |
| continue-on-error: true | |
| with: | |
| pattern: rpms-gi-full-* | |
| path: local-repo | |
| merge-multiple: true | |
| - name: Update repo | |
| run: createrepo_c --update local-repo | |
| - name: Upload new RPMs to R2 | |
| run: | | |
| sudo apt-get install -y -q rclone | |
| mkdir -p ~/.config/rclone | |
| cat > ~/.config/rclone/rclone.conf << EOF | |
| [r2] | |
| type = s3 | |
| provider = Cloudflare | |
| access_key_id = ${{ secrets.R2_ACCESS_KEY_ID }} | |
| secret_access_key = ${{ secrets.R2_SECRET_ACCESS_KEY }} | |
| endpoint = https://${{ secrets.CLOUDFLARE_ACCOUNT_ID }}.r2.cloudflarestorage.com | |
| EOF | |
| rclone copy local-repo/ "r2:${R2_BUCKET}/repo/10-stream-x86_64/" --exclude "repodata/**" | |
| - name: Upload updated repo | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: repo-7 | |
| path: local-repo | |
| retention-days: 1 | |
| build-low-level-libs: | |
| needs: consolidate-gi-full | |
| runs-on: ubuntu-latest | |
| if: ${{ !cancelled() }} | |
| container: | |
| image: quay.io/centos/centos:stream10 | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| package: | |
| - src/deps/fontconfig | |
| - src/deps/cairo | |
| - src/deps/pango | |
| - src/deps/libei | |
| - src/deps/mozjs140 | |
| - src/deps/pipewire | |
| steps: | |
| - name: Install build tools | |
| run: | | |
| dnf install -y git rpm-build rpmdevtools createrepo_c python3-pyyaml | |
| dnf install -y epel-release || true | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| with: | |
| submodules: recursive | |
| - name: Download previous repo | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: repo-7 | |
| path: local-repo | |
| - name: Set up local repo | |
| run: | | |
| createrepo_c local-repo | |
| cat > /etc/yum.repos.d/local-build.repo << EOF | |
| [local-build] | |
| name=Local Build Repo | |
| baseurl=file://${GITHUB_WORKSPACE}/local-repo | |
| enabled=1 | |
| gpgcheck=0 | |
| priority=1 | |
| module_hotfixes=1 | |
| EOF | |
| dnf makecache --repo local-build || true | |
| - name: Restore source cache | |
| uses: actions/cache@v4 | |
| with: | |
| path: ${{ env.RPM_SOURCES_CACHE }} | |
| key: sources-${{ matrix.package }}-${{ hashFiles(format('{0}/*.spec', matrix.package)) }} | |
| restore-keys: | | |
| sources-${{ matrix.package }}- | |
| - name: Build package | |
| run: "touch .build-marker\nARGS=(--backend native --package ${{ matrix.package }})\nif [[ \"${{ github.event.inputs.force }}\" == \"true\" ]]; then\n ARGS+=(--force)\nfi\n./scripts/build-chain.sh \"${ARGS[@]}\"\n" | |
| - name: Find new RPMs | |
| id: find-rpms | |
| run: 'mkdir -p new-rpms | |
| find local-repo -name "*.rpm" -newer .build-marker -exec cp {} new-rpms/ \; | |
| count=$(ls -1 new-rpms/*.rpm 2>/dev/null | wc -l) | |
| echo "count=$count" >> $GITHUB_OUTPUT | |
| ' | |
| - name: Upload RPMs | |
| if: steps.find-rpms.outputs.count > '0' | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: rpms-low-level-libs-${{ strategy.job-index }} | |
| path: new-rpms/*.rpm | |
| retention-days: 1 | |
| consolidate-low-level-libs: | |
| needs: build-low-level-libs | |
| if: ${{ !cancelled() }} | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Install createrepo_c | |
| run: sudo apt-get update -q && sudo apt-get install -y -q createrepo-c | |
| - name: Download previous repo | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: repo-7 | |
| path: local-repo | |
| - name: Download new RPMs | |
| uses: actions/download-artifact@v4 | |
| continue-on-error: true | |
| with: | |
| pattern: rpms-low-level-libs-* | |
| path: local-repo | |
| merge-multiple: true | |
| - name: Update repo | |
| run: createrepo_c --update local-repo | |
| - name: Upload new RPMs to R2 | |
| run: | | |
| sudo apt-get install -y -q rclone | |
| mkdir -p ~/.config/rclone | |
| cat > ~/.config/rclone/rclone.conf << EOF | |
| [r2] | |
| type = s3 | |
| provider = Cloudflare | |
| access_key_id = ${{ secrets.R2_ACCESS_KEY_ID }} | |
| secret_access_key = ${{ secrets.R2_SECRET_ACCESS_KEY }} | |
| endpoint = https://${{ secrets.CLOUDFLARE_ACCOUNT_ID }}.r2.cloudflarestorage.com | |
| EOF | |
| rclone copy local-repo/ "r2:${R2_BUCKET}/repo/10-stream-x86_64/" --exclude "repodata/**" | |
| - name: Upload updated repo | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: repo-8 | |
| path: local-repo | |
| retention-days: 1 | |
| build-gjs: | |
| needs: consolidate-low-level-libs | |
| runs-on: ubuntu-latest | |
| if: ${{ !cancelled() }} | |
| container: | |
| image: quay.io/centos/centos:stream10 | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| package: | |
| - src/gnome-50/gjs | |
| steps: | |
| - name: Install build tools | |
| run: | | |
| dnf install -y git rpm-build rpmdevtools createrepo_c python3-pyyaml | |
| dnf install -y epel-release || true | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| with: | |
| submodules: recursive | |
| - name: Download previous repo | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: repo-8 | |
| path: local-repo | |
| - name: Set up local repo | |
| run: | | |
| createrepo_c local-repo | |
| cat > /etc/yum.repos.d/local-build.repo << EOF | |
| [local-build] | |
| name=Local Build Repo | |
| baseurl=file://${GITHUB_WORKSPACE}/local-repo | |
| enabled=1 | |
| gpgcheck=0 | |
| priority=1 | |
| module_hotfixes=1 | |
| EOF | |
| dnf makecache --repo local-build || true | |
| - name: Restore source cache | |
| uses: actions/cache@v4 | |
| with: | |
| path: ${{ env.RPM_SOURCES_CACHE }} | |
| key: sources-${{ matrix.package }}-${{ hashFiles(format('{0}/*.spec', matrix.package)) }} | |
| restore-keys: | | |
| sources-${{ matrix.package }}- | |
| - name: Build package | |
| run: "touch .build-marker\nARGS=(--backend native --package ${{ matrix.package }})\nif [[ \"${{ github.event.inputs.force }}\" == \"true\" ]]; then\n ARGS+=(--force)\nfi\n./scripts/build-chain.sh \"${ARGS[@]}\"\n" | |
| - name: Find new RPMs | |
| id: find-rpms | |
| run: 'mkdir -p new-rpms | |
| find local-repo -name "*.rpm" -newer .build-marker -exec cp {} new-rpms/ \; | |
| count=$(ls -1 new-rpms/*.rpm 2>/dev/null | wc -l) | |
| echo "count=$count" >> $GITHUB_OUTPUT | |
| ' | |
| - name: Upload RPMs | |
| if: steps.find-rpms.outputs.count > '0' | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: rpms-gjs-${{ strategy.job-index }} | |
| path: new-rpms/*.rpm | |
| retention-days: 1 | |
| consolidate-gjs: | |
| needs: build-gjs | |
| if: ${{ !cancelled() }} | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Install createrepo_c | |
| run: sudo apt-get update -q && sudo apt-get install -y -q createrepo-c | |
| - name: Download previous repo | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: repo-8 | |
| path: local-repo | |
| - name: Download new RPMs | |
| uses: actions/download-artifact@v4 | |
| continue-on-error: true | |
| with: | |
| pattern: rpms-gjs-* | |
| path: local-repo | |
| merge-multiple: true | |
| - name: Update repo | |
| run: createrepo_c --update local-repo | |
| - name: Upload new RPMs to R2 | |
| run: | | |
| sudo apt-get install -y -q rclone | |
| mkdir -p ~/.config/rclone | |
| cat > ~/.config/rclone/rclone.conf << EOF | |
| [r2] | |
| type = s3 | |
| provider = Cloudflare | |
| access_key_id = ${{ secrets.R2_ACCESS_KEY_ID }} | |
| secret_access_key = ${{ secrets.R2_SECRET_ACCESS_KEY }} | |
| endpoint = https://${{ secrets.CLOUDFLARE_ACCOUNT_ID }}.r2.cloudflarestorage.com | |
| EOF | |
| rclone copy local-repo/ "r2:${R2_BUCKET}/repo/10-stream-x86_64/" --exclude "repodata/**" | |
| - name: Upload updated repo | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: repo-9 | |
| path: local-repo | |
| retention-days: 1 | |
| build-gtk-layer: | |
| needs: consolidate-gjs | |
| runs-on: ubuntu-latest | |
| if: ${{ !cancelled() }} | |
| container: | |
| image: quay.io/centos/centos:stream10 | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| package: | |
| - src/gnome-50/gsettings-desktop-schemas | |
| - src/deps/gtk4 | |
| - src/deps/glycin | |
| steps: | |
| - name: Install build tools | |
| run: | | |
| dnf install -y git rpm-build rpmdevtools createrepo_c python3-pyyaml | |
| dnf install -y epel-release || true | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| with: | |
| submodules: recursive | |
| - name: Download previous repo | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: repo-9 | |
| path: local-repo | |
| - name: Set up local repo | |
| run: | | |
| createrepo_c local-repo | |
| cat > /etc/yum.repos.d/local-build.repo << EOF | |
| [local-build] | |
| name=Local Build Repo | |
| baseurl=file://${GITHUB_WORKSPACE}/local-repo | |
| enabled=1 | |
| gpgcheck=0 | |
| priority=1 | |
| module_hotfixes=1 | |
| EOF | |
| dnf makecache --repo local-build || true | |
| - name: Restore source cache | |
| uses: actions/cache@v4 | |
| with: | |
| path: ${{ env.RPM_SOURCES_CACHE }} | |
| key: sources-${{ matrix.package }}-${{ hashFiles(format('{0}/*.spec', matrix.package)) }} | |
| restore-keys: | | |
| sources-${{ matrix.package }}- | |
| - name: Build package | |
| run: "touch .build-marker\nARGS=(--backend native --package ${{ matrix.package }})\nif [[ \"${{ github.event.inputs.force }}\" == \"true\" ]]; then\n ARGS+=(--force)\nfi\n./scripts/build-chain.sh \"${ARGS[@]}\"\n" | |
| - name: Find new RPMs | |
| id: find-rpms | |
| run: 'mkdir -p new-rpms | |
| find local-repo -name "*.rpm" -newer .build-marker -exec cp {} new-rpms/ \; | |
| count=$(ls -1 new-rpms/*.rpm 2>/dev/null | wc -l) | |
| echo "count=$count" >> $GITHUB_OUTPUT | |
| ' | |
| - name: Upload RPMs | |
| if: steps.find-rpms.outputs.count > '0' | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: rpms-gtk-layer-${{ strategy.job-index }} | |
| path: new-rpms/*.rpm | |
| retention-days: 1 | |
| consolidate-gtk-layer: | |
| needs: build-gtk-layer | |
| if: ${{ !cancelled() }} | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Install createrepo_c | |
| run: sudo apt-get update -q && sudo apt-get install -y -q createrepo-c | |
| - name: Download previous repo | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: repo-9 | |
| path: local-repo | |
| - name: Download new RPMs | |
| uses: actions/download-artifact@v4 | |
| continue-on-error: true | |
| with: | |
| pattern: rpms-gtk-layer-* | |
| path: local-repo | |
| merge-multiple: true | |
| - name: Update repo | |
| run: createrepo_c --update local-repo | |
| - name: Upload new RPMs to R2 | |
| run: | | |
| sudo apt-get install -y -q rclone | |
| mkdir -p ~/.config/rclone | |
| cat > ~/.config/rclone/rclone.conf << EOF | |
| [r2] | |
| type = s3 | |
| provider = Cloudflare | |
| access_key_id = ${{ secrets.R2_ACCESS_KEY_ID }} | |
| secret_access_key = ${{ secrets.R2_SECRET_ACCESS_KEY }} | |
| endpoint = https://${{ secrets.CLOUDFLARE_ACCOUNT_ID }}.r2.cloudflarestorage.com | |
| EOF | |
| rclone copy local-repo/ "r2:${R2_BUCKET}/repo/10-stream-x86_64/" --exclude "repodata/**" | |
| - name: Upload updated repo | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: repo-10 | |
| path: local-repo | |
| retention-days: 1 | |
| build-libadwaita: | |
| needs: consolidate-gtk-layer | |
| runs-on: ubuntu-latest | |
| if: ${{ !cancelled() }} | |
| container: | |
| image: quay.io/centos/centos:stream10 | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| package: | |
| - src/gnome-50/libadwaita | |
| - src/gnome-50/xdg-desktop-portal | |
| - src/gnome-50/nautilus | |
| steps: | |
| - name: Install build tools | |
| run: | | |
| dnf install -y git rpm-build rpmdevtools createrepo_c python3-pyyaml | |
| dnf install -y epel-release || true | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| with: | |
| submodules: recursive | |
| - name: Download previous repo | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: repo-10 | |
| path: local-repo | |
| - name: Set up local repo | |
| run: | | |
| createrepo_c local-repo | |
| cat > /etc/yum.repos.d/local-build.repo << EOF | |
| [local-build] | |
| name=Local Build Repo | |
| baseurl=file://${GITHUB_WORKSPACE}/local-repo | |
| enabled=1 | |
| gpgcheck=0 | |
| priority=1 | |
| module_hotfixes=1 | |
| EOF | |
| dnf makecache --repo local-build || true | |
| - name: Restore source cache | |
| uses: actions/cache@v4 | |
| with: | |
| path: ${{ env.RPM_SOURCES_CACHE }} | |
| key: sources-${{ matrix.package }}-${{ hashFiles(format('{0}/*.spec', matrix.package)) }} | |
| restore-keys: | | |
| sources-${{ matrix.package }}- | |
| - name: Build package | |
| run: "touch .build-marker\nARGS=(--backend native --package ${{ matrix.package }})\nif [[ \"${{ github.event.inputs.force }}\" == \"true\" ]]; then\n ARGS+=(--force)\nfi\n./scripts/build-chain.sh \"${ARGS[@]}\"\n" | |
| - name: Find new RPMs | |
| id: find-rpms | |
| run: 'mkdir -p new-rpms | |
| find local-repo -name "*.rpm" -newer .build-marker -exec cp {} new-rpms/ \; | |
| count=$(ls -1 new-rpms/*.rpm 2>/dev/null | wc -l) | |
| echo "count=$count" >> $GITHUB_OUTPUT | |
| ' | |
| - name: Upload RPMs | |
| if: steps.find-rpms.outputs.count > '0' | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: rpms-libadwaita-${{ strategy.job-index }} | |
| path: new-rpms/*.rpm | |
| retention-days: 1 | |
| consolidate-libadwaita: | |
| needs: build-libadwaita | |
| if: ${{ !cancelled() }} | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Install createrepo_c | |
| run: sudo apt-get update -q && sudo apt-get install -y -q createrepo-c | |
| - name: Download previous repo | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: repo-10 | |
| path: local-repo | |
| - name: Download new RPMs | |
| uses: actions/download-artifact@v4 | |
| continue-on-error: true | |
| with: | |
| pattern: rpms-libadwaita-* | |
| path: local-repo | |
| merge-multiple: true | |
| - name: Update repo | |
| run: createrepo_c --update local-repo | |
| - name: Upload new RPMs to R2 | |
| run: | | |
| sudo apt-get install -y -q rclone | |
| mkdir -p ~/.config/rclone | |
| cat > ~/.config/rclone/rclone.conf << EOF | |
| [r2] | |
| type = s3 | |
| provider = Cloudflare | |
| access_key_id = ${{ secrets.R2_ACCESS_KEY_ID }} | |
| secret_access_key = ${{ secrets.R2_SECRET_ACCESS_KEY }} | |
| endpoint = https://${{ secrets.CLOUDFLARE_ACCOUNT_ID }}.r2.cloudflarestorage.com | |
| EOF | |
| rclone copy local-repo/ "r2:${R2_BUCKET}/repo/10-stream-x86_64/" --exclude "repodata/**" | |
| - name: Upload updated repo | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: repo-11 | |
| path: local-repo | |
| retention-days: 1 | |
| build-compositor: | |
| needs: consolidate-libadwaita | |
| runs-on: ubuntu-latest | |
| if: ${{ !cancelled() }} | |
| container: | |
| image: quay.io/centos/centos:stream10 | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| package: | |
| - src/gnome-50/mutter | |
| - src/gnome-50/xdg-desktop-portal-gnome | |
| steps: | |
| - name: Install build tools | |
| run: | | |
| dnf install -y git rpm-build rpmdevtools createrepo_c python3-pyyaml | |
| dnf install -y epel-release || true | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| with: | |
| submodules: recursive | |
| - name: Download previous repo | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: repo-11 | |
| path: local-repo | |
| - name: Set up local repo | |
| run: | | |
| createrepo_c local-repo | |
| cat > /etc/yum.repos.d/local-build.repo << EOF | |
| [local-build] | |
| name=Local Build Repo | |
| baseurl=file://${GITHUB_WORKSPACE}/local-repo | |
| enabled=1 | |
| gpgcheck=0 | |
| priority=1 | |
| module_hotfixes=1 | |
| EOF | |
| dnf makecache --repo local-build || true | |
| - name: Restore source cache | |
| uses: actions/cache@v4 | |
| with: | |
| path: ${{ env.RPM_SOURCES_CACHE }} | |
| key: sources-${{ matrix.package }}-${{ hashFiles(format('{0}/*.spec', matrix.package)) }} | |
| restore-keys: | | |
| sources-${{ matrix.package }}- | |
| - name: Build package | |
| run: "touch .build-marker\nARGS=(--backend native --package ${{ matrix.package }})\nif [[ \"${{ github.event.inputs.force }}\" == \"true\" ]]; then\n ARGS+=(--force)\nfi\n./scripts/build-chain.sh \"${ARGS[@]}\"\n" | |
| - name: Find new RPMs | |
| id: find-rpms | |
| run: 'mkdir -p new-rpms | |
| find local-repo -name "*.rpm" -newer .build-marker -exec cp {} new-rpms/ \; | |
| count=$(ls -1 new-rpms/*.rpm 2>/dev/null | wc -l) | |
| echo "count=$count" >> $GITHUB_OUTPUT | |
| ' | |
| - name: Upload RPMs | |
| if: steps.find-rpms.outputs.count > '0' | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: rpms-compositor-${{ strategy.job-index }} | |
| path: new-rpms/*.rpm | |
| retention-days: 1 | |
| consolidate-compositor: | |
| needs: build-compositor | |
| if: ${{ !cancelled() }} | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Install createrepo_c | |
| run: sudo apt-get update -q && sudo apt-get install -y -q createrepo-c | |
| - name: Download previous repo | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: repo-11 | |
| path: local-repo | |
| - name: Download new RPMs | |
| uses: actions/download-artifact@v4 | |
| continue-on-error: true | |
| with: | |
| pattern: rpms-compositor-* | |
| path: local-repo | |
| merge-multiple: true | |
| - name: Update repo | |
| run: createrepo_c --update local-repo | |
| - name: Upload new RPMs to R2 | |
| run: | | |
| sudo apt-get install -y -q rclone | |
| mkdir -p ~/.config/rclone | |
| cat > ~/.config/rclone/rclone.conf << EOF | |
| [r2] | |
| type = s3 | |
| provider = Cloudflare | |
| access_key_id = ${{ secrets.R2_ACCESS_KEY_ID }} | |
| secret_access_key = ${{ secrets.R2_SECRET_ACCESS_KEY }} | |
| endpoint = https://${{ secrets.CLOUDFLARE_ACCOUNT_ID }}.r2.cloudflarestorage.com | |
| EOF | |
| rclone copy local-repo/ "r2:${R2_BUCKET}/repo/10-stream-x86_64/" --exclude "repodata/**" | |
| - name: Upload updated repo | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: repo-12 | |
| path: local-repo | |
| retention-days: 1 | |
| build-shell: | |
| needs: consolidate-compositor | |
| runs-on: ubuntu-latest | |
| if: ${{ !cancelled() }} | |
| container: | |
| image: quay.io/centos/centos:stream10 | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| package: | |
| - src/gnome-50/gnome-shell | |
| - src/gnome-50/gnome-settings-daemon | |
| steps: | |
| - name: Install build tools | |
| run: | | |
| dnf install -y git rpm-build rpmdevtools createrepo_c python3-pyyaml | |
| dnf install -y epel-release || true | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| with: | |
| submodules: recursive | |
| - name: Download previous repo | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: repo-12 | |
| path: local-repo | |
| - name: Set up local repo | |
| run: | | |
| createrepo_c local-repo | |
| cat > /etc/yum.repos.d/local-build.repo << EOF | |
| [local-build] | |
| name=Local Build Repo | |
| baseurl=file://${GITHUB_WORKSPACE}/local-repo | |
| enabled=1 | |
| gpgcheck=0 | |
| priority=1 | |
| module_hotfixes=1 | |
| EOF | |
| dnf makecache --repo local-build || true | |
| - name: Restore source cache | |
| uses: actions/cache@v4 | |
| with: | |
| path: ${{ env.RPM_SOURCES_CACHE }} | |
| key: sources-${{ matrix.package }}-${{ hashFiles(format('{0}/*.spec', matrix.package)) }} | |
| restore-keys: | | |
| sources-${{ matrix.package }}- | |
| - name: Build package | |
| run: "touch .build-marker\nARGS=(--backend native --package ${{ matrix.package }})\nif [[ \"${{ github.event.inputs.force }}\" == \"true\" ]]; then\n ARGS+=(--force)\nfi\n./scripts/build-chain.sh \"${ARGS[@]}\"\n" | |
| - name: Find new RPMs | |
| id: find-rpms | |
| run: 'mkdir -p new-rpms | |
| find local-repo -name "*.rpm" -newer .build-marker -exec cp {} new-rpms/ \; | |
| count=$(ls -1 new-rpms/*.rpm 2>/dev/null | wc -l) | |
| echo "count=$count" >> $GITHUB_OUTPUT | |
| ' | |
| - name: Upload RPMs | |
| if: steps.find-rpms.outputs.count > '0' | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: rpms-shell-${{ strategy.job-index }} | |
| path: new-rpms/*.rpm | |
| retention-days: 1 | |
| consolidate-shell: | |
| needs: build-shell | |
| if: ${{ !cancelled() }} | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Install createrepo_c | |
| run: sudo apt-get update -q && sudo apt-get install -y -q createrepo-c | |
| - name: Download previous repo | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: repo-12 | |
| path: local-repo | |
| - name: Download new RPMs | |
| uses: actions/download-artifact@v4 | |
| continue-on-error: true | |
| with: | |
| pattern: rpms-shell-* | |
| path: local-repo | |
| merge-multiple: true | |
| - name: Update repo | |
| run: createrepo_c --update local-repo | |
| - name: Upload new RPMs to R2 | |
| run: | | |
| sudo apt-get install -y -q rclone | |
| mkdir -p ~/.config/rclone | |
| cat > ~/.config/rclone/rclone.conf << EOF | |
| [r2] | |
| type = s3 | |
| provider = Cloudflare | |
| access_key_id = ${{ secrets.R2_ACCESS_KEY_ID }} | |
| secret_access_key = ${{ secrets.R2_SECRET_ACCESS_KEY }} | |
| endpoint = https://${{ secrets.CLOUDFLARE_ACCOUNT_ID }}.r2.cloudflarestorage.com | |
| EOF | |
| rclone copy local-repo/ "r2:${R2_BUCKET}/repo/10-stream-x86_64/" --exclude "repodata/**" | |
| - name: Upload updated repo | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: repo-13 | |
| path: local-repo | |
| retention-days: 1 | |
| build-session: | |
| needs: consolidate-shell | |
| runs-on: ubuntu-latest | |
| if: ${{ !cancelled() }} | |
| container: | |
| image: quay.io/centos/centos:stream10 | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| package: | |
| - src/gnome-50/gnome-session | |
| - src/gnome-50/gnome-control-center | |
| - src/gnome-50/gdm | |
| steps: | |
| - name: Install build tools | |
| run: | | |
| dnf install -y git rpm-build rpmdevtools createrepo_c python3-pyyaml | |
| dnf install -y epel-release || true | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| with: | |
| submodules: recursive | |
| - name: Download previous repo | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: repo-13 | |
| path: local-repo | |
| - name: Set up local repo | |
| run: | | |
| createrepo_c local-repo | |
| cat > /etc/yum.repos.d/local-build.repo << EOF | |
| [local-build] | |
| name=Local Build Repo | |
| baseurl=file://${GITHUB_WORKSPACE}/local-repo | |
| enabled=1 | |
| gpgcheck=0 | |
| priority=1 | |
| module_hotfixes=1 | |
| EOF | |
| dnf makecache --repo local-build || true | |
| - name: Restore source cache | |
| uses: actions/cache@v4 | |
| with: | |
| path: ${{ env.RPM_SOURCES_CACHE }} | |
| key: sources-${{ matrix.package }}-${{ hashFiles(format('{0}/*.spec', matrix.package)) }} | |
| restore-keys: | | |
| sources-${{ matrix.package }}- | |
| - name: Build package | |
| run: "touch .build-marker\nARGS=(--backend native --package ${{ matrix.package }})\nif [[ \"${{ github.event.inputs.force }}\" == \"true\" ]]; then\n ARGS+=(--force)\nfi\n./scripts/build-chain.sh \"${ARGS[@]}\"\n" | |
| - name: Find new RPMs | |
| id: find-rpms | |
| run: 'mkdir -p new-rpms | |
| find local-repo -name "*.rpm" -newer .build-marker -exec cp {} new-rpms/ \; | |
| count=$(ls -1 new-rpms/*.rpm 2>/dev/null | wc -l) | |
| echo "count=$count" >> $GITHUB_OUTPUT | |
| ' | |
| - name: Upload RPMs | |
| if: steps.find-rpms.outputs.count > '0' | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: rpms-session-${{ strategy.job-index }} | |
| path: new-rpms/*.rpm | |
| retention-days: 1 | |
| consolidate-session: | |
| needs: build-session | |
| if: ${{ !cancelled() }} | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Install createrepo_c | |
| run: sudo apt-get update -q && sudo apt-get install -y -q createrepo-c | |
| - name: Download previous repo | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: repo-13 | |
| path: local-repo | |
| - name: Download new RPMs | |
| uses: actions/download-artifact@v4 | |
| continue-on-error: true | |
| with: | |
| pattern: rpms-session-* | |
| path: local-repo | |
| merge-multiple: true | |
| - name: Update repo | |
| run: createrepo_c --update local-repo | |
| - name: Upload new RPMs to R2 | |
| run: | | |
| sudo apt-get install -y -q rclone | |
| mkdir -p ~/.config/rclone | |
| cat > ~/.config/rclone/rclone.conf << EOF | |
| [r2] | |
| type = s3 | |
| provider = Cloudflare | |
| access_key_id = ${{ secrets.R2_ACCESS_KEY_ID }} | |
| secret_access_key = ${{ secrets.R2_SECRET_ACCESS_KEY }} | |
| endpoint = https://${{ secrets.CLOUDFLARE_ACCOUNT_ID }}.r2.cloudflarestorage.com | |
| EOF | |
| rclone copy local-repo/ "r2:${R2_BUCKET}/repo/10-stream-x86_64/" --exclude "repodata/**" | |
| - name: Upload updated repo | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: repo-14 | |
| path: local-repo | |
| retention-days: 1 | |
| publish: | |
| needs: consolidate-session | |
| if: ${{ !cancelled() }} | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Install dependencies | |
| run: 'sudo apt-get update -q && sudo apt-get install -y -q rpm createrepo-c gpg gpgconf | |
| curl -fsSL https://rclone.org/install.sh | sudo bash | |
| ' | |
| - name: Download final repo | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: repo-14 | |
| path: local-repo | |
| - name: Import GPG key | |
| uses: crazy-max/ghaction-import-gpg@v6 | |
| with: | |
| gpg_private_key: ${{ secrets.GPG_PRIVATE_KEY }} | |
| passphrase: ${{ secrets.GPG_PASSPHRASE }} | |
| git_committer_name: RPM Builder | |
| git_committer_email: rpm-signing@tunaos.org | |
| - name: Sign RPMs | |
| run: 'find local-repo -name "*.rpm" -exec rpmsign --addsign {} \; | |
| createrepo_c --update local-repo | |
| ' | |
| - name: Configure rclone | |
| run: 'mkdir -p ~/.config/rclone | |
| cat > ~/.config/rclone/rclone.conf << EOF | |
| [r2] | |
| type = s3 | |
| provider = Cloudflare | |
| access_key_id = ${{ secrets.R2_ACCESS_KEY_ID }} | |
| secret_access_key = ${{ secrets.R2_SECRET_ACCESS_KEY }} | |
| endpoint = https://${{ secrets.CLOUDFLARE_ACCOUNT_ID }}.r2.cloudflarestorage.com | |
| EOF | |
| ' | |
| - name: Upload to R2 | |
| run: 'echo "Uploading to 10-stream-x86_64..." | |
| rclone sync local-repo/ "r2:${R2_BUCKET}/repo/10-stream-x86_64/" | |
| echo "Uploading to 10-x86_64..." | |
| rclone sync local-repo/ "r2:${R2_BUCKET}/repo/10-x86_64/" | |
| rclone copyto public.gpg "r2:${R2_BUCKET}/public.gpg" | |
| ' |