chore: Use more descriptive names for helper scripts
Signed-off-by: Michael Vetter <jubalh@iodoru.org>
This commit is contained in:
6
.github/workflows/main.yml
vendored
6
.github/workflows/main.yml
vendored
@@ -21,17 +21,17 @@ jobs:
|
|||||||
buildsystem: autotools
|
buildsystem: autotools
|
||||||
tests: unit
|
tests: unit
|
||||||
omemo: signal
|
omemo: signal
|
||||||
script: ./ci/ci-build.sh
|
script: ./scripts/build-configuration-matrix.sh
|
||||||
- flavor: fedora
|
- flavor: fedora
|
||||||
buildsystem: autotools
|
buildsystem: autotools
|
||||||
tests: unit
|
tests: unit
|
||||||
omemo: signal
|
omemo: signal
|
||||||
script: ./ci/ci-build.sh
|
script: ./scripts/build-configuration-matrix.sh
|
||||||
- flavor: ubuntu
|
- flavor: ubuntu
|
||||||
buildsystem: autotools
|
buildsystem: autotools
|
||||||
tests: unit
|
tests: unit
|
||||||
omemo: signal
|
omemo: signal
|
||||||
script: ./ci/ci-build.sh
|
script: ./scripts/build-configuration-matrix.sh
|
||||||
- flavor: debian
|
- flavor: debian
|
||||||
buildsystem: meson
|
buildsystem: meson
|
||||||
tests: unit
|
tests: unit
|
||||||
|
|||||||
@@ -192,7 +192,7 @@ snippet to `.git/hooks/pre-push`:
|
|||||||
```shell
|
```shell
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
set -e
|
set -e
|
||||||
./ci/ci-build.sh
|
./scripts/build-configuration-matrix.sh
|
||||||
```
|
```
|
||||||
|
|
||||||
This will run the same tests that the CI runs and refuse the push if it fails.
|
This will run the same tests that the CI runs and refuse the push if it fails.
|
||||||
@@ -214,7 +214,7 @@ In cases where you want to disable automatic formatting for a specific block of
|
|||||||
## Verification & Testing
|
## Verification & Testing
|
||||||
|
|
||||||
### Running unit tests
|
### Running unit tests
|
||||||
Run `make check` to run the unit tests with your current configuration or `./ci/ci-build.sh` to check with different switches passed to configure.
|
Run `make check` to run the unit tests with your current configuration or `./scripts/build-configuration-matrix.sh` to check with different switches passed to configure.
|
||||||
|
|
||||||
### Writing unit tests
|
### Writing unit tests
|
||||||
We use the [cmocka](https://cmocka.org/) testing framework for unit tests.
|
We use the [cmocka](https://cmocka.org/) testing framework for unit tests.
|
||||||
@@ -331,7 +331,7 @@ meson compile doublecheck
|
|||||||
|
|
||||||
Alternatively, you can run the script directly:
|
Alternatively, you can run the script directly:
|
||||||
```
|
```
|
||||||
./scripts/quality-check.sh --fix-formatting --meson # or --autotools
|
./scripts/lint-and-test.sh --fix-formatting --meson # or --autotools
|
||||||
```
|
```
|
||||||
|
|
||||||
### Pre-commit hook
|
### Pre-commit hook
|
||||||
@@ -339,7 +339,7 @@ It is highly recommended to install the quality check script as a git pre-commit
|
|||||||
|
|
||||||
To install the hook:
|
To install the hook:
|
||||||
```
|
```
|
||||||
./scripts/quality-check.sh --install
|
./scripts/lint-and-test.sh --install
|
||||||
```
|
```
|
||||||
|
|
||||||
If you need to bypass the formatting check (e.g. due to a `clang-format` version mismatch), you can set the `SKIP_FORMAT` environment variable:
|
If you need to bypass the formatting check (e.g. due to a `clang-format` version mismatch), you can set the `SKIP_FORMAT` environment variable:
|
||||||
|
|||||||
@@ -376,4 +376,4 @@ spell:
|
|||||||
codespell
|
codespell
|
||||||
|
|
||||||
doublecheck:
|
doublecheck:
|
||||||
@./scripts/quality-check.sh --fix-formatting --autotools
|
@./scripts/lint-and-test.sh --fix-formatting --autotools
|
||||||
|
|||||||
@@ -727,7 +727,7 @@ if get_option('tests')
|
|||||||
endif
|
endif
|
||||||
|
|
||||||
run_target('doublecheck',
|
run_target('doublecheck',
|
||||||
command: ['scripts/quality-check.sh', '--fix-formatting', '--meson']
|
command: ['scripts/lint-and-test.sh', '--fix-formatting', '--meson']
|
||||||
)
|
)
|
||||||
|
|
||||||
summary({
|
summary({
|
||||||
|
|||||||
@@ -1,5 +1,7 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
# Exhaustive build configuration matrix testing for Profanity
|
||||||
|
|
||||||
log_content()
|
log_content()
|
||||||
{
|
{
|
||||||
echo
|
echo
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
# Central quality check script for Profanity
|
# Central linting and testing script for Profanity
|
||||||
|
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
@@ -118,7 +118,7 @@ while [[ "$#" -gt 0 ]]; do
|
|||||||
echo "Installing pre-commit hook..."
|
echo "Installing pre-commit hook..."
|
||||||
mkdir -p .git/hooks
|
mkdir -p .git/hooks
|
||||||
echo "#!/usr/bin/env bash" > .git/hooks/pre-commit
|
echo "#!/usr/bin/env bash" > .git/hooks/pre-commit
|
||||||
echo "./scripts/quality-check.sh --hook" >> .git/hooks/pre-commit
|
echo "./scripts/lint-and-test.sh --hook" >> .git/hooks/pre-commit
|
||||||
chmod +x .git/hooks/pre-commit
|
chmod +x .git/hooks/pre-commit
|
||||||
echo "Hook installed."
|
echo "Hook installed."
|
||||||
exit 0
|
exit 0
|
||||||
@@ -140,4 +140,4 @@ if [ "$BUILD_SYSTEM" != "none" ]; then
|
|||||||
run_tests "$BUILD_SYSTEM"
|
run_tests "$BUILD_SYSTEM"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo -e "${GREEN}Quality check successful!${NC}"
|
echo -e "${GREEN}Validation successful!${NC}"
|
||||||
Reference in New Issue
Block a user