From: Paul Spooren Date: Sun, 20 Mar 2022 15:31:24 +0000 (+0000) Subject: CI: run inside the buildbot docker container X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=586be47078fe860f3c795f57f1a804cb7992dbfd;p=openwrt%2Fstaging%2Fblocktrron.git CI: run inside the buildbot docker container Run github actions insider buildbot docker container. Signed-off-by: Paul Spooren [ run container under buildbot user ] Signed-off-by: Christian Marangi (cherry picked from commit 8a77adb0485aeb40f6550eb7fcdb461b3eaffe58) --- diff --git a/.github/workflows/kernel.yml b/.github/workflows/kernel.yml index 268c703baf..f7e5d542b4 100644 --- a/.github/workflows/kernel.yml +++ b/.github/workflows/kernel.yml @@ -47,45 +47,17 @@ jobs: matrix: target: ${{fromJson(needs.determine_targets.outputs.target)}} + container: registry.gitlab.com/openwrt/buildbot/buildworker-3.4.1 + steps: - name: Checkout master directory uses: actions/checkout@v2 with: path: openwrt - - name: Setup Ubuntu - env: - DEBIAN_FRONTEND: noninteractive + - name: Fix permission run: | - sudo apt-get update - sudo apt-get -y install \ - build-essential \ - ccache \ - clang-12 \ - ecj \ - fastjar \ - file \ - g++ \ - gawk \ - gettext \ - git \ - java-propose-classpath \ - libelf-dev \ - libncurses-dev \ - libssl-dev \ - mkisofs \ - python3 \ - python3-dev \ - python3-distutils \ - python3-setuptools \ - qemu-utils \ - rsync \ - subversion \ - swig \ - unzip \ - wget \ - xsltproc \ - zlib1g-dev + chown -R buildbot:buildbot openwrt - name: Initialization environment run: | @@ -95,25 +67,31 @@ jobs: echo "SUBTARGET=$SUBTARGET" >> "$GITHUB_ENV" - name: Update & Install feeds + shell: su buildbot -c "sh -e {0}" + working-directory: openwrt run: | - cd openwrt ./scripts/feeds update -a ./scripts/feeds install -a - - name: Setup external toolchain + - name: Parse toolchain file + working-directory: openwrt run: | - cd openwrt TOOLCHAIN_FILE=$(curl "https://downloads.openwrt.org/snapshots/targets/${{ env.TARGET }}/${{ env.SUBTARGET }}/sha256sums" \ | sed -n -e 's/.*\(openwrt-toolchain.*\).tar.xz/\1/p') echo "TOOLCHAIN_FILE=$TOOLCHAIN_FILE" >> "$GITHUB_ENV" - + + - name: Download external toolchain + shell: su buildbot -c "sh -e {0}" + working-directory: openwrt + run: | wget -O - https://downloads.openwrt.org/snapshots/targets/${{ env.TARGET }}/${{ env.SUBTARGET }}/${TOOLCHAIN_FILE}.tar.xz \ | tar --xz -xf - - name: Configure external toolchain + shell: su buildbot -c "sh -e {0}" + working-directory: openwrt run: | - cd openwrt ./scripts/ext-toolchain.sh \ --toolchain ${{ env.TOOLCHAIN_FILE }}/toolchain-* \ --config ${{ env.TARGET }}/${{ env.SUBTARGET }} @@ -121,19 +99,19 @@ jobs: make defconfig - name: Build tools - run: | - cd openwrt - make tools/install -j$(nproc) BUILD_LOG=1 + shell: su buildbot -c "sh -e {0}" + working-directory: openwrt + run: make tools/install -j$(nproc) BUILD_LOG=1 - name: Build toolchain - run: | - cd openwrt - make toolchain/install -j$(nproc) BUILD_LOG=1 + shell: su buildbot -c "sh -e {0}" + working-directory: openwrt + run: make toolchain/install -j$(nproc) BUILD_LOG=1 - name: Build Kernel - run: | - cd openwrt - make target/compile -j$(nproc) BUILD_LOG=1 + shell: su buildbot -c "sh -e {0}" + working-directory: openwrt + run: make target/compile -j$(nproc) BUILD_LOG=1 - name: Upload logs if: failure()