new #4
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: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
repository: lhuanyun/luci | |
ref: main | |
- 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" | |
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/ \; | |
- 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/ | |
- name: Debug - List package contents | |
run: | | |
for ipk in output/*.ipk; do | |
echo "Contents of $ipk:" | |
ar x "$ipk" data.tar.gz | |
tar -tvzf data.tar.gz | grep -E 'luci|commands' | |
rm data.tar.gz | |
done |