mirror of
https://github.com/Zxilly/UA2F.git
synced 2026-01-04 17:47:32 +00:00
120 lines
2.7 KiB
YAML
120 lines
2.7 KiB
YAML
name: Build OpenWRT Package
|
|
|
|
on:
|
|
push:
|
|
paths-ignore:
|
|
- '**.md'
|
|
workflow_dispatch:
|
|
pull_request:
|
|
paths-ignore:
|
|
- '**.md'
|
|
|
|
jobs:
|
|
test:
|
|
name: Run unit tests
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v3
|
|
with:
|
|
fetch-depth: 0
|
|
|
|
- name: Install dependencies
|
|
run: |
|
|
sudo apt-get update
|
|
sudo apt-get install -y cmake libnetfilter-queue-dev libmnl-dev libnetfilter-conntrack-dev
|
|
|
|
- name: Run unit tests
|
|
run: |
|
|
cmake -S . -B build
|
|
cmake --build build --target ua2f_test
|
|
./build/ua2f_test
|
|
|
|
|
|
build:
|
|
name: Build ${{ matrix.arch }}
|
|
runs-on: ubuntu-latest
|
|
needs:
|
|
- test
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
include:
|
|
- arch: aarch64_cortex-a53
|
|
target: mvebu-cortexa53
|
|
|
|
- arch: aarch64_cortex-a72
|
|
target: mvebu-cortexa72
|
|
|
|
- arch: aarch64_generic
|
|
target: rockchip-armv8
|
|
|
|
- arch: arm_cortex-a7_neon-vfpv4
|
|
target: ipq40xx-generic
|
|
|
|
- arch: arm_cortex-a9_vfpv3-d16
|
|
target: mvebu-cortexa9
|
|
|
|
- arch: arm_cortex-a15_neon-vfpv4
|
|
target: armvirt-32
|
|
|
|
- arch: i386_pentium4
|
|
target: x86-generic
|
|
|
|
- arch: i386_pentium-mmx
|
|
target: x86-geode
|
|
|
|
- arch: mips_24kc
|
|
target: ath79-generic
|
|
|
|
- arch: mipsel_24kc
|
|
target: mt7621
|
|
|
|
- arch: powerpc_464fp
|
|
target: apm821xx-nand
|
|
|
|
- arch: powerpc_8548
|
|
target: mpc85xx-p1010
|
|
|
|
- arch: x86_64
|
|
target: x86-64
|
|
|
|
steps:
|
|
- uses: actions/checkout@v3
|
|
with:
|
|
fetch-depth: 0
|
|
|
|
- name: Build
|
|
uses: openwrt/gh-action-sdk@v5
|
|
env:
|
|
ARCH: ${{ matrix.arch }}
|
|
FEEDNAME: packages_ci
|
|
PACKAGES: openwrt
|
|
|
|
- name: Move created packages to project dir
|
|
run: cp bin/packages/${{ matrix.arch }}/packages_ci/*.ipk . || true
|
|
|
|
- name: Store packages
|
|
uses: actions/upload-artifact@v3
|
|
if: "!startsWith(github.ref, 'refs/tags/v')"
|
|
with:
|
|
name: ${{ matrix.arch}}-${{ github.sha}}-packages
|
|
path: "*.ipk"
|
|
|
|
- name: Upload packages
|
|
uses: svenstaro/upload-release-action@v2
|
|
if: "startsWith(github.ref, 'refs/tags/v')"
|
|
with:
|
|
repo_token: ${{ github.token }}
|
|
file: "*.ipk"
|
|
tag: ${{ github.ref }}
|
|
file_glob: true
|
|
|
|
- name: Store logs
|
|
uses: actions/upload-artifact@v3
|
|
with:
|
|
name: ${{ matrix.arch}}-${{ github.sha }}-logs
|
|
path: logs/
|
|
|
|
- name: Remove logs
|
|
run: sudo rm -rf logs/ || true
|