3.0.0
This commit is contained in:
commit
645c461d2a
12 files changed
+886
No files matched your search
@@ -0,0 +1,160 @@
|
||||
name: Build OpenWrt packages
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
tags:
|
||||
- "v*"
|
||||
pull_request:
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
include:
|
||||
- openwrt: "25.12.0"
|
||||
format: "apk"
|
||||
sdk_file: "openwrt-sdk-25.12.0-x86-64_gcc-14.3.0_musl.Linux-x86_64.tar.zst"
|
||||
sdk_sha256: "9f371906ce6d2f95418f69fac06df58bf9df0ffc4abed6206c30f1b547fcfc12"
|
||||
sdk_url: "https://downloads.openwrt.org/releases/25.12.0/targets/x86/64/openwrt-sdk-25.12.0-x86-64_gcc-14.3.0_musl.Linux-x86_64.tar.zst"
|
||||
|
||||
- openwrt: "24.10.8"
|
||||
format: "ipk"
|
||||
sdk_file: "openwrt-sdk-24.10.8-x86-64_gcc-13.3.0_musl.Linux-x86_64.tar.zst"
|
||||
sdk_sha256: "ac4a0405d2eea821b06f93c14ba13ffa90ad0457648903df7dde02570027ab21"
|
||||
sdk_url: "https://downloads.openwrt.org/releases/24.10.8/targets/x86/64/openwrt-sdk-24.10.8-x86-64_gcc-13.3.0_musl.Linux-x86_64.tar.zst"
|
||||
|
||||
- openwrt: "23.05.5"
|
||||
format: "ipk"
|
||||
sdk_file: "openwrt-sdk-23.05.5-x86-64_gcc-12.3.0_musl.Linux-x86_64.tar.xz"
|
||||
sdk_sha256: "9e5b6813a3f810123391f5f3ea10dfd1c14be1a880f410c70ec4424bbd1573d2"
|
||||
sdk_url: "https://downloads.openwrt.org/releases/23.05.5/targets/x86/64/openwrt-sdk-23.05.5-x86-64_gcc-12.3.0_musl.Linux-x86_64.tar.xz"
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Install build dependencies
|
||||
shell: bash
|
||||
run: |
|
||||
set -eux
|
||||
|
||||
if command -v sudo >/dev/null 2>&1; then
|
||||
SUDO=sudo
|
||||
else
|
||||
SUDO=
|
||||
fi
|
||||
|
||||
$SUDO apt-get update
|
||||
$SUDO env DEBIAN_FRONTEND=noninteractive apt-get install -y \
|
||||
build-essential \
|
||||
clang \
|
||||
flex \
|
||||
bison \
|
||||
gawk \
|
||||
gettext \
|
||||
git \
|
||||
libncurses-dev \
|
||||
libssl-dev \
|
||||
python3 \
|
||||
python3-pyelftools \
|
||||
python3-setuptools \
|
||||
rsync \
|
||||
swig \
|
||||
unzip \
|
||||
wget \
|
||||
xz-utils \
|
||||
zlib1g-dev \
|
||||
zstd
|
||||
|
||||
- name: Download and verify SDK
|
||||
shell: bash
|
||||
run: |
|
||||
set -eux
|
||||
wget -O "${{ matrix.sdk_file }}" "${{ matrix.sdk_url }}"
|
||||
echo "${{ matrix.sdk_sha256 }} ${{ matrix.sdk_file }}" | sha256sum -c -
|
||||
|
||||
- name: Extract SDK
|
||||
shell: bash
|
||||
run: |
|
||||
set -eux
|
||||
rm -rf _sdk
|
||||
mkdir _sdk
|
||||
|
||||
case "${{ matrix.sdk_file }}" in
|
||||
*.tar.zst)
|
||||
tar --zstd -xf "${{ matrix.sdk_file }}" --strip-components=1 -C _sdk
|
||||
;;
|
||||
*.tar.xz)
|
||||
tar -xJf "${{ matrix.sdk_file }}" --strip-components=1 -C _sdk
|
||||
;;
|
||||
*)
|
||||
echo "Unsupported SDK archive"
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
|
||||
- name: Prepare LuCI feed
|
||||
shell: bash
|
||||
working-directory: _sdk
|
||||
run: |
|
||||
set -eux
|
||||
./scripts/feeds update luci
|
||||
./scripts/feeds install luci-base
|
||||
|
||||
- name: Add package source
|
||||
shell: bash
|
||||
run: |
|
||||
set -eux
|
||||
PKG="_sdk/package/luci-app-led-scheduler"
|
||||
rm -rf "$PKG"
|
||||
mkdir -p "$PKG"
|
||||
|
||||
cp -a \
|
||||
Makefile \
|
||||
LICENSE \
|
||||
README.md \
|
||||
htdocs \
|
||||
root \
|
||||
"$PKG/"
|
||||
|
||||
- name: Configure SDK
|
||||
shell: bash
|
||||
working-directory: _sdk
|
||||
run: |
|
||||
set -eux
|
||||
make defconfig
|
||||
|
||||
- name: Build
|
||||
shell: bash
|
||||
working-directory: _sdk
|
||||
run: |
|
||||
set -eux
|
||||
make -j"$(nproc)" package/luci-app-led-scheduler/compile V=s
|
||||
|
||||
- name: Collect package
|
||||
shell: bash
|
||||
run: |
|
||||
set -eux
|
||||
mkdir -p artifacts
|
||||
|
||||
find _sdk/bin -type f \
|
||||
-name "luci-app-led-scheduler*.${{ matrix.format }}" \
|
||||
-exec cp -v {} artifacts/ \;
|
||||
|
||||
test -n "$(find artifacts -type f -name "luci-app-led-scheduler*.${{ matrix.format }}" -print -quit)"
|
||||
|
||||
echo "Built for OpenWrt ${{ matrix.openwrt }}:"
|
||||
ls -lh artifacts/
|
||||
|
||||
- name: Upload artifact
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: luci-app-led-scheduler-openwrt-${{ matrix.openwrt }}-${{ matrix.format }}
|
||||
path: artifacts/*
|
||||
if-no-files-found: error
|
||||
Reference in new issue
Block a user