Skip to content

Commit

Permalink
Merge pull request #170 from sgryphon/feature/build-instructions
Browse files Browse the repository at this point in the history
Add some basic build instructions to run unit tests
  • Loading branch information
aentinger authored Aug 24, 2022
2 parents c8ee90f + f2624d1 commit e26862e
Showing 1 changed file with 26 additions and 1 deletion.
27 changes: 26 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,11 +44,36 @@ 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:

**Dependencies**

* [CMake](https://cmake.org/)
* [GCC](https://gcc.gnu.org/)

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
```

### 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:

```
```bash
tar --exclude='*.git*' -cjhvf $yourcore-$version.tar.bz2 $yourcore/
```

Expand Down

0 comments on commit e26862e

Please sign in to comment.