Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
100 changes: 100 additions & 0 deletions .github/workflows/makefile_main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,100 @@
name: Build Check (main)

on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]

jobs:
build:
runs-on: ubuntu-latest

strategy:
matrix:
platform:
- name: "Raspberry Pi"
makefile_path: "build/linux/rpi/makefile"
- name: "Banana Pi R4"
makefile_path: "build/linux/bpi/makefile"
fail-fast: false

name: Build for ${{ matrix.platform.name }}

steps:
- name: Checkout current repository
uses: actions/checkout@v4
with:
path: 'OneWifi'

- name: Clone unified-wifi-mesh repository
run: |
mkdir -p easymesh_project
git clone https://github.com/rdkcentral/unified-wifi-mesh.git easymesh_project/unified-wifi-mesh
mv OneWifi easymesh_project/OneWifi

- name: Cache dependencies
uses: actions/cache@v4
with:
path: /var/cache/apt
key: ${{ runner.os }}-apt-${{ hashFiles('**/apt-packages') }}
restore-keys: |
${{ runner.os }}-apt-

- name: Set up dependencies
run: |
sudo apt-get update
sudo apt-get install -y build-essential \
cmake \
python3 \
python3-pip \
git \
vim \
libev-dev \
libjansson-dev \
zlib1g-dev \
libnl-3-dev \
libnl-genl-3-dev \
libnl-route-3-dev \
libavro-dev \
libcjson1 libcjson-dev \
libssl-dev \
uuid-dev \
libmysqlcppconn-dev \
libreadline-dev \
iptables \
mariadb-server \
gnupg \
file \
golang

- name: Setup OneWiFi for ${{ matrix.platform.name }}
working-directory: easymesh_project/OneWifi
run: |
git config --global user.email "${{ github.actor }}@users.noreply.github.com"
git config --global user.name "${{ github.actor }}"

MF="${{ matrix.platform.makefile_path }}"
if [ ! -f "$MF" ]; then
echo "Makefile '$MF' not on main; pulling its folder from develop…"
git remote add upstream https://github.com/rdkcentral/OneWifi.git || true
git fetch --depth=1 upstream develop
plat_dir="$(dirname "$MF")"
git checkout upstream/develop -- "$plat_dir"
fi

if [ ! -f "$MF" ]; then
echo "Still missing '$MF'; falling back to generic build/linux/makefile"
MF="build/linux/makefile"
fi

make -f "$MF" setup
env:
GITHUB_ACTOR: ${{ github.actor }}

- name: Build OneWiFi for ${{ matrix.platform.name }}
working-directory: easymesh_project/OneWifi
run: |
MF="${{ matrix.platform.makefile_path }}"
[ -f "$MF" ] || MF="build/linux/makefile"
make -f "$MF" all