diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 6b73088c45fa3a..0586465ea0af40 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -3,26 +3,32 @@ name: Compile and publish kernels on: push: branches: - - fd4.10 + - ARC-Migration + - arc-speed + +env: + - BUILD_ARCHES: ["armel", "mipseb", "mipsel", "mips64eb", "mips64el"] jobs: build: - runs-on: ubuntu-latest - + runs-on: panda-arc + strategy: + matrix: + arch: ${{ env.BUILD_ARCHES }} steps: - name: Checkout code uses: actions/checkout@v4 - name: Build run: | - bash docker_build.sh - tar -czvf kernels-latest.tar.gz binaries + bash docker_build.sh ${{ matrix.arch }} + tar -c -I 'xz -6 -T0' -f kernels-latest-${{ matrix.arch }}.tar.xz binaries - name: Save package uses: actions/upload-artifact@v3 with: - name: kernels-latest.tar.gz - path: kernels-latest.tar.gz + name: kernels-latest-${{ matrix.arch }}.tar.gx + path: kernels-latest-${{ matrix.arch }}.tar.gx - name: Create release id: create_release @@ -36,6 +42,14 @@ jobs: Release @${{ github.ref }} draft: true prerelease: false + - name: Download all workflow run artifacts + uses: actions/download-artifact@v3 + + - name: Combine all artifacts + run: | + mkdir -p binaries + for f in ${{ env.BUILD_ARCHES }}; do mv "kernels-latest-$f.tar.gz" binaries; done + tar -cvf kernels-latest.tar binaries - name: Upload release asset uses: actions/upload-release-asset@v1 env: diff --git a/docker_build.sh b/docker_build.sh index a71a5487ce0b26..09990085fa5167 100755 --- a/docker_build.sh +++ b/docker_build.sh @@ -2,8 +2,13 @@ #Commented out target list is what we'd like to have, but haven't tested #TARGETLIST="armel armeb mipseb mipsel mips64 mips64el aarch64" #These targets are ones we've tested -TARGETLIST="armel mipseb mipsel mips64eb mips64el" - +ALL_TARGETS="armel mipseb mipsel mips64eb mips64el" +if [ ! -z $1 ] +then + TARGETLIST=$1 +else + TARGETLIST=$ALL_TARGETS +fi docker build -t igloo_kernel_builder . || exit docker run --rm -v `realpath .`:/linux -w /linux -e IGLOO_TARGETLIST="$TARGETLIST" -e DOCKER_USER="$USER" \ igloo_kernel_builder xonsh docker_inner_build_targets.xsh diff --git a/docker_inner_build_targets.xsh b/docker_inner_build_targets.xsh index cfc715fe52a881..9b8eed1e1d28a1 100755 --- a/docker_inner_build_targets.xsh +++ b/docker_inner_build_targets.xsh @@ -46,7 +46,7 @@ $NPROC=$(nproc).strip() cd $BUILD_ROOT for arch in TARGETLIST: - make mrproper + make mrproper -j$NPROC TARGETS=["vmlinux"] if "arm" in arch: TARGETS.append("zImage") @@ -59,7 +59,7 @@ for arch in TARGETLIST: $CROSS_CC=get_cc(arch) mkdir -p f"build/{arch}" cp f"config.{arch}" f"build/{arch}/.config" - make ARCH=@(short_arch) CROSS_COMPILE=$CROSS_CC O=build/@(arch) olddefconfig + make ARCH=@(short_arch) CROSS_COMPILE=$CROSS_CC O=build/@(arch) olddefconfig -j$NPROC echo "Building kernel" make ARCH=@(short_arch) CROSS_COMPILE=$CROSS_CC O=build/@(arch) @(TARGETS) -j$NPROC