feat: allow set UA with uci #144
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: 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 -DUA2F_BUILD_TESTS=ON | |
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 |