new #6
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Test Build | |
on: | |
push: | |
branches: [ main ] | |
pull_request: | |
branches: [ main ] | |
workflow_dispatch: | |
jobs: | |
build: | |
name: Test ${{ matrix.arch }} | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
include: | |
- arch: aarch64_generic | |
target: arm64 | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
repository: lhuanyun/luci | |
ref: main | |
- name: Setup Git | |
run: | | |
git config --global --add safe.directory $GITHUB_WORKSPACE | |
git config --global --unset http.https://github.com/.extraheader || true | |
- name: Determine branch name | |
run: | | |
BRANCH="main" | |
echo "Building for $BRANCH" | |
echo "BRANCH=$BRANCH" >> $GITHUB_ENV | |
- name: Set package to build | |
run: | | |
PACKAGES="luci-app-commands luci-base luci-i18n-commands-zh-cn" | |
echo "Building $PACKAGES" | |
echo "PACKAGES=$PACKAGES" >> $GITHUB_ENV | |
- name: Build | |
uses: openwrt/gh-action-sdk@v5 | |
env: | |
ARCH: ${{ matrix.arch }}-${{ env.BRANCH }} | |
FEEDNAME: packages_ci | |
- name: Move created packages to project dir | |
run: | | |
mkdir -p output | |
find bin/packages/${{ matrix.arch }}/packages_ci -name 'luci-*.ipk' -exec cp {} output/ \; || true | |
- name: Debug - List package contents | |
run: | | |
for ipk in output/*.ipk; do | |
echo "Contents of $ipk:" | |
ar x "$ipk" data.tar.gz || continue | |
tar -tvzf data.tar.gz | grep -E 'luci|commands' || true | |
echo "Full content of $ipk:" | |
tar -tvzf data.tar.gz || true | |
rm -f data.tar.gz | |
done | |
- name: Store packages | |
uses: actions/upload-artifact@v4 | |
with: | |
name: ${{ matrix.arch}}-luci-packages | |
path: "output/*.ipk" | |
- name: Store logs | |
uses: actions/upload-artifact@v4 | |
with: | |
name: ${{ matrix.arch}}-logs | |
path: logs/ |