Skip to content

Commit

Permalink
change matrix
Browse files Browse the repository at this point in the history
  • Loading branch information
yury-sannikov committed Feb 22, 2024
1 parent adc1eca commit 11d2b8e
Showing 1 changed file with 18 additions and 25 deletions.
43 changes: 18 additions & 25 deletions .github/workflows/build-module.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,60 +7,52 @@ on:

jobs:
build:
name: "v${{ matrix.tag }} - ${{ matrix.build_env.pkgarch}} :: ${{ matrix.build_env.target}}/${{ matrix.build_env.subtarget}} build"
name: "v${{ matrix.build_env.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
- tag: "22.03.4"
pkgarch: mips_24kc
target: ath79
subtarget: nand
vermagic: "5c9be91b90bda5403fe3a7c4e8ddb26f"
- tag: "23.05.0"
pkgarch: mipsel_24kc
target: ramips
subtarget: mt7621
vermagic: "9c242f353867f49a96054ff8c9f2c460"
# - 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 }}
ref: v${{ matrix.build_env.tag }}
fetch-depth: 0

- name: Cache Tools and Kernel
id: cache-tools-kernel
uses: actions/cache@v4
env:
cache-name: "cache-tools-kernel-${{ matrix.tag }}-${{ matrix.build_env.pkgarch}}-${{ matrix.build_env.target}}-${{ matrix.build_env.subtarget}}"
cache-name: "cache-tools-kernel-${{ matrix.build_env.tag }}-${{ matrix.build_env.pkgarch}}-${{ matrix.build_env.target}}-${{ matrix.build_env.subtarget}}"
with:
path: "**"
key: ${{ runner.os }}-build-vm4-${{ env.cache-name }}
restore-keys: |
${{ runner.os }}-build-vm4-cache-tools-kernel-${{ matrix.tag }}-${{ matrix.build_env.pkgarch}}-
${{ runner.os }}-build-vm4-cache-tools-kernel-${{ matrix.build_env.tag }}-${{ matrix.build_env.pkgarch}}-
- name: Building kernel and tools
if: ${{ steps.cache-tools-kernel.outputs.cache-hit != 'true' }}
run: |
echo "pkgarch: ${{ matrix.build_env.pkgarch}}, target:${{ matrix.build_env.target}}, subtarget: ${{ matrix.build_env.subtarget}}"
# Setup & install feeds
wget https://downloads.openwrt.org/releases/${{ matrix.tag }}/targets/${{ matrix.build_env.target}}/${{ matrix.build_env.subtarget}}/feeds.buildinfo -O feeds.conf
wget https://downloads.openwrt.org/releases/${{ matrix.build_env.tag }}/targets/${{ matrix.build_env.target}}/${{ matrix.build_env.subtarget}}/feeds.buildinfo -O feeds.conf
echo "src-git awgopenwrt https://github.com/yury-sannikov/awg-openwrt.git" >> ./feeds.conf
./scripts/feeds update && ./scripts/feeds install -a
# Setup config with AWG and dependencies
wget https://downloads.openwrt.org/releases/${{ matrix.tag }}/targets/${{ matrix.build_env.target}}/${{ matrix.build_env.subtarget}}/config.buildinfo -O .config
wget https://downloads.openwrt.org/releases/${{ matrix.build_env.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
Expand Down Expand Up @@ -104,8 +96,9 @@ jobs:
exit 1
fi
make package/kmod-amneziawg/{clean,download,prepare} V=s
make package/kmod-amneziawg/compile V=s
# Ignore kmod build for some targets, replace with the awg-go
make package/kmod-amneziawg/{clean,download,prepare} V=s || true
make package/kmod-amneziawg/compile V=s || true
make package/luci-app-amneziawg/{clean,download,prepare}
make package/luci-app-amneziawg/compile V=s
Expand All @@ -117,7 +110,7 @@ jobs:
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}}"
postfix="${tag_name}_v${{ matrix.build_env.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
Expand Down

0 comments on commit 11d2b8e

Please sign in to comment.