Skip to content

Commit

Permalink
Update Openwrt-AutoBuild.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
kiddin9 authored May 25, 2022
1 parent fefd2ac commit 80e22f2
Showing 1 changed file with 8 additions and 21 deletions.
29 changes: 8 additions & 21 deletions .github/workflows/Openwrt-AutoBuild.yml
Original file line number Diff line number Diff line change
Expand Up @@ -121,24 +121,6 @@ jobs:
-H "Authorization: Bearer ${{ secrets.REPO_TOKEN }}" \
-X POST -d '{ "query": "query {repository(owner: \"openwrt\", name: \"openwrt\") {refs(refPrefix: \"refs/tags/\", last: 4, orderBy: {field: TAG_COMMIT_DATE, direction: ASC}) {edges {node {name}}}}}"}' https://api.github.com/graphql) | jq -r '.data.repository.refs.edges[].node.name' | grep v22 | tail -n 1 | sed -e 's/v//')"
git clone $REPO_URL -b v$REPO_BRANCH openwrt
if [[ "${{ contains(github.event.action, 'nosdk') }}" != "true" ]]; then
cd openwrt
if [[ ${{matrix.target}} == "x86_64" ]]; then
curl -fL -m 60 -o sdk.tar.xz https://op.supes.top/releases/targets/x86/64/openwrt-sdk-x86-64_gcc-11.2.0_musl.Linux-x86_64.tar.xz || true
elif [[ ${{matrix.target}} == "rockchip_armv8" ]]; then
curl -fL -m 60 -o sdk.tar.xz https://op.supes.top/releases/targets/rockchip/armv8/openwrt-sdk-rockchip-armv8_gcc-11.2.0_musl.Linux-x86_64.tar.xz || true
elif [[ ${{matrix.target}} == "bcm27xx_bcm2711" ]]; then
curl -fL -m 60 -o sdk.tar.xz https://op.supes.top/releases/targets/bcm27xx/bcm2711/openwrt-sdk-bcm27xx-bcm2711_gcc-11.2.0_musl.Linux-x86_64.tar.xz || true
elif [[ ${{matrix.target}} == "armvirt_64" ]]; then
curl -fL -m 60 -o sdk.tar.xz https://op.supes.top/releases/targets/armvirt/64/openwrt-sdk-armvirt-64_gcc-11.2.0_musl.Linux-x86_64.tar.xz || true
elif [[ ${{matrix.target}} == "ramips_mt7621" ]]; then
curl -fL -m 60 -o sdk.tar.xz https://op.supes.top/releases/targets/ramips/mt7621/openwrt-sdk-ramips-mt7621_gcc-11.2.0_musl.Linux-x86_64.tar.xz || true
elif [[ ${{matrix.target}} == "mediatek_mt7622" ]]; then
curl -fL -m 60 -o sdk.tar.xz https://op.supes.top/releases/targets/mediatek/mt7622/openwrt-sdk-mediatek-mt7622_gcc-11.2.0_musl.Linux-x86_64.tar.xz || true
elif [[ ${{matrix.target}} == "ipq807x" ]]; then
curl -fL -m 60 -o sdk.tar.xz https://op.supes.top/releases/targets/ipq807x/generic/openwrt-sdk-ipq807x-generic_gcc-11.2.0_musl.Linux-x86_64.tar.xz || true
fi
fi
ln -sf /workdir/openwrt $GITHUB_WORKSPACE/openwrt
echo "REPO_BRANCH=$REPO_BRANCH" >> $GITHUB_ENV
echo "$REPO_BRANCH"
Expand Down Expand Up @@ -198,16 +180,21 @@ jobs:
make download -j$(($(nproc)+1)) &
sleep 5
- name: Cache
uses: klever1988/cachewrtbuild@main
with:
ccache: 'true'
clean: ${{ contains(github.event.action, 'nocache') }}
prefix: ${{ github.workspace }}/openwrt

- name: Compile the firmware
id: compile
run: |
cd openwrt
echo -e "$(($(nproc)+1)) thread compile"
make -j$(($(nproc)+1)) || (curl -k --data chat_id="${{ env.TELEGRAM_CHAT_ID }}" --data "text=❌ OpenWrt ${{ env.VERSION }} ${{matrix.target}} 编译失败 😂" "https://api.telegram.org/bot${{ env.TELEGRAM_TOKEN }}/sendMessage" ; make -j1 V=s)
sed -i "s/# CONFIG_IB is not set/CONFIG_IB=y/" .config
make defconfig
make target/imagebuilder/compile -j$(($(nproc)+1))
make checksum V=s
rm -rf staging_dir/toolchain-*/bin/*openwrt-linux-musl-lto-dump
- name: Check space usage
run: df -hT
Expand Down

0 comments on commit 80e22f2

Please sign in to comment.