mirror of
https://github.com/OpenBluetoothToolbox/SimpleBLE
synced 2025-05-08 05:25:49 +08:00
Minor fixes
This commit is contained in:
parent
b5fff82406
commit
5d19f50484
18
.github/workflows/ci_main.yml
vendored
18
.github/workflows/ci_main.yml
vendored
@ -27,7 +27,7 @@ jobs:
|
||||
with:
|
||||
concurrent_skipping: 'same_content_newer'
|
||||
skip_after_successful_duplicate: 'true'
|
||||
- name: Clone Repository
|
||||
- name: Clone Repository
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 0
|
||||
@ -55,7 +55,7 @@ jobs:
|
||||
miscs: ${{ steps.filter.outputs.miscs }}
|
||||
changes: ${{ steps.filter.outputs.changes }}
|
||||
steps:
|
||||
- name: Clone Repository
|
||||
- name: Clone Repository
|
||||
uses: actions/checkout@v4
|
||||
- name: Detect file changes
|
||||
uses: dorny/paths-filter@v3
|
||||
@ -106,7 +106,7 @@ jobs:
|
||||
|
||||
# This job is used to dynamically generate the build matrix of 'build' job in 'ci_linux.yml'.
|
||||
# The output variable 'values' is a list of strings: 'simpledbus', 'simplebluez' and 'simpleble'.
|
||||
# This is not inside pre-job because 'changes' variable is set by dorny/paths-filter to ALL the filters
|
||||
# This is not inside pre-job because 'changes' variable is set by dorny/paths-filter to ALL the filters
|
||||
# that match, so we need to have a job with only these three filters.
|
||||
# Note that the filters are defined in a way that makes each of them depend on the previous one.
|
||||
# If in main branch, all libraries are listed in the output even if there are no matching changes.
|
||||
@ -119,7 +119,7 @@ jobs:
|
||||
outputs:
|
||||
values: ${{ github.ref == 'refs/heads/main' && '["simpledbus","simplebluez","simpleble"]' || steps.filter.outputs.changes }}
|
||||
steps:
|
||||
- name: Clone Repository
|
||||
- name: Clone Repository
|
||||
uses: actions/checkout@v4
|
||||
- name: Detect file changes
|
||||
uses: dorny/paths-filter@v3
|
||||
@ -134,12 +134,6 @@ jobs:
|
||||
simpleble: &simpleble
|
||||
- *simplebluez
|
||||
- 'simpleble/**'
|
||||
- name: Debug Output
|
||||
run: |
|
||||
echo "Current branch: ${{ github.ref }}"
|
||||
echo "Is main branch? ${{ github.ref == 'refs/heads/main' }}"
|
||||
echo "Path filter changes: ${{ steps.filter.outputs.changes }}"
|
||||
echo "Final libraries output: ${{ github.ref == 'refs/heads/main' && '["simpledbus","simplebluez","simpleble"]' || steps.filter.outputs.changes }}"
|
||||
|
||||
lint:
|
||||
needs: pre_job
|
||||
@ -153,7 +147,7 @@ jobs:
|
||||
needs.pre_job.outputs.should_skip != 'true' &&
|
||||
(needs.changes.outputs.docs == 'true' || github.ref == 'refs/heads/main')
|
||||
uses: ./.github/workflows/ci_docs.yml
|
||||
|
||||
|
||||
windows:
|
||||
needs: [pre_job, changes]
|
||||
if: |
|
||||
@ -182,7 +176,7 @@ jobs:
|
||||
needs.changes.outputs.miscs == 'true' ||
|
||||
github.ref == 'refs/heads/main')
|
||||
uses: ./.github/workflows/ci_macos.yml
|
||||
|
||||
|
||||
python:
|
||||
needs: [pre_job, changes]
|
||||
if: |
|
||||
|
@ -78,11 +78,11 @@ assert_return_value() {
|
||||
local command="$1"
|
||||
local expected=$2
|
||||
local description="$3"
|
||||
|
||||
|
||||
# Run command and redirect output to /dev/null
|
||||
eval "$command" > /dev/null 2>&1
|
||||
local actual=$?
|
||||
|
||||
|
||||
if [ $actual -ne $expected ]; then
|
||||
echo "UNIT TEST FAILED: $command (expected: $expected, got: $actual) Check code logic"
|
||||
return 1
|
||||
@ -99,7 +99,7 @@ assert_return_value 'check_tag_version_match "" "1.1.1" "1.1.1"' 1 || exit 1
|
||||
assert_return_value 'check_tag_version_match "" "1.1.0" "1.1.1"' 1 || exit 1
|
||||
assert_return_value 'check_tag_version_match "" "1.1.2" "1.1.1"' 0 || exit 1
|
||||
assert_return_value 'check_changelog "1.1.9" ' 1 || exit 1
|
||||
assert_return_value 'check_changelog "0.8.0" ' 0 || exit 1
|
||||
assert_return_value 'check_changelog "0.7.0" ' 0 || exit 1
|
||||
assert_return_value 'check_changelog "" ' 0 || exit 1
|
||||
###############################################################################
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user