From 405da98ed3528b321fc80d370a82a4fbee1fd340 Mon Sep 17 00:00:00 2001 From: silime <60662669+silime@users.noreply.github.com> Date: Mon, 9 Sep 2024 23:27:26 +0800 Subject: [PATCH] update --- .github/workflows/build-PKGBUILDs.yml | 59 +++++++++++++++++++++++---- 1 file changed, 52 insertions(+), 7 deletions(-) diff --git a/.github/workflows/build-PKGBUILDs.yml b/.github/workflows/build-PKGBUILDs.yml index 72f5127..1a7644d 100644 --- a/.github/workflows/build-PKGBUILDs.yml +++ b/.github/workflows/build-PKGBUILDs.yml @@ -57,7 +57,7 @@ jobs: with: name: linux-firmware-aarch64-latest path: firmware-release - build-kernel: + build-kernel-sm8250: name: Build Linux kernel package runs-on: ubuntu-latest container: archlinux @@ -95,14 +95,10 @@ jobs: export MAKEFLAGS="-j9" # Build su nobody --pty -p -s /bin/bash -c 'makepkg-aarch64 -f --syncdeps --skippgpcheck --noconfirm' - # Build linux-sdm845 - cd ../linux-sdm845 - chown -R nobody . - su nobody --pty -p -s /bin/bash -c 'makepkg-aarch64 -f --syncdeps --skippgpcheck --noconfirm' + - name: Prepare release run: | mkdir release - cp linux-sdm845/*.pkg.tar.xz release cp linux-sm8250/*.pkg.tar.xz release - name: Upload artifacts @@ -110,8 +106,57 @@ jobs: with: name: linux-sm8250-aarch64-latest path: release + build-kernel-sdm845: + name: Build Linux kernel package + runs-on: ubuntu-latest + container: archlinux + + steps: + - name: Checkout code + uses: actions/checkout@v2 + + - name: Install build dependencies + run: | + # Install makepkg deps + pacman --noconfirm -Syu + pacman --noconfirm -S sudo binutils fakeroot base-devel git \ + xmlto docbook-xsl kmod inetutils bc dtc \ + aarch64-linux-gnu-gcc aarch64-linux-gnu-glibc + # Fix permissions (can't makepkg as root) + echo "nobody ALL=(ALL) NOPASSWD: /usr/bin/pacman" >> /etc/sudoers + - name: Set up makepkg-aarch64 for cross-compilation + run: | + cd makepkg-aarch64 + # Fix permissions (can't makepkg as root) + chown -R nobody . + # Build and install + su nobody --pty -p -s /bin/bash -c 'makepkg -fi --syncdeps --skippgpcheck --noconfirm' + - name: Build Package + run: | + cd linux-sdm845 + git config --global user.email "chalkinbot@users.noreply.github.com" + git config --global user.name "chalkinbot" + # Fix permissions (can't makepkg as root) + chown -R nobody . + # Package compression settings (Matches latest Arch) + export PKGEXT='.pkg.tar.xz' + # export COMPRESSZST=(zstd -c -T0 --ultra -20 -) + export MAKEFLAGS="-j9" + # Build + su nobody --pty -p -s /bin/bash -c 'makepkg-aarch64 -f --syncdeps --skippgpcheck --noconfirm' + - name: Prepare release + run: | + mkdir release + mv linux-sdm845/*.pkg.tar.xz release + + - name: Upload artifacts + uses: actions/upload-artifact@v4 + with: + name: linux-sdm845-aarch64-latest + path: release + build-packages: - needs: [build-linux-firmware, build-kernel] + needs: [build-linux-firmware, build-kernel-sm8250, build-kernel-sdm845] runs-on: ubuntu-latest env: BUILD_SH: 'sudo arch-chroot ./builder qemu-aarch64-static /usr/bin/bash -c'