Skip to content
This repository has been archived by the owner on Sep 26, 2023. It is now read-only.

Merge pull request #72 from messense/update-netbird-version #157

Merge pull request #72 from messense/update-netbird-version

Merge pull request #72 from messense/update-netbird-version #157

Workflow file for this run

name: CI
on:
push:
branches: [ main ]
tags: [ 'v*' ]
pull_request:
jobs:
build:
name: Build - ${{ matrix.target.arch }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
target:
- arch: "aarch64_generic"
sdk: "https://downloads.openwrt.org/releases/22.03.5/targets/rockchip/armv8/openwrt-sdk-22.03.5-rockchip-armv8_gcc-11.2.0_musl.Linux-x86_64.tar.xz"
- arch: "arm_cortex-a9"
sdk: "https://downloads.openwrt.org/releases/22.03.5/targets/bcm53xx/generic/openwrt-sdk-22.03.5-bcm53xx-generic_gcc-11.2.0_musl_eabi.Linux-x86_64.tar.xz"
- arch: "arm_cortex-a15"
sdk: "https://downloads.openwrt.org/releases/22.03.5/targets/ipq806x/generic/openwrt-sdk-22.03.5-ipq806x-generic_gcc-11.2.0_musl_eabi.Linux-x86_64.tar.xz"
- arch: "aarch64_cortex-a53"
sdk: "https://downloads.openwrt.org/releases/22.03.5/targets/bcm27xx/bcm2710/openwrt-sdk-22.03.5-bcm27xx-bcm2710_gcc-11.2.0_musl.Linux-x86_64.tar.xz"
- arch: "aarch64_cortex-a72"
sdk: "https://downloads.openwrt.org/releases/22.03.5/targets/bcm27xx/bcm2711/openwrt-sdk-22.03.5-bcm27xx-bcm2711_gcc-11.2.0_musl.Linux-x86_64.tar.xz"
- arch: "arm_cortex-a7_neon-vfpv4"
sdk: "https://downloads.openwrt.org/releases/22.03.5/targets/ipq40xx/generic/openwrt-sdk-22.03.5-ipq40xx-generic_gcc-11.2.0_musl_eabi.Linux-x86_64.tar.xz"
- arch: "x86_64"
sdk: "https://downloads.openwrt.org/releases/22.03.5/targets/x86/64/openwrt-sdk-22.03.5-x86-64_gcc-11.2.0_musl.Linux-x86_64.tar.xz"
- arch: "i386_pentium4"
sdk: "https://downloads.openwrt.org/releases/22.03.5/targets/x86/generic/openwrt-sdk-22.03.5-x86-generic_gcc-11.2.0_musl.Linux-x86_64.tar.xz"
- arch: "mips_74kc"
sdk: "https://downloads.openwrt.org/releases/22.03.5/targets/ath79/generic/openwrt-sdk-22.03.5-ath79-generic_gcc-11.2.0_musl.Linux-x86_64.tar.xz"
- arch: "mipsel_24kc"
sdk: "https://downloads.openwrt.org/releases/22.03.5/targets/ramips/mt7621/openwrt-sdk-22.03.5-ramips-mt7621_gcc-11.2.0_musl.Linux-x86_64.tar.xz"
steps:
- uses: actions/checkout@v2
- name: Install build requirements
run: |
sudo apt-get update
sudo apt-get install -y build-essential ccache ecj fastjar file g++ gawk \
gettext git java-propose-classpath libelf-dev libncurses5-dev \
libncursesw5-dev libssl-dev python3 unzip wget \
python3-distutils python3-setuptools python3-dev rsync subversion \
swig time xsltproc zlib1g-dev
- name: Install OpenWrt SDK
run: |
wget -O openwrt-sdk.tar.xz ${{ matrix.target.sdk }}
xz -q -d openwrt-sdk.tar.xz && tar -xvf openwrt-sdk.tar
mv -f openwrt-sdk-* openwrt-sdk
- name: Build Package
run: |
echo "src-link netbird $GITHUB_WORKSPACE" > openwrt-sdk/feeds.conf
echo 'CONFIG_PACKAGE_netbird=y
' >> openwrt-sdk/.config
cd openwrt-sdk
git clone https://github.com/kuoruan/openwrt-upx.git package/upx
git -C package/upx checkout 2c2ee0d696ea6084bee893a2861a7ed0729728ed # upx version: v2022-10-20
#cat feeds.conf.default >> feeds.conf
echo 'src-git packages https://git.openwrt.org/feed/packages.git^8939b43659dabe9b737feee02976949ad0355adc' >> feeds.conf # feeds/packages: OpenWrt v23.05.0-rc2
cat feeds.conf
./scripts/feeds update -a > /dev/null
rm -rf ./feeds/packages/net/netbird
make defconfig
./scripts/feeds install -d y -f -a
make package/netbird/compile V=s CONFIG_NETBIRD_COMPRESS_UPX=y
tree bin/packages/
- name: Archive package
uses: actions/upload-artifact@v2
with:
name: netbird-${{ matrix.target.arch }}
path: openwrt-sdk/bin/packages/*/netbird/netbird*.ipk
if-no-files-found: error
- name: Upload package to GitHub Release
uses: svenstaro/upload-release-action@v2
if: "startsWith(github.ref, 'refs/tags/')"
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file_glob: true
overwrite: true
file: openwrt-sdk/bin/packages/*/netbird/netbird*.ipk
tag: ${{ github.ref }}