From cd0bb8a89678e5b79220e5446cf4dbf59beec408 Mon Sep 17 00:00:00 2001 From: sulincix Date: Fri, 10 May 2024 22:39:58 +0000 Subject: [PATCH] Update blank.yml --- .github/workflows/blank.yml | 109 ++++++++++++++++++++---------------- 1 file changed, 62 insertions(+), 47 deletions(-) diff --git a/.github/workflows/blank.yml b/.github/workflows/blank.yml index c83ce53..a9908b2 100644 --- a/.github/workflows/blank.yml +++ b/.github/workflows/blank.yml @@ -2,57 +2,72 @@ name: CI on: push: - branches: [ master ] + branches: [master] workflow_dispatch: jobs: - compile: - name: Create deb package - runs-on: ubuntu-latest - steps: - - name: Check out the repo - uses: actions/checkout@v2 - - name: Run the build process with Docker - uses: addnab/docker-run-action@v3 - with: - image: debian:testing - options: -v ${{ github.workspace }}:/root -v /output:/output - run: | - set -ex - cd /root - apt update - apt install devscripts equivs -y - yes | mk-build-deps --install - debuild -us -uc -b - mkdir -p /output/ - mv ../*.deb /output/ - mv ./*.deb /output/ + compile_x86: + name: Create deb package (x86) + runs-on: ubuntu-latest + steps: + - name: Check out the repo + uses: actions/checkout@v2 + - name: Run the build process with Docker + uses: addnab/docker-run-action@v3 + with: + image: debian:testing + options: -v ${{ github.workspace }}:/root -v /output:/output + run: | + set -ex + cd /root + apt update + apt install devscripts equivs -y + yes | mk-build-deps --install + debuild -us -uc -b + mkdir -p /output/ + mv ../*.deb /output/ + mv ./*.deb /output/ - - uses: actions/checkout@v2 - - name: Run the build process with aarch64 rootfs - run: | - sudo apt update - sudo apt install qemu-user-static binfmt-support debootstrap wget unzip qemu-utils -y - sudo debootstrap --foreign --no-check-gpg --variant=minbase --arch=arm64 testing work/rootfs - sudo cp $(which qemu-aarch64-static) work/rootfs/usr/bin/qemu-aarch64-static - which service && sudo service binfmt-support start - echo "nameserver 1.1.1.1" | sudo tee work/rootfs/etc/resolv.conf - sudo chroot work/rootfs /usr/bin/qemu-aarch64-static /bin/bash /debootstrap/debootstrap --second-stage - sudo chroot work/rootfs /usr/bin/qemu-aarch64-static apt install devscripts equivs -y - sudo git clone https://gitlab.com/turkman/devel/sources/ymp work/rootfs/ymp - sudo chroot work/rootfs /usr/bin/qemu-aarch64-static debuild -us -uc -b /ymp - sudo mkdir -p /output/ - sudo mv work/rootfs/*.deb /output/ - - - - uses: "marvinpinto/action-automatic-releases@latest" - with: - repo_token: "${{ secrets.GITHUB_TOKEN }}" - automatic_release_tag: "current" - prerelease: false - title: "Latest release" - files: | - /output/* + compile_arm64: + name: Create deb package (ARM64) + runs-on: ubuntu-latest + steps: + - name: Check out the repo + uses: actions/checkout@v2 + - name: Run the build process with aarch64 rootfs + run: | + sudo apt update + sudo apt install qemu-user-static binfmt-support debootstrap wget unzip qemu-utils -y + sudo debootstrap --foreign --no-check-gpg --variant=minbase --arch=arm64 testing work/rootfs + sudo cp $(which qemu-aarch64-static) work/rootfs/usr/bin/qemu-aarch64-static + which service && sudo service binfmt-support start + echo "nameserver 1.1.1.1" | sudo tee work/rootfs/etc/resolv.conf + sudo chroot work/rootfs /usr/bin/qemu-aarch64-static /bin/bash /debootstrap/debootstrap --second-stage + sudo chroot work/rootfs /usr/bin/qemu-aarch64-static apt install devscripts equivs -y + sudo git clone https://gitlab.com/turkman/devel/sources/ymp work/rootfs/ymp + sudo chroot work/rootfs /usr/bin/qemu-aarch64-static debuild -us -uc -b /ymp + sudo mkdir -p /output/ + sudo mv work/rootfs/*.deb /output/ + release: + needs: [compile_x86, compile_arm64] + runs-on: ubuntu-latest + steps: + - name: Check out the repo + uses: actions/checkout@v2 + - name: Merge deb packages from both architectures + run: | + mkdir -p /output/ + cp -r /github/workspace/compile_x86/output/*.deb /output/ + cp -r /github/workspace/compile_arm64/output/*.deb /output/ + - name: Create Release + uses: "marvinpinto/action-automatic-releases@latest" + with: + repo_token: "${{ secrets.GITHUB_TOKEN }}" + automatic_release_tag: "current" + prerelease: false + title: "Latest release" + files: | + /output/*