GitHub: Drop sshfs and DNS over HTTPS for now #50
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Build OpenWRT firmware | |
| on: | |
| workflow_dispatch: | |
| push: | |
| branches: | |
| - dev | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| build: | |
| name: Build OpenWRT ${{ matrix.version }} for ${{ matrix.lunch }} | |
| runs-on: ubuntu-latest | |
| env: | |
| cache-key: ${{ matrix.version }}-${{ matrix.lunch }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| lunch: | |
| - netgear_r6020 | |
| - tplink_tl-wdr4300-v1 | |
| version: | |
| - main | |
| - v24.10.2 | |
| steps: | |
| - name: Restore cache of OpenWRT builder if it exists | |
| id: restore-cache | |
| uses: actions/cache/restore@v3 | |
| with: | |
| path: openwrt-builder | |
| key: ${{ env.cache-key }} | |
| - name: Keep the OpenWRT source tree safe | |
| run: | | |
| if [ -d openwrt-builder/src ]; then | |
| mv openwrt-builder/src src | |
| fi | |
| - name: Clone the OpenWRT builder | |
| uses: actions/checkout@v4 | |
| with: | |
| path: openwrt-builder | |
| - name: Clone JoshuaDoes/luci-theme-material3 into feed joshuadoes | |
| uses: actions/checkout@v4 | |
| with: | |
| path: openwrt-builder/feeds/joshuadoes/luci-theme-material3 | |
| repository: JoshuaDoes/luci-theme-material3 | |
| - name: Restore the OpenWRT source tree if it exists | |
| run: | | |
| if [ -d src ]; then | |
| mv src openwrt-builder/src | |
| fi | |
| - name: Install the build dependencies for OpenWRT | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y build-essential clang flex bison g++ gawk \ | |
| gcc-multilib gettext libncurses-dev libssl-dev python3-setuptools \ | |
| rsync unzip zlib1g-dev file wget python3 python3-pip libelf-dev ccache \ | |
| qemu-utils | |
| - name: Sync the source trees | |
| run: | | |
| set +e | |
| cd openwrt-builder | |
| cp -R .github/workflows/openwrt-build/* . | |
| . build/envsetup | |
| sync "${{ matrix.version }}" | |
| lunch "${{ matrix.lunch }}" | |
| sync | |
| rm -rf files | |
| mkdir -p files | |
| cp -R feeds/joshuadoes/luci-theme-material3/root/* files/ | |
| cd .. | |
| - name: Build the OpenWRT firmware | |
| run: | | |
| set +e | |
| cd openwrt-builder | |
| . build/envsetup | |
| lunch "${{ matrix.lunch }}" | |
| make -j $(nproc) V=s | |
| echo "out=$OUT" >> $GITHUB_ENV | |
| cd src/bin/targets | |
| find . | |
| cd ../../../../ | |
| - name: Upload the OpenWRT firmware | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: openwrt-${{ matrix.version }}-${{ matrix.lunch }} | |
| path: ${{ env.out }} | |
| compression-level: 0 | |
| if-no-files-found: error | |
| - name: Clean the builder outputs | |
| run: | | |
| set +e | |
| cd openwrt-builder | |
| . build/envsetup | |
| clean #Removes all exported firmware builds from OpenWRT Builder with no lunch target | |
| makereal dirclean #Removes all except .config, feeds, .ccache and downloaded source files | |
| rm -f src/.config | |
| rm -f src/feeds.conf | |
| cd .. | |
| - name: Delete previous OpenWRT builder cache before saving new | |
| if: ${{ steps.restore-cache.outputs.cache-hit }} | |
| continue-on-error: true | |
| run: | | |
| gh cache delete "${{ env.cache-key }}" | |
| env: | |
| GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| GH_REPO: ${{ github.repository }} | |
| - name: Save OpenWRT builder cache | |
| uses: actions/cache/save@v3 | |
| if: always() | |
| with: | |
| path: openwrt-builder | |
| key: ${{ env.cache-key }} |