Compare commits
7 Commits
7d68c0754d
...
6210c73b30
| Author | SHA1 | Date | |
|---|---|---|---|
| 6210c73b30 | |||
| ded94df0c1 | |||
| e6a3cbc9e8 | |||
| d9d002aab3 | |||
| e4d1486760 | |||
| 8032870129 | |||
| 2b72867ef1 |
+130
@@ -0,0 +1,130 @@
|
|||||||
|
kind: pipeline
|
||||||
|
type: docker
|
||||||
|
name: awg-openwrt-build-publish
|
||||||
|
|
||||||
|
trigger:
|
||||||
|
event:
|
||||||
|
- tag
|
||||||
|
|
||||||
|
volumes:
|
||||||
|
- name: drone_cache
|
||||||
|
host:
|
||||||
|
path: /cache
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: build
|
||||||
|
image: node:20-bookworm
|
||||||
|
volumes:
|
||||||
|
- name: drone_cache
|
||||||
|
path: /cache
|
||||||
|
environment:
|
||||||
|
OPENWRT_TAG: "24.10.2"
|
||||||
|
OPENWRT_PKGARCH: "aarch64_generic"
|
||||||
|
OPENWRT_TARGET: "rockchip"
|
||||||
|
OPENWRT_SUBTARGET: "armv8"
|
||||||
|
OPENWRT_VERMAGIC: "0d90324e4fb76fa1183dcb1f1b600b7a-r1"
|
||||||
|
commands:
|
||||||
|
- apt-get update
|
||||||
|
- |
|
||||||
|
DEBIAN_FRONTEND=noninteractive apt-get install -y \
|
||||||
|
ca-certificates \
|
||||||
|
curl \
|
||||||
|
wget \
|
||||||
|
jq \
|
||||||
|
git \
|
||||||
|
rsync \
|
||||||
|
unzip \
|
||||||
|
zip \
|
||||||
|
xz-utils \
|
||||||
|
zstd \
|
||||||
|
gawk \
|
||||||
|
file \
|
||||||
|
patch \
|
||||||
|
perl \
|
||||||
|
python3 \
|
||||||
|
python3-dev \
|
||||||
|
python3-pyelftools \
|
||||||
|
python3-setuptools \
|
||||||
|
python3-distutils \
|
||||||
|
swig \
|
||||||
|
build-essential \
|
||||||
|
clang \
|
||||||
|
libncurses5-dev \
|
||||||
|
libncursesw5-dev \
|
||||||
|
libelf-dev \
|
||||||
|
gettext \
|
||||||
|
xsltproc \
|
||||||
|
cpio \
|
||||||
|
flex \
|
||||||
|
bison \
|
||||||
|
tar
|
||||||
|
- npm install
|
||||||
|
|
||||||
|
- mkdir -p "/cache/awg-openwrt/$DRONE_TAG"
|
||||||
|
- rm -rf "/cache/awg-openwrt/$DRONE_TAG/"*
|
||||||
|
- mkdir -p "$DRONE_WORKSPACE/awgrelease"
|
||||||
|
|
||||||
|
- SDK_FILE=$(curl -fsSL "https://downloads.openwrt.org/releases/$OPENWRT_TAG/targets/$OPENWRT_TARGET/$OPENWRT_SUBTARGET/" | grep -o 'openwrt-sdk-[^"]*\.Linux-x86_64\.tar\.\(xz\|zst\)' | head -n1)
|
||||||
|
- test -n "$SDK_FILE"
|
||||||
|
- SDK_URL="https://downloads.openwrt.org/releases/$OPENWRT_TAG/targets/$OPENWRT_TARGET/$OPENWRT_SUBTARGET/$SDK_FILE"
|
||||||
|
- wget -O "$SDK_FILE" "$SDK_URL"
|
||||||
|
|
||||||
|
- |
|
||||||
|
case "$SDK_FILE" in
|
||||||
|
*.tar.zst) tar --zstd -xf "$SDK_FILE" ;;
|
||||||
|
*.tar.xz) tar -xf "$SDK_FILE" ;;
|
||||||
|
*) echo "Unknown SDK archive format: $SDK_FILE"; exit 1 ;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
- rm -f "$SDK_FILE"
|
||||||
|
- SDK_ROOT=$(find "$DRONE_WORKSPACE" -maxdepth 1 -type d -name 'openwrt-sdk-*' | head -n1)
|
||||||
|
- test -n "$SDK_ROOT"
|
||||||
|
|
||||||
|
- cd "$SDK_ROOT" && ./scripts/feeds update -a
|
||||||
|
- cd "$SDK_ROOT" && ./scripts/feeds install -a
|
||||||
|
|
||||||
|
- cp -r "$DRONE_WORKSPACE/kmod-amneziawg" "$SDK_ROOT/package/"
|
||||||
|
- cp -r "$DRONE_WORKSPACE/amneziawg-tools" "$SDK_ROOT/package/"
|
||||||
|
- cp -r "$DRONE_WORKSPACE/luci-proto-amneziawg" "$SDK_ROOT/package/"
|
||||||
|
|
||||||
|
- cd "$SDK_ROOT" && printf '%s\n' 'CONFIG_PACKAGE_kmod-amneziawg=m' > .config
|
||||||
|
- cd "$SDK_ROOT" && printf '%s\n' 'CONFIG_PACKAGE_amneziawg-tools=y' >> .config
|
||||||
|
- cd "$SDK_ROOT" && printf '%s\n' 'CONFIG_PACKAGE_luci-proto-amneziawg=y' >> .config
|
||||||
|
- cd "$SDK_ROOT" && printf '%s\n' 'CONFIG_PACKAGE_luci-i18n-amneziawg-ru=y' >> .config
|
||||||
|
- cd "$SDK_ROOT" && make defconfig
|
||||||
|
|
||||||
|
- cd "$SDK_ROOT" && make package/kmod-amneziawg/download V=s || true
|
||||||
|
- cd "$SDK_ROOT" && make package/kmod-amneziawg/prepare V=s || true
|
||||||
|
- cd "$SDK_ROOT" && make package/kmod-amneziawg/compile V=s
|
||||||
|
|
||||||
|
- cd "$SDK_ROOT" && make package/luci-proto-amneziawg/download V=s
|
||||||
|
- cd "$SDK_ROOT" && make package/luci-proto-amneziawg/prepare V=s
|
||||||
|
- cd "$SDK_ROOT" && make package/luci-proto-amneziawg/compile V=s
|
||||||
|
|
||||||
|
- cd "$SDK_ROOT" && make package/amneziawg-tools/download V=s
|
||||||
|
- cd "$SDK_ROOT" && make package/amneziawg-tools/prepare V=s
|
||||||
|
- cd "$SDK_ROOT" && make package/amneziawg-tools/compile V=s
|
||||||
|
|
||||||
|
- find "$SDK_ROOT/bin/packages" -type f -name 'amneziawg-tools*.ipk' -exec cp {} "$DRONE_WORKSPACE/awgrelease/" \;
|
||||||
|
- find "$SDK_ROOT/bin/packages" -type f -name 'luci-proto-amneziawg*.ipk' -exec cp {} "$DRONE_WORKSPACE/awgrelease/" \;
|
||||||
|
- find "$SDK_ROOT/bin/packages" -type f -name 'luci-i18n-amneziawg-ru*.ipk' -exec cp {} "$DRONE_WORKSPACE/awgrelease/" \;
|
||||||
|
- find "$SDK_ROOT/bin/targets" -type f -name 'kmod-amneziawg*.ipk' -exec cp {} "$DRONE_WORKSPACE/awgrelease/" \;
|
||||||
|
|
||||||
|
- test -n "$(find "$DRONE_WORKSPACE/awgrelease" -type f -name '*.ipk' | head -n1)"
|
||||||
|
- cp -a "$DRONE_WORKSPACE/awgrelease/." "/cache/awg-openwrt/$DRONE_TAG/"
|
||||||
|
- ls -lah "/cache/awg-openwrt/$DRONE_TAG/"
|
||||||
|
|
||||||
|
- name: publish-release
|
||||||
|
image: plugins/gitea-release
|
||||||
|
volumes:
|
||||||
|
- name: drone_cache
|
||||||
|
path: /cache
|
||||||
|
settings:
|
||||||
|
base_url: https://git.mzavitaev.ru
|
||||||
|
api_key:
|
||||||
|
from_secret: gitea_token
|
||||||
|
files:
|
||||||
|
- /cache/awg-openwrt/${DRONE_TAG}/*.ipk
|
||||||
|
checksum: sha256
|
||||||
|
file_exists: overwrite
|
||||||
|
title: AWG for OpenWrt 24.10.2
|
||||||
Reference in New Issue
Block a user