Files
openwrt-builder/.github/workflows/b3000-nss.yaml
2025-07-06 20:04:40 +02:00

122 lines
4.0 KiB
YAML

---
name: Gl.iNet b3000
on:
workflow_dispatch:
env:
REMOTE_REPOSITORY: qosmio/openwrt-ipq
REMOTE_BRANCH: main-nss
RELEASE_PREFIX: Ipq5018-nss
BUILD_PATH: bin/targets/qualcommax/ipq50xx
jobs:
check_commits:
name: Check Commits
runs-on: ubuntu-24.04
outputs:
latest_commit_sha: ${{ steps.get_sha.outputs.latest_commit_sha }}
steps:
- name: Checkout remote repository
uses: actions/checkout@v4
with:
repository: ${{ env.REMOTE_REPOSITORY }}
ref: ${{ env.REMOTE_BRANCH }}
- name: Get the latest commit SHA
id: get_sha
run: |
echo "latest_commit_sha=$(git rev-parse HEAD)" >> $GITHUB_ENV
echo "latest_commit_sha=$(git rev-parse HEAD)" >> $GITHUB_OUTPUT
build:
name: Build OpenWRT with NSS for B3000
needs: [check_commits]
runs-on: ubuntu-24.04
steps:
- name: Install dependencies
run: |
sudo apt update
sudo apt install -y \
build-essential clang flex bison g++ gawk \
gcc-multilib g++-multilib gettext git libncurses5-dev libssl-dev \
python3-setuptools rsync swig unzip zlib1g-dev file wget curl
sudo apt full-upgrade -y
- name: Checkout remote repository
uses: actions/checkout@v4
with:
repository: ${{ env.REMOTE_REPOSITORY }}
ref: ${{ env.REMOTE_BRANCH }}
- name: Update and install feeds
run: |
./scripts/feeds update -a
./scripts/feeds install -a
- name: Configure firmware image
run: |
curl -SL https://raw.githubusercontent.com/danpawlik/openwrt-builder/master/configs/qualcommax/ipq50xx/gl-b3000-nss > .config
curl -SL https://raw.githubusercontent.com/danpawlik/openwrt-builder/master/configs/common/dumb_ap >> .config
curl -SL https://raw.githubusercontent.com/danpawlik/openwrt-builder/master/configs/common/qosmio-nss-minimal >> .config
curl -SL https://raw.githubusercontent.com/danpawlik/openwrt-builder/master/configs/common/snapshot >> .config
# Workaround - https://forum.openwrt.org/t/qualcommax-nss-build/148529/4710
- name: Remove problematic patch for ipq5018
run: |
find . -type f -name 999-900-bss-transition-handling.patch -delete
- name: Run defconfig
run:
make defconfig
- name: Remove packages that are marked as modules
run: |
grep "=m" .config | grep -v 'CONFIG_PACKAGE_libustream-mbedtls=m' | while read -r line; do module=$(echo "$line" | cut -f1 -d'='); sed -i "s/^$line$/# $module is not set/" .config; done
- name: Build the firmware image
run: make -j $(nproc) defconfig download world
- name: Package output
run: tar -cvf b3000.tar ${{ env.BUILD_PATH }}/
- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name: b3000
path: b3000.tar
release:
name: Create release
needs: [build, check_commits]
if: needs.build.result == 'success'
runs-on: ubuntu-24.04
steps:
- name: Download artifacts
uses: actions/download-artifact@v4
with:
name: b3000
- name: Extract artifacts
run: tar xf b3000.tar
- name: Get current date
run: echo "RELEASE_DATE=$(date +%F)" >> $GITHUB_ENV
- name: Create release
uses: softprops/action-gh-release@master
with:
files: ${{ env.BUILD_PATH }}/*
tag_name: ${{ env.RELEASE_PREFIX }}-${{ env.REMOTE_BRANCH }}-${{ env.RELEASE_DATE }}
name: OpenWRT Gl.iNet b3000 with NSS - ${{ env.REMOTE_BRANCH }} - ${{ env.RELEASE_DATE }}
body: |
Updated prebuilt images for ${{ env.RELEASE_DATE }}
Build Commit: ${{ needs.check_commits.outputs.latest_commit_sha }}
- name: Clean up old releases
uses: dev-drprasad/delete-older-releases@master
with:
keep_latest: 5
delete_tags: false
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}