:: commit bcb6476d020a0bbd5b8baf05c8cb3633c3d9c8cf

Mintsuki <mintsuki@protonmail.com> — 2025-08-30 11:38

parents: c7b80ff1ef

ci: Update workflows for Codeberg migration

diff --git a/.github/workflows/release.yml b/.forgejo/workflows/binary-release.yml
similarity index 59%
rename from .github/workflows/release.yml
rename to .forgejo/workflows/binary-release.yml
index ed7a1b6f..5f697c60 100644
--- a/.github/workflows/release.yml
+++ b/.forgejo/workflows/binary-release.yml
@@ -1,4 +1,4 @@
-name: Release
+name: Binary release
 
 on:
   push:
@@ -7,11 +7,17 @@ on:
 
 jobs:
   build:
-    name: Build and upload artifacts
-    runs-on: ubuntu-latest
+    name: Build and upload binary artifacts
+    runs-on: codeberg-tiny
     container: archlinux:latest
 
     steps:
+      - name: Create resolv.conf
+        run: |
+          set -ex
+          echo 'nameserver 8.8.8.8' >/etc/resolv.conf
+          echo 'nameserver 8.8.4.4' >>/etc/resolv.conf
+
       - name: Install dependencies
         run: pacman --noconfirm -Syu && pacman --needed --noconfirm -S base-devel gnupg gzip bzip2 lzip zstd git autoconf automake nasm curl mtools llvm clang lld mingw-w64-gcc
 
@@ -24,23 +30,23 @@ jobs:
           MINTSUKI_PRIVATE_KEY: ${{ secrets.MINTSUKI_PRIVATE_KEY }}
 
       - name: Checkout code
-        uses: actions/checkout@v5
+        uses: https://code.forgejo.org/actions/checkout@v5
         with:
           fetch-depth: '0'
 
       - name: Git config
         run: |
           set -e
-          git config --global --add safe.directory "$GITHUB_WORKSPACE"
+          git config --global --add safe.directory "$FORGEJO_WORKSPACE"
           git config --global user.name 'Mintsuki'
           git config --global user.email 'mintsuki@protonmail.com'
           git config --global user.signingkey 05D29860D0A0668AAEFB9D691F3C021BECA23821
 
       - name: Get tag name
-        run: echo "TAG_NAME=$(git describe --exact-match --tags $(git log -n1 --pretty='%h'))" >> $GITHUB_ENV
+        run: echo "TAG_NAME=$(git describe --exact-match --tags $(git log -n1 --pretty='%h'))" >> $FORGEJO_ENV
 
       - name: Get branch name
-        run: echo "BRANCH_NAME=$(echo "$TAG_NAME" | grep -o 'v[0-9]\+\.')x" >> $GITHUB_ENV
+        run: echo "BRANCH_NAME=$(echo "$TAG_NAME" | grep -o 'v[0-9]\+\.')x" >> $FORGEJO_ENV
 
       - name: Regenerate
         run: ./bootstrap
@@ -52,7 +58,7 @@ jobs:
         run: cd build && ../configure --enable-all
 
       - name: Build the bootloader
-        run: make -C build
+        run: make -C build -j$(nproc)
 
       - name: Clean limine
         run: rm build/bin/limine
@@ -78,7 +84,7 @@ jobs:
       - name: Push binaries to binary branch
         run: |
           set -e
-          git remote set-url origin https://x-access-token:${{ secrets.GITHUB_TOKEN }}@github.com/limine-bootloader/limine.git
+          git remote set-url origin https://x-access-token:${{ secrets.FORGEJO_TOKEN }}@codeberg.org/Limine/Limine.git
           git fetch --all
           git checkout $BRANCH_NAME-binary || git checkout --orphan $BRANCH_NAME-binary
           rm -rf $(ls -a | grep -v '^\.git$' | grep -v '^\.\.$' | grep -v '^\.$' | grep -v '^build$')
@@ -89,47 +95,3 @@ jobs:
           git push origin $BRANCH_NAME-binary
           git tag $TAG_NAME-binary -s -m $TAG_NAME-binary
           git push origin $TAG_NAME-binary
-
-      - name: Cleanup source tree
-        run: git checkout $TAG_NAME && rm -rf * && git checkout .
-
-      - name: Package release tarball
-        run: ./bootstrap && ./configure --enable-all && make dist
-
-      - name: Sign release tarball
-        run: |
-          set -e
-          for f in limine-*.tar.*; do \
-            gpg --batch --default-key 05D29860D0A0668AAEFB9D691F3C021BECA23821 --detach-sign $f; \
-          done \
-
-      - name: Create release notes
-        run: |
-          cat <<EOF >rel_notes.txt
-          Changelog can be found [here](https://github.com/limine-bootloader/limine/blob/$TAG_NAME/ChangeLog).
-
-          Binary release can be found [here](https://github.com/limine-bootloader/limine/tree/$TAG_NAME-binary).
-          EOF
-          cat <<'EOF' >>rel_notes.txt
-
-          Tarballs are signed using key ID `05D29860D0A0668AAEFB9D691F3C021BECA23821` which can be obtained from a keyserver such as `keyserver.ubuntu.com`.
-
-          Import the public key with:
-          ```bash
-          gpg --keyserver hkps://keyserver.ubuntu.com --recv-keys 05D29860D0A0668AAEFB9D691F3C021BECA23821
-          ```
-
-          In order to verify the tarball with the given signature, do:
-          ```bash
-          gpg --verify <tarball sig file> <associated tarball>
-          ```
-          EOF
-
-      - name: Release
-        uses: softprops/action-gh-release@v2
-        with:
-          body_path: rel_notes.txt
-          files: |
-            limine-*.tar.*
-        env:
-          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
diff --git a/.forgejo/workflows/check.yml b/.forgejo/workflows/check.yml
new file mode 100644
index 00000000..0653206f
--- /dev/null
+++ b/.forgejo/workflows/check.yml
@@ -0,0 +1,57 @@
+name: Check for compilation failures
+
+on: [push, pull_request]
+
+jobs:
+  build:
+    name: Check for compilation failures
+    runs-on: codeberg-small
+    container: archlinux:latest
+
+    steps:
+      - name: Create resolv.conf
+        run: |
+          set -ex
+          echo 'nameserver 8.8.8.8' >/etc/resolv.conf
+          echo 'nameserver 8.8.4.4' >>/etc/resolv.conf
+
+      - name: Install dependencies
+        run: pacman --noconfirm -Syu && pacman --needed --noconfirm -S base-devel git autoconf automake nasm curl mtools llvm clang lld
+
+      - name: Checkout code
+        uses: https://code.forgejo.org/actions/checkout@v5
+
+      - name: Git config
+        run: git config --global --add safe.directory "$FORGEJO_WORKSPACE"
+
+      - name: Build the bootloader (LLVM, default)
+        run: ./bootstrap && ./configure --enable-werror --enable-all && make all && make maintainer-clean
+
+      - name: Set cross GCC version
+        run: echo "GCC_VERSION=15.2.0" >> $FORGEJO_ENV
+
+      - name: Download GCC cross toolchains
+        run: |
+          set -e
+          for i in aarch64 loongarch64 riscv64 x86_64; do
+            ( curl -Lo x86_64-gcc-${{ env.GCC_VERSION }}-nolibc-$i-linux.tar.gz https://mirrors.edge.kernel.org/pub/tools/crosstool/files/bin/x86_64/${{ env.GCC_VERSION }}/x86_64-gcc-${{ env.GCC_VERSION }}-nolibc-$i-linux.tar.gz && tar -xf x86_64-gcc-${{ env.GCC_VERSION }}-nolibc-$i-linux.tar.gz ) &
+            WAITING_ON_PIDS="$WAITING_ON_PIDS $!"
+          done
+          for pid in $WAITING_ON_PIDS; do
+            wait $pid
+          done
+
+      - name: Bootstrap source
+        run: ./bootstrap
+
+      - name: Build the bootloader (GNU, x86)
+        run: export PATH="$(pwd -P)"/gcc-${{ env.GCC_VERSION }}-nolibc/x86_64-linux/bin:"$PATH" && ./configure TOOLCHAIN_FOR_TARGET=x86_64-linux- --enable-werror --enable-bios --enable-uefi-ia32 --enable-uefi-x86-64 && make all -j$(nproc) && make distclean
+
+      - name: Build the bootloader (GNU, aarch64)
+        run: export PATH="$(pwd -P)"/gcc-${{ env.GCC_VERSION }}-nolibc/aarch64-linux/bin:"$PATH" && ./configure TOOLCHAIN_FOR_TARGET=aarch64-linux- --enable-werror --enable-uefi-aarch64 && make all -j$(nproc) && make distclean
+
+      - name: Build the bootloader (GNU, riscv64)
+        run: export PATH="$(pwd -P)"/gcc-${{ env.GCC_VERSION }}-nolibc/riscv64-linux/bin:"$PATH" && ./configure TOOLCHAIN_FOR_TARGET=riscv64-linux- --enable-werror --enable-uefi-riscv64 && make all -j$(nproc) && make distclean
+
+      - name: Build the bootloader (GNU, loongarch64)
+        run: export PATH="$(pwd -P)"/gcc-${{ env.GCC_VERSION }}-nolibc/loongarch64-linux/bin:"$PATH" && ./configure TOOLCHAIN_FOR_TARGET=loongarch64-linux- --enable-werror --enable-uefi-loongarch64 && make all -j$(nproc) && make distclean
diff --git a/.github/workflows/pr_branch_check.yml b/.forgejo/workflows/pr_branch_check.yml
similarity index 81%
rename from .github/workflows/pr_branch_check.yml
rename to .forgejo/workflows/pr_branch_check.yml
index 87e61ca9..84e6acf9 100644
--- a/.github/workflows/pr_branch_check.yml
+++ b/.forgejo/workflows/pr_branch_check.yml
@@ -5,10 +5,10 @@ on: [ pull_request ]
 jobs:
   pr_branch_check:
     name: Check that the PR is targetting trunk
-    runs-on: ubuntu-latest
+    runs-on: codeberg-tiny
     steps:
       - name: Check that the PR is targetting trunk
-        if: ${{ github.base_ref != 'trunk' }}
+        if: ${{ forgejo.base_ref != 'trunk' }}
         run: |
           set -e
           echo "The PR is not targetting the trunk branch, please fix that."
diff --git a/.github/workflows/qa.yml b/.forgejo/workflows/qa.yml
similarity index 55%
rename from .github/workflows/qa.yml
rename to .forgejo/workflows/qa.yml
index 6d99a7d0..5bc12052 100644
--- a/.github/workflows/qa.yml
+++ b/.forgejo/workflows/qa.yml
@@ -5,14 +5,20 @@ on: [ merge_group, push, pull_request ]
 jobs:
   spellcheck:
     name: Spellcheck
-    runs-on: ubuntu-latest
+    runs-on: codeberg-tiny
     container: archlinux:latest
     steps:
+      - name: Create resolv.conf
+        run: |
+          set -ex
+          echo 'nameserver 8.8.8.8' >/etc/resolv.conf
+          echo 'nameserver 8.8.4.4' >>/etc/resolv.conf
+
       - name: Install dependencies
         run: pacman --noconfirm -Syu && pacman --needed --noconfirm -S git typos
 
       - name: Checkout code
-        uses: actions/checkout@v5
+        uses: https://code.forgejo.org/actions/checkout@v5
 
       - name: Run spellchecker
         run: typos
diff --git a/.forgejo/workflows/release.yml b/.forgejo/workflows/release.yml
new file mode 100644
index 00000000..a5e69ab9
--- /dev/null
+++ b/.forgejo/workflows/release.yml
@@ -0,0 +1,70 @@
+name: Release
+
+on:
+  push:
+    tags:
+    - 'v*'
+
+jobs:
+  build:
+    name: Build and upload release tarball
+    runs-on: codeberg-tiny
+    container: archlinux:latest
+
+    steps:
+      - name: Create resolv.conf
+        run: |
+          set -ex
+          echo 'nameserver 8.8.8.8' >/etc/resolv.conf
+          echo 'nameserver 8.8.4.4' >>/etc/resolv.conf
+
+      - name: Install dependencies
+        run: pacman --noconfirm -Syu && pacman --needed --noconfirm -S base-devel gnupg gzip bzip2 lzip zstd git autoconf automake nasm curl mtools llvm clang lld
+
+      - name: Checkout code
+        uses: https://code.forgejo.org/actions/checkout@v5
+
+      - name: Git config
+        run: |
+          set -e
+          git config --global --add safe.directory "$FORGEJO_WORKSPACE"
+          git config --global user.name 'Mintsuki'
+          git config --global user.email 'mintsuki@protonmail.com'
+
+      - name: Package release tarball
+        run: |
+          set -e
+          ./bootstrap
+          ./configure --enable-all
+          make dist
+          mkdir dist-output
+          mv limine-*.tar.* dist-output/
+
+      - name: Sign release tarball
+        run: |
+          set -e
+          for f in dist-output/*; do
+            gpg --batch --default-key 05D29860D0A0668AAEFB9D691F3C021BECA23821 --detach-sign $f
+          done
+
+      - name: Release
+        uses: https://code.forgejo.org/actions/forgejo-release@v2
+        with:
+          direction: upload
+          release-dir: dist-output
+          release-notes: |
+            Changelog can be found [here](https://codeberg.org/Limine/Limine/src/tag/${{ forgejo.ref_name }}/ChangeLog).
+
+            Binary release can be found [here](https://codeberg.org/Limine/Limine/src/tag/${{ forgejo.ref_name }}-binary).
+
+            Tarballs are signed using key ID `05D29860D0A0668AAEFB9D691F3C021BECA23821` which can be obtained from a keyserver such as `keyserver.ubuntu.com`.
+
+            Import the public key with:
+            ```bash
+            gpg --keyserver hkps://keyserver.ubuntu.com --recv-keys 05D29860D0A0668AAEFB9D691F3C021BECA23821
+            ```
+
+            In order to verify the tarball with the given signature, do:
+            ```bash
+            gpg --verify <tarball sig file> <associated tarball>
+            ```
diff --git a/.github/dependabot.yml b/.github/dependabot.yml
deleted file mode 100644
index 82ff7104..00000000
--- a/.github/dependabot.yml
+++ /dev/null
@@ -1,7 +0,0 @@
-version: 2
-updates:
-  - package-ecosystem: github-actions
-    directory: "/"
-    schedule:
-      interval: "daily"
-    target-branch: trunk
diff --git a/.github/workflows/check.yml b/.github/workflows/check.yml
deleted file mode 100644
index 914be4e4..00000000
--- a/.github/workflows/check.yml
+++ /dev/null
@@ -1,45 +0,0 @@
-name: Check for compilation failures
-
-on: [push, pull_request]
-
-jobs:
-  build:
-    name: Check for compilation failures
-    runs-on: ubuntu-latest
-    container: archlinux:latest
-
-    steps:
-      - name: Install dependencies
-        run: pacman --noconfirm -Syu && pacman --needed --noconfirm -S base-devel git autoconf automake nasm curl mtools llvm clang lld
-
-      - name: Checkout code
-        uses: actions/checkout@v5
-
-      - name: Git config
-        run: git config --global --add safe.directory "$GITHUB_WORKSPACE"
-
-      - name: Build the bootloader (LLVM, default)
-        run: ./bootstrap && ./configure --enable-werror --enable-all && make all && make maintainer-clean
-
-      - name: Set cross GCC version
-        run: echo "GCC_VERSION=15.1.0" >> $GITHUB_ENV
-
-      - name: Download GCC cross toolchains
-        run: |
-          set -e
-          for i in aarch64 loongarch64 riscv64 x86_64; do
-            curl -Lo x86_64-gcc-${{ env.GCC_VERSION }}-nolibc-$i-linux.tar.gz https://mirrors.edge.kernel.org/pub/tools/crosstool/files/bin/x86_64/${{ env.GCC_VERSION }}/x86_64-gcc-${{ env.GCC_VERSION }}-nolibc-$i-linux.tar.gz
-            tar -xf x86_64-gcc-${{ env.GCC_VERSION }}-nolibc-$i-linux.tar.gz
-          done
-
-      - name: Build the bootloader (GNU, x86)
-        run: export PATH="$(pwd -P)"/gcc-${{ env.GCC_VERSION }}-nolibc/x86_64-linux/bin:"$PATH" && ./bootstrap && ./configure TOOLCHAIN_FOR_TARGET=x86_64-linux- --enable-werror --enable-bios --enable-uefi-ia32 --enable-uefi-x86-64 && make all && make maintainer-clean
-
-      - name: Build the bootloader (GNU, aarch64)
-        run: export PATH="$(pwd -P)"/gcc-${{ env.GCC_VERSION }}-nolibc/aarch64-linux/bin:"$PATH" && ./bootstrap && ./configure TOOLCHAIN_FOR_TARGET=aarch64-linux- --enable-werror --enable-uefi-aarch64 && make all && make maintainer-clean
-
-      - name: Build the bootloader (GNU, riscv64)
-        run: export PATH="$(pwd -P)"/gcc-${{ env.GCC_VERSION }}-nolibc/riscv64-linux/bin:"$PATH" && ./bootstrap && ./configure TOOLCHAIN_FOR_TARGET=riscv64-linux- --enable-werror --enable-uefi-riscv64 && make all && make maintainer-clean
-
-      - name: Build the bootloader (GNU, loongarch64)
-        run: export PATH="$(pwd -P)"/gcc-${{ env.GCC_VERSION }}-nolibc/loongarch64-linux/bin:"$PATH" && ./bootstrap && ./configure TOOLCHAIN_FOR_TARGET=loongarch64-linux- --enable-werror --enable-uefi-loongarch64 && make all && make maintainer-clean
diff --git a/GNUmakefile.in b/GNUmakefile.in
index 09b489a8..0900aa56 100644
--- a/GNUmakefile.in
+++ b/GNUmakefile.in
@@ -312,7 +312,7 @@ dist:
 	rm -rf '$(call SHESCAPE,$(BUILDDIR))'/"$(DIST_OUTPUT)/common/lib/stb_image.h.nopatch"
 	rm -rf '$(call SHESCAPE,$(BUILDDIR))'/"$(DIST_OUTPUT)/.git"
 	rm -rf '$(call SHESCAPE,$(BUILDDIR))'/"$(DIST_OUTPUT)/.gitignore"
-	rm -rf '$(call SHESCAPE,$(BUILDDIR))'/"$(DIST_OUTPUT)/.github"
+	rm -rf '$(call SHESCAPE,$(BUILDDIR))'/"$(DIST_OUTPUT)/.forgejo"
 	rm -rf '$(call SHESCAPE,$(BUILDDIR))'/"$(DIST_OUTPUT)/README.md"
 	rm -rf '$(call SHESCAPE,$(BUILDDIR))'/"$(DIST_OUTPUT)/autom4te.cache"
 	rm -rf '$(call SHESCAPE,$(BUILDDIR))'/"$(DIST_OUTPUT)/test"
tab: 248 wrap: offon