From ef35ca989987fa301a93aed38b29052a87650378 Mon Sep 17 00:00:00 2001 From: Jakob Rieck Date: Sat, 14 Oct 2023 11:17:58 +0200 Subject: [PATCH 1/2] Initial CI implementation - Triggers on push events to any branch - Builds the blue-merle package using the 23.05.0 SDK - Currently does not sign the package - Adapts Makefile: switches from Runtime + Buildtime dependencies to Runtime dependencies only --- .github/workflows/ci.yml | 63 ++++++++++++++++++++++++++++++++++++++++ Makefile | 2 +- 2 files changed, 64 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/ci.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..1348bf9 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,63 @@ +name: CI + +on: + push: + paths-ignore: + - 'README.md' + workflow_dispatch: + +concurrency: + group: CI + cancel-in-progress: false + +jobs: + build-packages: + name: Build Packages + runs-on: ubuntu-latest + strategy: + fail-fast: false + env: + owrt-package: blue-merle + SDK_URL: "https://downloads.openwrt.org/releases/23.05.0/targets/ath79/nand/openwrt-sdk-23.05.0-ath79-nand_gcc-12.3.0_musl.Linux-x86_64.tar.xz" + SDK_FILENAME: "openwrt-sdk-23.05.0-ath79-nand_gcc-12.3.0_musl.Linux-x86_64.tar.xz" + steps: + - uses: actions/checkout@v3 + with: + ref: ${{ github.event_name == 'push' && github.ref || 'main' }} + - name: Get the SDK + run: | + mkdir sdk + cd sdk + wget "${SDK_URL}" + tar xf "${SDK_FILENAME}" + - name: Set up package dir + run: | + cd "sdk/${SDK_FILENAME%.tar.xz}" + mkdir package/${{ env.owrt-package }} + ln -s "${GITHUB_WORKSPACE}"/Makefile package/${{ env.owrt-package }}/ + ln -s "${GITHUB_WORKSPACE}"/files package/${{ env.owrt-package }}/ + - name: Update packages feed + run: | + cd "sdk/${SDK_FILENAME%.tar.xz}" + scripts/feeds update packages >/dev/null + - name: Set up OpenWrt config + run: | + cd "sdk/${SDK_FILENAME%.tar.xz}" + echo "CONFIG_SIGNED_PACKAGES=n" > .config + make defconfig + - name: Build package + run: | + cd "sdk/${SDK_FILENAME%.tar.xz}" + make -j$(nproc) V=s package/${{ env.owrt-package }}/compile + make -j1 V=s package/index + - name: Generate artifact name + id: generate-name + run: echo "artifact-name=${{ github.event.repository.name }}-${{ github.ref_name }}-${{ github.sha }}" >> $GITHUB_OUTPUT + - name: Prepare artifact + run: | + mkdir package-output + rsync -av sdk/"${SDK_FILENAME%.tar.xz}"/bin/packages/mips_24kc/base/"${{ env.owrt-package }}"*.ipk package-output/ + - uses: actions/upload-artifact@v3 + with: + name: ${{ steps.generate-name.outputs.artifact-name }} + path: package-output/ diff --git a/Makefile b/Makefile index 50590b0..bb18702 100644 --- a/Makefile +++ b/Makefile @@ -12,7 +12,7 @@ include $(INCLUDE_DIR)/package.mk define Package/blue-merle SECTION:=utils CATEGORY:=Utilities - DEPENDS:=gl-ui gl-e750-mcu +bash +coreutils-shred +python3 +python3-pyserial +patch + EXTRA_DEPENDS:=gl-ui gl-e750-mcu +bash +coreutils-shred +python3 +python3-pyserial +patch TITLE:=Anonymity Enhancements for GL-E750 Mudi endef From 862ad1f7e3daa58c1eba8c2aecbe91b418ba1753 Mon Sep 17 00:00:00 2001 From: Jakob Rieck Date: Mon, 16 Oct 2023 09:12:23 +0200 Subject: [PATCH 2/2] Fixes Makefile (EXTRA_DEPENDS) --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index bb18702..9c377b2 100644 --- a/Makefile +++ b/Makefile @@ -12,7 +12,7 @@ include $(INCLUDE_DIR)/package.mk define Package/blue-merle SECTION:=utils CATEGORY:=Utilities - EXTRA_DEPENDS:=gl-ui gl-e750-mcu +bash +coreutils-shred +python3 +python3-pyserial +patch + EXTRA_DEPENDS:=gl-ui gl-e750-mcu bash coreutils-shred python3 python3-pyserial patch TITLE:=Anonymity Enhancements for GL-E750 Mudi endef