1 name: Refresh kernel for target
18 runs-on: ubuntu-latest
20 owner_lc: ${{ steps.lower_owner.outputs.owner_lc }}
23 - name: Set lower case owner name
26 OWNER_LC=$(echo "${{ github.repository_owner }}" \
27 | tr '[:upper:]' '[:lower:]')
28 echo "owner_lc=$OWNER_LC" >> $GITHUB_OUTPUT
31 name: Check Kernel patches
33 runs-on: ubuntu-latest
35 container: ghcr.io/${{ needs.setup_build.outputs.owner_lc }}/tools:latest
42 - name: Checkout master directory
43 uses: actions/checkout@v3
47 - name: Fix permission
49 chown -R buildbot:buildbot openwrt
51 - name: Initialization environment
53 TARGET=$(echo ${{ inputs.target }} | cut -d "/" -f 1)
54 SUBTARGET=$(echo ${{ inputs.target }} | cut -d "/" -f 2)
55 echo "TARGET=$TARGET" >> "$GITHUB_ENV"
56 echo "SUBTARGET=$SUBTARGET" >> "$GITHUB_ENV"
58 - name: Extract prebuilt tools
59 shell: su buildbot -c "sh -e {0}"
60 working-directory: openwrt
61 run: ./scripts/ext-tools.sh --tools /tools.tar
63 - name: Configure testing kernel
64 if: inputs.testing == true
65 shell: su buildbot -c "sh -e {0}"
66 working-directory: openwrt
68 echo CONFIG_TESTING_KERNEL=y >> .config
70 - name: Configure system
71 shell: su buildbot -c "sh -e {0}"
72 working-directory: openwrt
74 echo CONFIG_ALL_KMODS=y >> .config
75 echo CONFIG_DEVEL=y >> .config
76 echo CONFIG_AUTOREMOVE=y >> .config
77 echo CONFIG_CCACHE=y >> .config
79 echo "CONFIG_TARGET_${{ env.TARGET }}=y" >> .config
80 echo "CONFIG_TARGET_${{ env.TARGET }}_${{ env.SUBTARGET }}=y" >> .config
85 shell: su buildbot -c "sh -e {0}"
86 working-directory: openwrt
87 run: make tools/quilt/compile -j$(nproc) BUILD_LOG=1 || ret=$? .github/workflows/scripts/show_build_failures.sh
89 - name: Refresh Kernel patches
90 shell: su buildbot -c "sh -e {0}"
91 working-directory: openwrt
93 make target/linux/refresh V=s
95 . .github/workflows/scripts/ci_helpers.sh
97 if git diff --name-only --exit-code; then
98 success "Kernel patches for ${{ env.TARGET }}/${{ env.SUBTARGET }} seems ok"
100 err "Kernel patches for ${{ env.TARGET }}/${{ env.SUBTARGET }} require refresh. (run 'make target/linux/refresh' and force push this pr)"