diff options
author | Paul Spooren <mail@aparcar.org> | 2022-03-20 15:31:24 +0000 |
---|---|---|
committer | Christian Marangi <ansuelsmth@gmail.com> | 2022-07-24 20:16:06 +0200 |
commit | 8a77adb0485aeb40f6550eb7fcdb461b3eaffe58 (patch) | |
tree | 595a666bdc72be09026fda5aee06ae06fb1e50e0 | |
parent | c17c931a90e5cb9613875a42ef8eace46be539f3 (diff) | |
download | upstream-8a77adb0485aeb40f6550eb7fcdb461b3eaffe58.tar.gz upstream-8a77adb0485aeb40f6550eb7fcdb461b3eaffe58.tar.bz2 upstream-8a77adb0485aeb40f6550eb7fcdb461b3eaffe58.zip |
CI: run inside the buildbot docker container
Run github actions insider buildbot docker container.
Signed-off-by: Paul Spooren <mail@aparcar.org>
[ run container under buildbot user ]
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
-rw-r--r-- | .github/workflows/kernel.yml | 70 |
1 files changed, 24 insertions, 46 deletions
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() |