fix config.buildinfo path #42
Workflow file for this run
This file contains 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: Create Release on Tag | |
# on: [workflow_dispatch] | |
on: | |
push: | |
tags: | |
- "v*.*.*" | |
jobs: | |
build: | |
name: "v${{ matrix.tag }} - ${{ matrix.build_env.pkgarch}} :: ${{ matrix.build_env.target}}/${{ matrix.build_env.subtarget}} build" | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
#tag: ['v23.05.0', 'v23.05.2', 'v22.03.4'] | |
tag: ['23.05.0'] | |
# tag: ['v22.03.4'] | |
build_env: | |
# - pkgarch: mips_24kc | |
# target: ath79 | |
# subtarget: nand | |
# - pkgarch: mipsel_24kc | |
# target: ramips | |
# subtarget: mt7620 | |
- pkgarch: mipsel_24kc | |
target: ramips | |
subtarget: mt7621 | |
# - pkgarch: arm_cortex-a7 | |
# target: mediatek | |
# subtarget: mt7629 | |
# - pkgarch: arm_cortex-a9 | |
# target: linksys | |
# subtarget: wrt3200acm | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
repository: openwrt/openwrt | |
ref: v${{ matrix.tag }} | |
fetch-depth: 0 | |
- name: Cache Tools and Kernel | |
id: cache-tools-kernel | |
uses: actions/cache@v3 | |
env: | |
cache-name: "cache-tools-kernel-v${{ matrix.tag }}-${{ matrix.build_env.pkgarch}}-${{ matrix.build_env.target}}-${{ matrix.build_env.subtarget}}" | |
with: | |
path: . | |
key: ${{ runner.os }}-build-${{ env.cache-name }} | |
restore-keys: | | |
${{ runner.os }}-build-cache-tools-kernel-v${{ matrix.tag }}-${{ matrix.build_env.pkgarch}}- | |
- name: Building kernel and tools | |
if: ${{ steps.cache-tools-kernel.outputs.cache-hit != 'true' }} | |
run: | | |
pkgarch=${{ matrix.build_env.pkgarch}} | |
target=${{ matrix.build_env.target}} | |
subtarget=${{ matrix.build_env.subtarget}} | |
echo "pkgarch: ${pkgarch}, target: ${target}, subtarget: ${subtarget}" | |
wget https://downloads.openwrt.org/releases/${{ matrix.tag }}/targets/${target}/${subtarget}/config.buildinfo -O .config | |
echo "CONFIG_PACKAGE_kmod-amneziawg=m" >> .config | |
echo "CONFIG_PACKAGE_amneziawg-tools=y" >> .config | |
echo "CONFIG_PACKAGE_luci-app-amneziawg=y" >> .config | |
echo "CONFIG_PACKAGE_kmod-crypto-lib-chacha20=m" >> .config | |
echo "CONFIG_PACKAGE_kmod-crypto-lib-chacha20poly1305=m" >> .config | |
echo "CONFIG_PACKAGE_kmod-crypto-chacha20poly1305=m" >> .config | |
make defconfig | |
echo " > make tools/install" | |
make tools/install -i -j `nproc` | |
echo " > make toolchain/install" | |
make toolchain/install -i -j `nproc` | |
# compile kernel module | |
echo " > make target/linux/compile" | |
make target/linux/compile -i -j `nproc` V=s | |
# Print kernel vermagic | |
echo "Kernel vermagic:" | |
cat ./build_dir/target-*/linux-*/linux-*/.vermagic | |
- name: Fix vermagic of cached kernel & tools | |
run: | | |
echo "Kernel vermagic BEFORE:" | |
cat ./build_dir/target-*/linux-*/linux-*/.vermagic | |
wget https://downloads.openwrt.org/releases/${{ matrix.tag }}/targets/${{ matrix.build_env.target}}/${{ matrix.build_env.subtarget}}/config.buildinfo -O .config | |
echo "CONFIG_PACKAGE_kmod-amneziawg=m" >> .config | |
echo "CONFIG_PACKAGE_amneziawg-tools=y" >> .config | |
echo "CONFIG_PACKAGE_luci-app-amneziawg=y" >> .config | |
echo "CONFIG_PACKAGE_kmod-crypto-lib-chacha20=m" >> .config | |
echo "CONFIG_PACKAGE_kmod-crypto-lib-chacha20poly1305=m" >> .config | |
echo "CONFIG_PACKAGE_kmod-crypto-chacha20poly1305=m" >> .config | |
make defconfig | |
make target/linux/compile || true | |
echo "Kernel vermagic AFTER:" | |
cat ./build_dir/target-*/linux-*/linux-*/.vermagic | |
- name: Update feeds | |
run: | | |
# clean if cache restored from different cache key | |
rm -rf bin/packages/${{ matrix.build_env.pkgarch }}/awgopenwrt/ || true | |
rm -rf bin/targets/${{ matrix.build_env.target}}/${{ matrix.build_env.subtarget}}/packages/ || true | |
cp feeds.conf.default feeds.conf | |
echo "src-git awgopenwrt https://github.com/yury-sannikov/awg-openwrt.git" >> ./feeds.conf | |
./scripts/feeds update luci | |
./scripts/feeds install -a -p luci | |
./scripts/feeds update awgopenwrt | |
./scripts/feeds install -a -p awgopenwrt | |
echo "CONFIG_PACKAGE_kmod-amneziawg=m" >> .config | |
echo "CONFIG_PACKAGE_amneziawg-tools=y" >> .config | |
echo "CONFIG_PACKAGE_luci-app-amneziawg=y" >> .config | |
make defconfig | |
- name: Build amneziawg-tools | |
run: | | |
make V=s package/amneziawg-tools/{clean,download,prepare} | |
make V=s package/amneziawg-tools/compile | |
- name: Build kmod-amneziawg | |
run: | | |
make package/kmod-amneziawg/{clean,download,prepare} | |
make package/kmod-amneziawg/compile | |
- name: Build luci | |
run: | | |
make package/luci-app-amneziawg/{clean,download,prepare} | |
make package/luci-app-amneziawg/compile V=s | |
- name: Prepare artifacts | |
run: | | |
tag_name=${{ github.ref_name }} | |
mkdir -p awgrelease | |
postfix="${tag_name}_v${{ matrix.tag }}_${{ matrix.build_env.pkgarch}}_${{ matrix.build_env.target}}_${{ matrix.build_env.subtarget}}" | |
cp bin/packages/${{ matrix.build_env.pkgarch }}/awgopenwrt/amneziawg-tools_*.ipk awgrelease/amneziawg-tools_${postfix}.ipk | |
cp bin/packages/${{ matrix.build_env.pkgarch }}/awgopenwrt/luci-app-amneziawg_*.ipk awgrelease/luci-app-amneziawg_${postfix}.ipk | |
cp bin/targets/${{ matrix.build_env.target}}/${{ matrix.build_env.subtarget}}/packages/kmod-amneziawg_*.ipk awgrelease/kmod-amneziawg_${postfix}.ipk | |
- name: Release | |
uses: softprops/action-gh-release@v1 | |
with: | |
files: awgrelease/*.ipk | |
- name: Cleanup | |
run: | | |
rm feeds.conf || true | |
rm -rf awgrelease || true |