how to set up jenkins (or other ci tool) for ESP-ADF

mkseven32
Posts: 32
Joined: Mon Apr 23, 2018 1:21 am

how to set up jenkins (or other ci tool) for ESP-ADF

Postby mkseven32 » Thu May 17, 2018 8:21 am

Hi all
i see there is a ci directory in the ESP-ADF packet under tool directory.

is that mean ESP-ADF had support Continuous integration?

how could we config jenkins for ESP-ADF Continuous integration?

BR!

ESP_Angus
Posts: 2344
Joined: Sun May 08, 2016 4:11 am

Re: how to set up jenkins (or other ci tool) for ESP-ADF

Postby ESP_Angus » Fri May 18, 2018 2:01 am

Hi,

I noticed you posted the same question in two forums and one otherwise unrelated thread. Please do not do this. I've deleted the duplicates.

We have CI in ESP-ADF and our other projects such as ESP-IDF to validate changes which are made in the project. We build examples, check for warnings, and run a bank of unit & integration tests. Our CI runs on our internal Gitlab installation, before changes are pushed to our public repo no Github.

Most of our CI setup is internal for Espressif use, although some code/docs are available including the unit testing framework (based on Unity) so you can, for example, write your own firmware unit tests to run on an ESP32. The "test runner" functionality for automating test runs is unfortunately not published publically at this time, and it's probably not immediately suitable for non-Espressif configurations anyhow.

The CI framework we use is gitlab-ci as we use Gitlab for our internal source control server.

To set up CI builds for your own ESP-ADF project, you can use any CI tool you like - ESP-ADF uses "make", so any tool which can execute "make" is suitable.

Angus

mkseven32
Posts: 32
Joined: Mon Apr 23, 2018 1:21 am

Re: how to set up jenkins (or other ci tool) for ESP-ADF

Postby mkseven32 » Fri May 18, 2018 5:45 am

thanks !

at first sorry to post the same topic again!

i saw there is a note in the build_example.sh which located in ci directory。

Code: Select all

# With one argument <JOB_NAME> it builds part of the examples. This is a useful for
#   parallel execution in CI.
#   <JOB_NAME> must look like this:
#               <some_text_label>_<num>
#   It scans .gitlab-ci.yaml to count number of jobs which have name "<some_text_label>_<num>"
#   It scans the filesystem to count all examples
#   Based on this, it decides to run qa set of examples.
but i am confused what should the some_text_label be set?

if i want to build only one example which is named by pipeline_bt_sink。
(F:\msys32\home\11022259\esp\esp-adf\examples\player\pipeline_bt_sink)

is that right i using a shell cmd which like below:

Code: Select all

bash  build_examples.sh <pipeline_bt_sink>_<1>
please!

mkseven32
Posts: 32
Joined: Mon Apr 23, 2018 1:21 am

Re: how to set up jenkins (or other ci tool) for ESP-ADF

Postby mkseven32 » Fri May 18, 2018 6:42 am

ESP_Angus wrote:Hi,

I noticed you posted the same question in two forums and one otherwise unrelated thread. Please do not do this. I've deleted the duplicates.

We have CI in ESP-ADF and our other projects such as ESP-IDF to validate changes which are made in the project. We build examples, check for warnings, and run a bank of unit & integration tests. Our CI runs on our internal Gitlab installation, before changes are pushed to our public repo no Github.

Most of our CI setup is internal for Espressif use, although some code/docs are available including the unit testing framework (based on Unity) so you can, for example, write your own firmware unit tests to run on an ESP32. The "test runner" functionality for automating test runs is unfortunately not published publically at this time, and it's probably not immediately suitable for non-Espressif configurations anyhow.

The CI framework we use is gitlab-ci as we use Gitlab for our internal source control server.

To set up CI builds for your own ESP-ADF project, you can use any CI tool you like - ESP-ADF uses "make", so any tool which can execute "make" is suitable.

Angus
i using the jenkins ci tool. when executed build_examples.sh ,there is always a error:

Code: Select all

13:55:30 [esp-adf_compact] $ "C:\Program Files\Git\bin\sh.exe" -xe C:\Windows\TEMP\jenkins2654704403047936911.sh
13:55:31 + cd 'D:\Program Files\Jenkins\workspace\esp-adf_compact\tools\ci'
13:55:31 + bash build_examples.sh
13:55:31 build_examples running in /d/Program Files/Jenkins/workspace/esp-adf_compact/tools/ci
13:55:31 >>> example [ 0 ] - D:Program FilesJenkinsworkspaceesp-adf_compact/examples/cloud_services/pipeline_aws_polly_mp3/Makefile
13:55:31 Building pipeline_aws_polly_mp3 as 0...
13:55:31 cp: cannot stat [b]'D:Program FilesJenkinsworkspaceesp-adf_compact[/b]/examples/cloud_services/pipeline_aws_polly_mp3': No such file or directory
13:55:31 Build step 'Execute shell' marked build as failure

ESP_Angus
Posts: 2344
Joined: Sun May 08, 2016 4:11 am

Re: how to set up jenkins (or other ci tool) for ESP-ADF

Postby ESP_Angus » Thu May 24, 2018 4:44 am

mkseven32 wrote: i saw there is a note in the build_example.sh which located in ci directory。
This script exists so that gitlab-ci can build all of the examples without having to build them all on a single job runner (ie it can distribute building lots examples across lots of runners). This is important when building all ESP-IDF examples in our internal CI system, as we have a lot of them.
mkseven32 wrote: if i want to build only one example which is named by pipeline_bt_sink。
(F:\msys32\home\11022259\esp\esp-adf\examples\player\pipeline_bt_sink)

is that right i using a shell cmd which like below:

Code: Select all

bash  build_examples.sh <pipeline_bt_sink>_<1>
If you only want to build one example (or any project), you can tell Jenkins to go into this directory and run "make".

Better, tell it to run "make V=1 BATCH_BUILD=1"

V=1 means you'll get verbose output (this is optional)

BATCH_BUILD=1 means it won't stop and prompt for input under any circumstances.

The build_examples.sh script exists to run make for a large number of examples, across a large number of machines. But each time it just runs "make".

Who is online

Users browsing this forum: No registered users and 75 guests