mirror of
https://github.com/FreeRTOS/coreMQTT
synced 2025-05-21 21:54:53 +08:00
Update submodule configuration for hub repo cloning efficiency (#75)
* Update submodules to not be auto cloned * Update README about submoduling CMock * Attempt to fix ci.yml * Fix submodule init issue * Add --recursive flags to submodule clone command * Add section link in README
This commit is contained in:
parent
494684fe1a
commit
a127704e40
2
.github/workflows/ci.yml
vendored
2
.github/workflows/ci.yml
vendored
@ -13,6 +13,8 @@ jobs:
|
||||
steps:
|
||||
- name: Clone This Repo
|
||||
uses: actions/checkout@v2
|
||||
- name: Checkout CMock submodule
|
||||
run: git submodule update --checkout --init --recursive test/unit-test/CMock
|
||||
- name: Build
|
||||
run: |
|
||||
sudo apt-get install -y lcov
|
||||
|
3
.gitmodules
vendored
3
.gitmodules
vendored
@ -1,9 +1,12 @@
|
||||
[submodule "test/unit-test/CMock"]
|
||||
path = test/unit-test/CMock
|
||||
url = https://github.com/ThrowTheSwitch/CMock
|
||||
update = none
|
||||
[submodule "test/cbmc/aws-templates-for-cbmc-proofs"]
|
||||
path = test/cbmc/aws-templates-for-cbmc-proofs
|
||||
url = https://github.com/awslabs/aws-templates-for-cbmc-proofs.git
|
||||
update = none
|
||||
[submodule "test/cbmc/litani"]
|
||||
path = test/cbmc/litani
|
||||
url = https://github.com/awslabs/aws-build-accumulator
|
||||
update = none
|
||||
|
10
README.md
10
README.md
@ -29,6 +29,14 @@ For a CMake example of building the MQTT library with the `mqttFilePaths.cmake`
|
||||
|
||||
## Building Unit Tests
|
||||
|
||||
### Checkout CMock Submodule
|
||||
By default, the submodules in this repository are configured with `update=none` in [.gitmodules](.gitmodules) to avoid increasing clone time and disk space usage of other repositories (like [amazon-freertos](https://github.com/aws/amazon-freertos) that submodule this repository.
|
||||
|
||||
To build unit tests, the submodule dependency of CMock is required. Use the following command to clone the submodule:
|
||||
```
|
||||
git submodule update --checkout --init --recursive --test/unit-test/CMock
|
||||
```
|
||||
|
||||
### Platform Prerequisites
|
||||
|
||||
- For running unit tests
|
||||
@ -39,7 +47,7 @@ For a CMake example of building the MQTT library with the `mqttFilePaths.cmake`
|
||||
|
||||
### Steps to build **Unit Tests**
|
||||
|
||||
1. Go to the root directory of this repository.
|
||||
1. Go to the root directory of this repository. (Make sure that the **CMock** submodule is cloned as described [above](#checkout-cmock-submodule))
|
||||
|
||||
1. Run the *cmake* command: `cmake -S test -B build -DBUILD_CLONE_SUBMODULES=ON `
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user