From df3f64a7ed41da11944b9b41bdfe83eeb9e33a96 Mon Sep 17 00:00:00 2001 From: Sly Gryphon Date: Tue, 23 Aug 2022 23:43:27 +1000 Subject: [PATCH 1/4] Local build instructions --- README.md | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/README.md b/README.md index c4a02de0..0ecb31c2 100644 --- a/README.md +++ b/README.md @@ -44,6 +44,18 @@ This repository includes a test suite that covers most of the API and that is de Please help us improve the coverage of the test suite! +#### To build and run unit tests + +The unit tests are automatically built by GitHub as part of pull request checks (in `.github/workflows/unit-tests.yml`). + +To build and run locally (from the project root): + +``` +cmake -S test -B test/build +make --directory test/build +test/build/bin/test-ArduinoCore-API +``` + ### Implementing ArduinoCore-API In order to compile a core which is implementing ArduinoCore-API you'll need to copy/symlink the `api` directory to the target's `cores/arduino` directory as part of your development and release workflow. The most elegant and effective solution is to develop your core with `api` symlinked and produce the distributable archive by telling `tar` to follow symlinks. Example: From 246852ba523b17f2ee5026ccefbcfab6aea1f7d1 Mon Sep 17 00:00:00 2001 From: Sly Gryphon Date: Tue, 23 Aug 2022 23:52:53 +1000 Subject: [PATCH 2/4] List dependencies --- README.md | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 0ecb31c2..ddb61ad4 100644 --- a/README.md +++ b/README.md @@ -48,7 +48,15 @@ Please help us improve the coverage of the test suite! The unit tests are automatically built by GitHub as part of pull request checks (in `.github/workflows/unit-tests.yml`). -To build and run locally (from the project root): +To build and run locally: + +**Dependencies** + +* CMake +* make +* gcc + +From the project root: ``` cmake -S test -B test/build From 09a0dd46a61d082387aaff23a657280acc41a038 Mon Sep 17 00:00:00 2001 From: Alexander Entinger Date: Wed, 24 Aug 2022 07:16:50 +0200 Subject: [PATCH 3/4] Simplfiy build instructions. --- README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index ddb61ad4..23569aa3 100644 --- a/README.md +++ b/README.md @@ -59,9 +59,9 @@ To build and run locally: From the project root: ``` -cmake -S test -B test/build -make --directory test/build -test/build/bin/test-ArduinoCore-API +cd test && mkdir build && cd build +cmake .. +make && bin/test-ArduinoCore-API ``` ### Implementing ArduinoCore-API From f2624d1b3244040d9b2698791dccc4724a0ea05f Mon Sep 17 00:00:00 2001 From: Alexander Entinger Date: Wed, 24 Aug 2022 07:21:35 +0200 Subject: [PATCH 4/4] Adding URLs to dependencies, dependency installation procedure for Linux. --- README.md | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 23569aa3..f8e0ab06 100644 --- a/README.md +++ b/README.md @@ -52,13 +52,18 @@ To build and run locally: **Dependencies** -* CMake -* make -* gcc +* [CMake](https://cmake.org/) +* [GCC](https://gcc.gnu.org/) -From the project root: +On (Ubuntu) Linux run: +```bash +sudo apt-get install build-essential cmake ``` + +From the project root: + +```bash cd test && mkdir build && cd build cmake .. make && bin/test-ArduinoCore-API @@ -68,7 +73,7 @@ make && bin/test-ArduinoCore-API In order to compile a core which is implementing ArduinoCore-API you'll need to copy/symlink the `api` directory to the target's `cores/arduino` directory as part of your development and release workflow. The most elegant and effective solution is to develop your core with `api` symlinked and produce the distributable archive by telling `tar` to follow symlinks. Example: -``` +```bash tar --exclude='*.git*' -cjhvf $yourcore-$version.tar.bz2 $yourcore/ ```