Create Release on Tag #10
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: Release AmneziaWG Kernel Module | |
on: [workflow_dispatch] | |
# on: | |
# push: | |
# tags: | |
# - "v*.*.*" | |
jobs: | |
build: | |
name: "${{ 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'] | |
build_env: | |
- pkgarch: mipsel_24kc | |
target: ramips | |
subtarget: mt7621 | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
repository: openwrt/openwrt | |
ref: ${{ matrix.tag }} | |
fetch-depth: 0 | |
- name: Cache Tools and Kernel | |
id: cache-tools-kernel | |
uses: actions/cache@v3 | |
env: | |
cache-name: "cache-tools-kernel-${{ 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- | |
- 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}" | |
echo "CONFIG_TARGET_${target}=y" > .config | |
echo "CONFIG_TARGET_${target}_${subtarget}=y" >> .config | |
echo "CONFIG_DEFAULT_TARGET_${target}_${subtarget}=y" >> .config | |
echo "CONFIG_ALL_KMODS=y" >> .config | |
echo "CONFIG_PACKAGE_kmod-amneziawg=m" >> .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 | |
echo " > make toolchain/install" | |
make toolchain/install | |
# compile kernel module | |
echo " > make target/linux/compile" | |
make target/linux/compile V=s | |
- name: Building AmneziaWG Tools and Luci | |
run: | | |
./scripts/feeds update luci | |
./scripts/feeds install -a -p luci | |
./scripts/feeds update awgopenwrt | |
./scripts/feeds install -a -p awgopenwrt | |
echo " > make amnezia-wg-tools (clean)" | |
make package/amnezia-wg-tools/clean V=s | |
echo " > make luci-app-amneziawg (clean)" | |
make package/luci-app-amneziawg/clean V=s | |
echo " > make amnezia-wg-tools (download)" | |
make package/amnezia-wg-tools/download V=s | |
echo " > make luci-app-amneziawg (download)" | |
make package/luci-app-amneziawg/download V=s | |
echo " > make amnezia-wg-tools (prepare)" | |
make package/amnezia-wg-tools/prepare V=s | |
echo " > make luci-app-amneziawg (prepare)" | |
make package/luci-app-amneziawg/prepare V=s | |
echo " > make amnezia-wg-tools (compile)" | |
make package/amnezia-wg-tools/compile V=s | |
echo " > make luci-app-amneziawg (compile)" | |
make package/luci-app-amneziawg/compile V=s | |
ls -al bin/packages/${{ matrix.build_env.pkgarch }}/base | |
- name: Building AmneziaWG module | |
run: | | |
ls -al | |
# fixing feed | |
# echo "src-git packages https://git.openwrt.org/feed/packages.git^0da9f622975aa1e4efe452da4acbae15479bee63" > ./feeds.conf.default | |
# echo "src-git luci https://git.openwrt.org/project/luci.git^257f54cb8bcd493d9be0a45a3c316668b793e8ae" >> ./feeds.conf.default | |
# echo "src-git routing https://git.openwrt.org/feed/routing.git^2272106e0839ee06957e88e3596489e1b510d3c2" >> ./feeds.conf.default | |
# echo "src-git telephony https://git.openwrt.org/feed/telephony.git^9746ae8f964e18f04b64fbe1956366954ff223f8" >> ./feeds.conf.default | |
# echo "src-git awgopenwrt https://github.com/yury-sannikov/awg-openwrt.git" >> ./feeds.conf.default | |
# ./scripts/feeds update awgopenwrt | |
# ./scripts/feeds install -a -p awgopenwrt | |
echo " > make defconfig" | |
make defconfig | |
# Build kmod | |
echo " > make kmod-amneziawg (clean)" | |
make package/kmod-amneziawg/clean | |
echo " > make kmod-amneziawg (download)" | |
make package/kmod-amneziawg/download | |
echo " > make kmod-amneziawg (prepare)" | |
make package/kmod-amneziawg/prepare V=s | |
echo " > make kmod-amneziawg (compile)" | |
make package/kmod-amneziawg/compile | |
ls -al bin/targets/${{ matrix.build_env.target}}/${{ matrix.build_env.subtarget}}/packages/ | |
# # Cleanup feeds for the cache | |
# echo " > cleanup feeds" | |
# tac feeds.conf.default | tail -n +2 | tac > feeds.conf.default | |
# echo " > print feeds" | |
# cat feeds.conf.default | |
# - name: Release | |
# uses: softprops/action-gh-release@v1 | |
# with: | |
# files: | | |
# bin/targets/${{ matrix.build_env.target}}/${{ matrix.build_env.subtarget}}/packages/kmod-amneziawg*.ipk |