Skip to content

Commit 5487705

Browse files
authored
Build yocto on Github actions (#58)
1 parent 87c0e24 commit 5487705

File tree

6 files changed

+72
-141
lines changed

6 files changed

+72
-141
lines changed

.ci/Dockerfile

Lines changed: 0 additions & 32 deletions
This file was deleted.

.ci/Jenkinsfile

Lines changed: 0 additions & 57 deletions
This file was deleted.

.ci/yocto/Dockerfile

Lines changed: 0 additions & 50 deletions
This file was deleted.
Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
name: Yocto Layer Validation
2+
3+
on:
4+
push:
5+
branches: [ 'conan2/*' ]
6+
pull_request:
7+
branches: [ 'conan2/*' ]
8+
9+
jobs:
10+
validate-layer:
11+
runs-on: ubuntu-22.04
12+
13+
steps:
14+
- name: Extract Yocto release name
15+
run: |
16+
BRANCH_NAME=${GITHUB_REF#refs/heads/}
17+
if [[ $BRANCH_NAME == "conan2/"* ]]; then
18+
YOCTO_RELEASE=$(echo $BRANCH_NAME | cut -d'/' -f2)
19+
else
20+
YOCTO_RELEASE=$(echo $GITHUB_BASE_REF | cut -d'/' -f2)
21+
fi
22+
echo "YOCTO_RELEASE=$YOCTO_RELEASE" >> $GITHUB_ENV
23+
24+
- name: Checkout meta-conan
25+
uses: actions/checkout@v3
26+
with:
27+
path: meta-conan
28+
29+
- name: Install dependencies
30+
env:
31+
DEBIAN_FRONTEND: noninteractive
32+
run: |
33+
sudo apt-get -qq update
34+
sudo apt-get -qq install -y --no-install-recommends --no-install-suggests \
35+
gawk wget git diffstat unzip texinfo gcc build-essential \
36+
chrpath socat cpio python3 python3-pip python3-pexpect xz-utils debianutils \
37+
iputils-ping python3-git python3-jinja2 libegl1-mesa-dev libsdl1.2-dev pylint xterm
38+
39+
- name: Clone Poky
40+
run: |
41+
git clone -b ${{ env.YOCTO_RELEASE }} --depth 1 git://git.yoctoproject.org/poky
42+
cd poky
43+
git checkout -q ${{ env.YOCTO_RELEASE }}
44+
45+
- name: Clone meta-openembedded
46+
run: |
47+
git clone -b ${{ env.YOCTO_RELEASE }} --depth 1 git://git.openembedded.org/meta-openembedded
48+
cd meta-openembedded
49+
git checkout -q ${{ env.YOCTO_RELEASE }}
50+
51+
- name: Add Conan Mosquitto example
52+
run: |
53+
mkdir recipes-example
54+
echo 'inherit conan' > recipes-example/conan-mosquitto_2.0.18.bb
55+
echo 'DESCRIPTION = "An open source MQTT broker"' >> recipes-example/conan-mosquitto_2.0.18.bb
56+
echo 'LICENSE = "EPL-1.0"' >> recipes-example/conan-mosquitto_2.0.18.bb
57+
echo 'CONAN_PKG = "mosquitto/2.0.18"' >> recipes-example/conan-mosquitto_2.0.18.bb
58+
59+
- name: Setup build environment
60+
run: |
61+
source poky/oe-init-build-env build
62+
63+
echo 'IMAGE_INSTALL:append = " conan-mosquitto"' >> ${{ github.workspace }}/build/conf/local.conf
64+
echo 'CONAN_BUILD_POLICY = "missing"' >> ${{ github.workspace }}/build/conf/local.conf
65+
66+
bitbake-layers add-layer ../meta-openembedded/meta-oe
67+
bitbake-layers add-layer ../meta-openembedded/meta-python
68+
bitbake-layers add-layer ../meta-conan
69+
70+
bitbake-layers show-layers

LICENSE.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
The MIT License (MIT)
22

3-
Copyright (c) 2023 JFrog LTD
3+
Copyright (c) 2025 JFrog LTD
44

55

66

classes/conan.bbclass

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
# GitHub Repository: https://github.com/conan-io/meta-conan
1010
# Issues: https://github.com/conan-io/meta-conan/issues
1111

12-
PV = "0.2.0"
12+
PV = "0.3.0"
1313
LICENSE = "MIT"
1414
DEPENDS:append = " python3-conan-native"
1515
S = "${WORKDIR}"

0 commit comments

Comments
 (0)