Skip to content

Commit eaaad4f

Browse files
committed
📝 More documentation
(Still not complete but much more so)
1 parent a7b4365 commit eaaad4f

File tree

1 file changed

+77
-27
lines changed

1 file changed

+77
-27
lines changed

README.md

Lines changed: 77 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,36 +1,86 @@
1-
# Mad Science Lab C Unit Testing & Build Environment Docker Images
1+
# 🧪 Mad Science Lab C Unit Testing & Build Environment Docker Images
22

3-
C unit testing & release build environment with Unity, CMock, and Ceedling.
4-
The Docker images produced from this repository contain everything needed for running unit tests and release builds with Ceedling and its supporting frameworks.
3+
Self-contained C unit testing & release build environment with [Ceedling], [Unity], [CMock] and supporting tools.
54

6-
<!-- ## Contents
7-
* Testing tools
8-
* [Ceedling](http://www.throwtheswitch.org/ceedling) 0.31.0
9-
* [CMock](http://www.throwtheswitch.org/cmock) 2.5.2
10-
* [Unity](http://www.throwtheswitch.org/unity) 2.5.1
11-
* C support
12-
* [CException](http://www.throwtheswitch.org/cexception) 1.3.2
13-
* [libc-dev 0.7.2](https://pkgs.alpinelinux.org/package/v3.11/main/x86/libc-dev)
14-
* Environment
15-
* [coreutils 8.31](https://pkgs.alpinelinux.org/package/v3.11/main/x86/coreutils)
16-
* gcc 9.2.0
17-
* gcov 9.2.0
18-
* valgrind 3.15.0
19-
* Ruby 2.7.1
20-
-->
21-
## Usage
5+
## Overview & contents
226

23-
### Generating Dockerfiles
7+
The Docker images produced from this repository contain everything needed for running unit tests and release builds with [Ceedling] and its supporting frameworks.
248

25-
`./build.sh --dir build/standard --variant "" --version 1.0.0`
9+
This repository contains custom tooling, templates, and the assets necessary to produce multiple variations of the _MadScienceLab_ Docker images targeting different toolchains and containing various collections of supporting tools. A Github Action builds the images and publishes them to Docker Hub.
2610

27-
`./build.sh --dir build/standard --dir build/plugins --version 1.0.0`
11+
* [Docker Hub _MadScienceLab_ images][hub-images].
12+
* See this [repository’s releases][releases] for the versioned Dockerfiles produced by the Github Action builds.
2813

29-
`./build.sh --dir build/arm-none-eabi --version 1.0.0`
14+
The basic idea of this repository is to generate Dockerfiles rather than only maintain the text of one or more Dockerfiles. A custom Ruby-based command line tool uses a template and conventions for directories and files to build up Dockerfiles. This approach has a couple benefits:
3015

31-
`./build.sh --dir build/arm-none-eabi --dir build/plugins --dir build/arm-none-eabi-plugins --version 1.0.0`
16+
1. In this way, common base elements can be easily maintained across multiple Dockerfiles.
17+
1. Entirely new — potentially proprietary — Dockerfiles can be generated as extensions of the _MadScienceLab_ images with elements maintained outside of this repository.
3218

19+
## Supporting this work
3320

34-
## Basic Articles Discussing Unit Testing
35-
* This docker image uses Ceedling to build “native” code as described [here](http://www.throwtheswitch.org/build/which)
36-
* For additional help and tips for building native tests, read [this](http://www.throwtheswitch.org/build/native)
21+
These Docker images and complementary [ThrowTheSwitch] pieces and parts are and always will be freely available and open source.
22+
23+
💼 **_[Ceedling Suite][ceedling-suite]_** is a growing collection of paid products and services built around Ceedling to help you do even more. **_[Ceedling Assist][ceedling-assist]_** for support contracts and training is now available.
24+
25+
🙏🏻 **[Please consider supporting Ceedling as a Github Sponsor][tts-sponsor]**
26+
27+
[Ceedling]: https://github.com/ThrowTheSwitch/Ceedling
28+
[Unity]: https://github.com/ThrowTheSwitch/Unity
29+
[CMock]: https://github.com/ThrowTheSwitch/CMock
30+
31+
[hub-images]: https://hub.docker.com/r/throwtheswitch
32+
[releases]: https://github.com/ThrowTheSwitch/MadScienceLabDocker/releases
33+
34+
[ThrowTheSwitch]: https://github.com/ThrowTheSwitch
35+
[ceedling-suite]: https://www.thingamabyte.com/ceedling
36+
[ceedling-assist]: https://www.thingamabyte.com/ceedlingassist
37+
[tts-sponsor]: https://github.com/sponsors/ThrowTheSwitch
38+
39+
# 🏭 Usage
40+
41+
_January, 2025_: More complete documentation on working with the contents of this repository is forthcoming. This repository underwent significant changes in step with the 1.0.0 release of Ceedling.
42+
43+
## Generating Dockerfiles
44+
45+
To generate the four Dockerfiles and related artifacts managed by this project from a local clone of this repository, install all Ruby dependencies using the Gemfile in the root of the project and execute the build shell script also in the root of the repository:
46+
47+
Examples:
48+
49+
* `./build.sh --dir build/standard --variant "" --version <tag>`
50+
* `./build.sh --dir build/standard --dir build/plugins --version <tag>`
51+
* `./build.sh --dir build/arm-none-eabi --version 1.0.0`
52+
* `./build.sh --dir build/arm-none-eabi --dir build/plugins --dir build/arm-none-eabi-plugins --version <tag>`
53+
54+
The Github Action maintained in this repository uses the same approach as the preceding to generate the Dockerfiles attached to releases. The Github Action goes on to build images from those Dockerfiles and pushes them to Docker Hub.
55+
56+
## Ruby tool & shell script
57+
58+
The Ruby tool maintained in this repository does all of the Dockerfile text generation.
59+
60+
The shell script that calls the Ruby tool includes many options useful to a developer working on this repostory or anyone working to extend the Dockerfiles created by the tooling. Run `./build.sh -h` for a listing of the various options.
61+
62+
# 🔢 Versioning
63+
64+
Versioning of this repository and the resulting tags in Docker Hub track [Ceedling]’s version. Docker image changes are maintained with a lowercase letter suffix appended to the version of Ceedling contained in each _MadScienceLab_ image itself.
65+
66+
# 🔒 Security
67+
68+
Security documentation is maintained in the [Docker Hub image repositories][hub-images].
69+
70+
# 👩‍🏫 Intro to Unit Testing Supported by the MadScienceLab containers
71+
72+
* The “stock” Docker images maintained by this repository use Ceedling to build “native” code as described [here][which-build]. For additional help and tips for building native tests, read [this](native-tests).
73+
* Advanced users of Ceedling also have the option of creating cross-compiled ARM test executable binaries with the `arm-none-eabi` Docker image variants. These binaries could be native tests on a target platform, or you could run them with a simulator test fixture on a host system. Read more about the simulator option [here][which-build] and how to work with it [here][simulator-tests].
74+
75+
[which-build]: http://www.throwtheswitch.org/build/which
76+
[native-tests]: http://www.throwtheswitch.org/build/native
77+
[simulator-tests]: https://www.throwtheswitch.org/build/cross
78+
79+
# 📄 License(s)
80+
81+
* The base image, [`minideb`][minideb], for the _MadScienceLab_ variants is [Apache 2.0][apache-20] licensed.
82+
* The _ThrowTheSwitch_ work layered on top of `minideb` is [MIT] licensed (the license file is maintained in the root of this repository).
83+
84+
[minideb]: https://hub.docker.com/r/bitnami/minideb
85+
[apache-20]: https://www.apache.org/licenses/LICENSE-2.0
86+
[MIT]: https://opensource.org/license/mit

0 commit comments

Comments
 (0)