Skip to content

Commit

Permalink
#
Browse files Browse the repository at this point in the history
  • Loading branch information
czy21 committed Sep 5, 2023
1 parent d969f77 commit 266ace0
Showing 1 changed file with 2 additions and 17 deletions.
19 changes: 2 additions & 17 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,30 +64,15 @@ jobs:
src-git plugin https://github.com/czy21/openwrt-plugin.git;${openwrt_branch}
" >> feeds.conf.default
- name: Generate ccache hash
id: ccache_hash
run: |
CCACHE_HASH=$(md5sum ${{ env.openwrt_workdir }}/include/kernel-* | awk '{ print $1 }' | md5sum | awk '{ print $1 }')
echo "ccache_hash=$CCACHE_HASH" >> $GITHUB_OUTPUT
- name: Update
working-directory: ${{ env.openwrt_workdir }}
run: ./scripts/feeds update -a && ./scripts/feeds install -a && ./feeds/plugin/sync.sh

- name: Cache ccache
uses: actions/cache@v3
with:
path: ${{ env.openwrt_workdir }}/.ccache
key: ccache-kernel-${{ inputs.target }}/${{ inputs.subtarget }}-${{ steps.ccache_hash.outputs.ccache_hash }}
restore-keys: |
ccache-kernel-${{ inputs.target }}/${{ inputs.subtarget }}-
- name: Config
working-directory: ${{ env.openwrt_workdir }}
run: |
cp -rv feeds/plugin/config/${{ inputs.target }}/${{ inputs.subtarget }} .config
echo CONFIG_CCACHE=y >> .config
make defconfig
rm -rf tmp && make defconfig
- name: Download
working-directory: ${{ env.openwrt_workdir }}
Expand All @@ -97,7 +82,7 @@ jobs:
working-directory: ${{ env.openwrt_workdir }}
run: |
mkdir -p logs
(make -j$(($(nproc)+1)) || make -j1 V=s) | tee logs/${{ inputs.target }}-${{ inputs.subtarget }}.log
make -j$(nproc) | tee logs/${{ inputs.target }}-${{ inputs.subtarget }}.log
- name: Artifact
working-directory: ${{ env.openwrt_workdir }}
Expand Down

0 comments on commit 266ace0

Please sign in to comment.