Skip to content

Commit 7502d85

Browse files
committed
Fix BitBake CI by creating missing local.conf
1 parent cf57708 commit 7502d85

1 file changed

Lines changed: 62 additions & 0 deletions

File tree

.github/workflows/bitbake-ci.yml

Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
name: BitBake CI
2+
3+
on:
4+
push:
5+
pull_request:
6+
workflow_dispatch:
7+
8+
jobs:
9+
build-and-test:
10+
name: ${{ matrix.target }}
11+
runs-on: ubuntu-latest
12+
strategy:
13+
fail-fast: false
14+
matrix:
15+
include:
16+
- target: static
17+
build_recipe: build-static
18+
test_recipe: test-static
19+
- target: dynamic
20+
build_recipe: build-dynamic
21+
test_recipe: test-dynamic
22+
23+
steps:
24+
- name: Check out repository
25+
uses: actions/checkout@v4
26+
27+
- name: Set up Python
28+
uses: actions/setup-python@v5
29+
with:
30+
python-version: '3.12'
31+
32+
- name: Install system dependencies
33+
run: |
34+
sudo apt-get update
35+
sudo apt-get install -y build-essential git
36+
37+
- name: Install BitBake
38+
run: |
39+
git clone --depth 1 https://github.com/openembedded/bitbake.git "$RUNNER_TEMP/bitbake"
40+
echo "PATH=$RUNNER_TEMP/bitbake/bin:$PATH" >> "$GITHUB_ENV"
41+
echo "PYTHONPATH=$RUNNER_TEMP/bitbake/lib:${PYTHONPATH:-}" >> "$GITHUB_ENV"
42+
43+
- name: Verify BitBake installation
44+
run: bitbake --version
45+
46+
- name: Ensure BitBake local.conf exists
47+
working-directory: build
48+
run: |
49+
mkdir -p conf
50+
if [ ! -f conf/local.conf ]; then
51+
{
52+
echo 'MACHINE = "qemux86"'
53+
echo 'BB_NUMBER_THREADS = "2"'
54+
echo 'PARALLEL_MAKE = "-j2"'
55+
} > conf/local.conf
56+
fi
57+
58+
- name: Build and test (${{ matrix.target }})
59+
working-directory: build
60+
run: |
61+
bitbake "${{ matrix.build_recipe }}"
62+
bitbake "${{ matrix.test_recipe }}"

0 commit comments

Comments
 (0)