Skip to content

Commit

Permalink
[ci][docs] Update docs, update build flow
Browse files Browse the repository at this point in the history
  • Loading branch information
Vikort committed Apr 5, 2022
1 parent 4118e25 commit 54d16be
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 18 deletions.
13 changes: 7 additions & 6 deletions docs/build/linux-build.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ cd sc-machine
./scripts/ci/make-tests.sh
```

## CLangFormat code check
## Code formatting with CLangFormat

To check code with CLangFormat run:
```shell
Expand All @@ -52,6 +52,12 @@ cmake .. -DSC_CLANG_FORMAT_CODE=ON
make clangformat_check
```

or
```shell
cd sc-machine
./scripts/ci/check-formatting.sh
```

To format code with CLangFormat run:
```shell
cd sc-machine
Expand All @@ -60,8 +66,3 @@ cd build
cmake .. -DSC_CLANG_FORMAT_CODE=ON
make clangformat
```
or
```shell
cd sc-machine
./scripts/ci/check-formatting.sh
```
7 changes: 2 additions & 5 deletions scripts/ci/check-formatting.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,5 @@

set -eo pipefail

mkdir build -p
pushd build
cmake .. -DSC_CLANG_FORMAT_CODE=ON
make clangformat_check
popd
cmake -B build -DSC_CLANG_FORMAT_CODE=ON
cmake --build build --target clangformat_check
11 changes: 4 additions & 7 deletions scripts/ci/make-tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,11 @@ set -eo pipefail

pip3 install --user -r requirements.txt

mkdir build -p
pushd build

cmake .. -DCMAKE_BUILD_TYPE=${BUILD_TYPE} -DSC_COVERAGE=${COVERAGE} -DSC_AUTO_TEST=ON -DSC_BUILD_TESTS=ON -DSC_KPM_SCP=OFF
cmake -B build -DCMAKE_BUILD_TYPE=${BUILD_TYPE} -DSC_COVERAGE=${COVERAGE} -DSC_AUTO_TEST=ON -DSC_BUILD_TESTS=ON -DSC_KPM_SCP=OFF
echo ::group::Make
make -j$(nproc)
cmake --build build -j$(nproc)
echo ::endgroup::

pushd build
../bin/sc-builder -i ../tools/builder/tests/kb -o ../bin/sc-builder-test-repo -c -f

popd
popd

0 comments on commit 54d16be

Please sign in to comment.