Skip to content

Commit b396d37

Browse files
committed
ci: add workflow for builds
Signed-off-by: ozan956 <ozandurgut.2001@hotmail.com>
1 parent a09c013 commit b396d37

1 file changed

Lines changed: 64 additions & 0 deletions

File tree

.github/workflows/build.yaml

Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
name: Build ADI br2-external
2+
3+
on:
4+
push:
5+
pull_request:
6+
7+
jobs:
8+
build:
9+
runs-on: ubuntu-latest
10+
11+
steps:
12+
- name: Checkout br2-external
13+
uses: actions/checkout@v4
14+
with:
15+
submodules: recursive
16+
17+
- name: Install Buildroot dependencies
18+
run: |
19+
sudo apt-get update
20+
sudo apt-get install -y \
21+
build-essential git gcc g++ make bc unzip file rsync \
22+
cpio wget python3
23+
24+
- name: Cache Buildroot downloads
25+
uses: actions/cache@v4
26+
with:
27+
path: buildroot/dl
28+
key: ${{ runner.os }}-buildroot-dl-${{ hashFiles('**/configs/*.fragment', '**/configs/*.defconfig') }}
29+
restore-keys: |
30+
${{ runner.os }}-buildroot-dl-
31+
32+
- name: Cache Buildroot output
33+
uses: actions/cache@v4
34+
with:
35+
path: buildroot/output
36+
key: buildroot-output-${{ github.sha }}
37+
restore-keys: |
38+
buildroot-output-
39+
40+
- name: Build ADI SC598 EZ-Kit image
41+
run: |
42+
cd buildroot
43+
44+
make BR2_EXTERNAL="${GITHUB_WORKSPACE}" adi_sc598_ezkit_defconfig
45+
46+
support/kconfig/merge_config.sh .config \
47+
"${GITHUB_WORKSPACE}/configs/buildroot.fragment" \
48+
"${GITHUB_WORKSPACE}/configs/debug.fragment"
49+
50+
make -j$(nproc)
51+
52+
- name: Upload Buildroot output images
53+
if: success()
54+
uses: actions/upload-artifact@v4
55+
with:
56+
name: buildroot-images
57+
path: buildroot/output/images
58+
59+
- name: Upload build logs on failure
60+
if: failure()
61+
uses: actions/upload-artifact@v4
62+
with:
63+
name: build-logs
64+
path: buildroot/output/build

0 commit comments

Comments
 (0)