mirror of
https://github.com/outbackdingo/openwrt-builder.git
synced 2026-01-27 10:19:59 +00:00
Add build for clean AX3600 build
This commit is contained in:
135
.github/workflows/ax3600-nss.yaml
vendored
Normal file
135
.github/workflows/ax3600-nss.yaml
vendored
Normal file
@@ -0,0 +1,135 @@
|
||||
---
|
||||
# Based on https://github.com/JuliusBairaktaris/Qualcommax_NSS_Builder/blob/main/.github/workflows/build.yaml
|
||||
# It includes the NSS package: https://github.com/qosmio/nss-packages
|
||||
name: Build OpenWRT for Xiaomi AX3600 NSS build
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
|
||||
env:
|
||||
REMOTE_REPOSITORY: qosmio/openwrt-ipq
|
||||
# REMOTE_BRANCH: qualcommax-6.x-nss-wifi
|
||||
REMOTE_BRANCH: qualcommax-6.x-nss-wifi
|
||||
RELEASE_PREFIX: IPQ_8074_ax3600
|
||||
DEVICE_CONFIG: configs/qualcommax/ax3600
|
||||
ROLE_CONFIG: configs/common/main-router
|
||||
NSS_CONFIG: configs/common/nss
|
||||
NSS_PACKAGES_REPOSITORY: qosmio/nss-packages
|
||||
NSS_PACKAGES_REPOSITORY_BRANCH: NSS-12.5-K6.x
|
||||
|
||||
jobs:
|
||||
check_commits:
|
||||
name: Check for new commits
|
||||
runs-on: ubuntu-24.04
|
||||
outputs:
|
||||
new_commits: ${{ steps.check_new_commits.outputs.new_commits }}
|
||||
latest_commit_sha: ${{ steps.check_new_commits.outputs.latest_commit_sha }}
|
||||
steps:
|
||||
- name: Check for new commits
|
||||
id: check_new_commits
|
||||
run: |
|
||||
latest_commit_sha=$(curl -sL "https://api.github.com/repos/${{ env.REMOTE_REPOSITORY }}/commits?sha=${{ env.REMOTE_BRANCH }}&per_page=1" | jq -r '.[0].sha')
|
||||
last_built_commit_sha=$(curl -sL "https://api.github.com/repos/${{ github.repository }}/releases/latest" | jq -r '.body' | grep -oP 'Build Commit: \K\w+' || echo '')
|
||||
echo "new_commits=$([[ "$latest_commit_sha" != "$last_built_commit_sha" ]] && echo "true" || echo "false")" >> $GITHUB_OUTPUT
|
||||
echo "latest_commit_sha=$latest_commit_sha" >> $GITHUB_OUTPUT
|
||||
- name: Check for new commits in NSS Packages Repository
|
||||
id: check_nss_packages_repo_new_commits
|
||||
run: |
|
||||
nss_packages_repo_latest_commit_sha=$(curl -sL "https://api.github.com/repos/${{ env.NSS_PACKAGES_REPOSITORY }}/commits?sha=${{ env.NSS_PACKAGES_REPOSITORY_BRANCH }}&per_page=1" | jq -r '.[0].sha')
|
||||
nss_packages_repo_last_built_commit_sha=$(curl -sL "https://api.github.com/repos/${{ github.repository }}/releases/latest" | jq -r '.body' | grep -oP 'NSS Packages Commit: \K\w+' || echo '')
|
||||
echo "new_commits=$([[ "$nss_packages_repo_latest_commit_sha" != "$nss_packages_repo_last_built_commit_sha" ]] && echo "true" || echo "false")" >> $GITHUB_OUTPUT
|
||||
echo "latest_commit_sha=$nss_packages_repo_latest_commit_sha" >> $GITHUB_OUTPUT
|
||||
|
||||
build:
|
||||
name: Build OpenWRT for AX3600 - NSS build
|
||||
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 zstd
|
||||
sudo apt full-upgrade -y
|
||||
|
||||
- name: Checkout remote repository
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
repository: ${{ env.REMOTE_REPOSITORY }}
|
||||
ref: ${{ env.REMOTE_BRANCH }}
|
||||
|
||||
- name: Checkout current repository
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
path: "custom_repo"
|
||||
|
||||
- name: Update and install feeds
|
||||
run: |
|
||||
./scripts/feeds update -a
|
||||
./scripts/feeds install -a
|
||||
|
||||
# NOTE: Temporary do not use LLVM
|
||||
# curl -SL https://raw.githubusercontent.com/danpawlik/openwrt-builder/master/configs/common/snapshot-short >> .config
|
||||
#
|
||||
- name: Configure firmware image
|
||||
run: |
|
||||
curl -SL https://raw.githubusercontent.com/danpawlik/openwrt-builder/master/configs/qualcommax/ax3600 > .config
|
||||
curl -SL https://raw.githubusercontent.com/danpawlik/openwrt-builder/master/configs/common/main-router >> .config
|
||||
curl -SL https://raw.githubusercontent.com/danpawlik/openwrt-builder/master/configs/common/nss >> .config
|
||||
sed -i '/CONFIG_ALL_KMODS=y/d' .config
|
||||
sed -i '/CONFIG_ALL_NONSHARED=y/d' .config
|
||||
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
|
||||
|
||||
# If debugging and container is a root: export FORCE_UNSAFE_CONFIGURE=1
|
||||
- name: Build the firmware image
|
||||
run: make -j $(nproc) defconfig download world
|
||||
|
||||
- name: Package output
|
||||
run: tar -cvf ax_3600-images.tar bin/targets/qualcommax/ipq807x
|
||||
|
||||
- name: Upload artifacts
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: ax_3600-images
|
||||
path: ax_3600-images.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: ax_3600-images
|
||||
- name: Extract artifacts
|
||||
run: tar xf ax_3600-images.tar
|
||||
|
||||
- name: Get current date
|
||||
run: echo "RELEASE_DATE=$(date +%F)" >> $GITHUB_ENV
|
||||
|
||||
- name: Create release
|
||||
uses: softprops/action-gh-release@master
|
||||
with:
|
||||
files: bin/targets/qualcommax/ipq807x/*
|
||||
tag_name: ${{ env.RELEASE_PREFIX }}-${{ env.REMOTE_BRANCH }}-${{ env.RELEASE_DATE }}
|
||||
name: OpenWRT AX3600-NSS - ${{ env.REMOTE_BRANCH }} - ${{ env.RELEASE_DATE }}
|
||||
body: |
|
||||
Updated prebuilt images for ${{ env.RELEASE_DATE }}
|
||||
Build Commit: ${{ needs.check_commits.outputs.latest_commit_sha }}
|
||||
NSS Packages Commit: ${{ needs.check_commits.outputs.nss_packages_repo_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 }}
|
||||
73
.github/workflows/ax3600.yaml
vendored
73
.github/workflows/ax3600.yaml
vendored
@@ -1,47 +1,38 @@
|
||||
---
|
||||
# Based on https://github.com/JuliusBairaktaris/Qualcommax_NSS_Builder/blob/main/.github/workflows/build.yaml
|
||||
# It includes the NSS package: https://github.com/qosmio/nss-packages
|
||||
name: Build OpenWRT for Xiaomi AX3600 NSS build
|
||||
name: Build OpenWRT for Xiaomi AX3600 - clean OpenWRT
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
|
||||
env:
|
||||
REMOTE_REPOSITORY: qosmio/openwrt-ipq
|
||||
# REMOTE_BRANCH: qualcommax-6.x-nss-wifi
|
||||
REMOTE_BRANCH: qualcommax-6.x-nss-wifi
|
||||
RELEASE_PREFIX: IPQ_8074_ax3600
|
||||
REMOTE_REPOSITORY: openwrt/openwrt
|
||||
REMOTE_BRANCH: main
|
||||
RELEASE_PREFIX: Mediatek_qualcomm_ax3600
|
||||
DEVICE_CONFIG: configs/qualcommax/ax3600
|
||||
ROLE_CONFIG: configs/common/main-router
|
||||
NSS_CONFIG: configs/common/nss
|
||||
NSS_PACKAGES_REPOSITORY: qosmio/nss-packages
|
||||
NSS_PACKAGES_REPOSITORY_BRANCH: NSS-12.5-K6.x
|
||||
|
||||
jobs:
|
||||
check_commits:
|
||||
name: Check for new commits
|
||||
name: Check Commits
|
||||
runs-on: ubuntu-24.04
|
||||
outputs:
|
||||
new_commits: ${{ steps.check_new_commits.outputs.new_commits }}
|
||||
latest_commit_sha: ${{ steps.check_new_commits.outputs.latest_commit_sha }}
|
||||
latest_commit_sha: ${{ steps.get_sha.outputs.latest_commit_sha }}
|
||||
steps:
|
||||
- name: Check for new commits
|
||||
id: check_new_commits
|
||||
- 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: |
|
||||
latest_commit_sha=$(curl -sL "https://api.github.com/repos/${{ env.REMOTE_REPOSITORY }}/commits?sha=${{ env.REMOTE_BRANCH }}&per_page=1" | jq -r '.[0].sha')
|
||||
last_built_commit_sha=$(curl -sL "https://api.github.com/repos/${{ github.repository }}/releases/latest" | jq -r '.body' | grep -oP 'Build Commit: \K\w+' || echo '')
|
||||
echo "new_commits=$([[ "$latest_commit_sha" != "$last_built_commit_sha" ]] && echo "true" || echo "false")" >> $GITHUB_OUTPUT
|
||||
echo "latest_commit_sha=$latest_commit_sha" >> $GITHUB_OUTPUT
|
||||
- name: Check for new commits in NSS Packages Repository
|
||||
id: check_nss_packages_repo_new_commits
|
||||
run: |
|
||||
nss_packages_repo_latest_commit_sha=$(curl -sL "https://api.github.com/repos/${{ env.NSS_PACKAGES_REPOSITORY }}/commits?sha=${{ env.NSS_PACKAGES_REPOSITORY_BRANCH }}&per_page=1" | jq -r '.[0].sha')
|
||||
nss_packages_repo_last_built_commit_sha=$(curl -sL "https://api.github.com/repos/${{ github.repository }}/releases/latest" | jq -r '.body' | grep -oP 'NSS Packages Commit: \K\w+' || echo '')
|
||||
echo "new_commits=$([[ "$nss_packages_repo_latest_commit_sha" != "$nss_packages_repo_last_built_commit_sha" ]] && echo "true" || echo "false")" >> $GITHUB_OUTPUT
|
||||
echo "latest_commit_sha=$nss_packages_repo_latest_commit_sha" >> $GITHUB_OUTPUT
|
||||
echo "latest_commit_sha=$(git rev-parse HEAD)" >> $GITHUB_ENV
|
||||
echo "latest_commit_sha=$(git rev-parse HEAD)" >> $GITHUB_OUTPUT
|
||||
|
||||
build:
|
||||
name: Build OpenWRT for AX3600
|
||||
name: Build OpenWRT for AX3600 - clean OpenWRT
|
||||
needs: [check_commits]
|
||||
runs-on: ubuntu-24.04
|
||||
steps:
|
||||
@@ -51,7 +42,7 @@ jobs:
|
||||
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 zstd
|
||||
python3-setuptools rsync swig unzip zlib1g-dev file wget curl
|
||||
sudo apt full-upgrade -y
|
||||
|
||||
- name: Checkout remote repository
|
||||
@@ -60,33 +51,24 @@ jobs:
|
||||
repository: ${{ env.REMOTE_REPOSITORY }}
|
||||
ref: ${{ env.REMOTE_BRANCH }}
|
||||
|
||||
- name: Checkout current repository
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
path: "custom_repo"
|
||||
|
||||
- name: Update and install feeds
|
||||
run: |
|
||||
./scripts/feeds update -a
|
||||
./scripts/feeds install -a
|
||||
|
||||
# NOTE: Temporary do not use LLVM
|
||||
# curl -SL https://raw.githubusercontent.com/danpawlik/openwrt-builder/master/configs/common/snapshot-short >> .config
|
||||
#
|
||||
- name: Configure firmware image
|
||||
run: |
|
||||
curl -SL https://raw.githubusercontent.com/danpawlik/openwrt-builder/master/configs/qualcommax/ax3600 > .config
|
||||
curl -SL https://raw.githubusercontent.com/danpawlik/openwrt-builder/master/configs/common/main-router >> .config
|
||||
curl -SL https://raw.githubusercontent.com/danpawlik/openwrt-builder/master/configs/common/nss >> .config
|
||||
sed -i '/CONFIG_ALL_KMODS=y/d' .config
|
||||
sed -i '/CONFIG_ALL_NONSHARED=y/d' .config
|
||||
curl -SL https://raw.githubusercontent.com/danpawlik/openwrt-builder/master/${{ env.DEVICE_CONFIG }} > .config
|
||||
curl -SL https://raw.githubusercontent.com/danpawlik/openwrt-builder/master/${{ env.ROLE_CONFIG }} >> .config
|
||||
curl -SL https://raw.githubusercontent.com/danpawlik/openwrt-builder/master/configs/common/snapshot-short >> .config
|
||||
sed -i '/CONFIG_PACKAGE_wpad-mbedtls=y/d' .config
|
||||
curl -SL https://raw.githubusercontent.com/danpawlik/openwrt-builder/master/configs/common/openssl >> .config
|
||||
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: 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
|
||||
|
||||
# If debugging and container is a root: export FORCE_UNSAFE_CONFIGURE=1
|
||||
- name: Build the firmware image
|
||||
run: make -j $(nproc) defconfig download world
|
||||
|
||||
@@ -120,11 +102,10 @@ jobs:
|
||||
with:
|
||||
files: bin/targets/qualcommax/ipq807x/*
|
||||
tag_name: ${{ env.RELEASE_PREFIX }}-${{ env.REMOTE_BRANCH }}-${{ env.RELEASE_DATE }}
|
||||
name: OpenWRT AX3600-NSS - ${{ env.REMOTE_BRANCH }} - ${{ env.RELEASE_DATE }}
|
||||
name: OpenWRT AX3600 - ${{ env.REMOTE_BRANCH }} - ${{ env.RELEASE_DATE }}
|
||||
body: |
|
||||
Updated prebuilt images for ${{ env.RELEASE_DATE }}
|
||||
Build Commit: ${{ needs.check_commits.outputs.latest_commit_sha }}
|
||||
NSS Packages Commit: ${{ needs.check_commits.outputs.nss_packages_repo_latest_commit_sha }}
|
||||
|
||||
- name: Clean up old releases
|
||||
uses: dev-drprasad/delete-older-releases@master
|
||||
|
||||
Reference in New Issue
Block a user