|
|
@@ -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()
|