Skip to content

Commit ef29d2e

Browse files
Move to cpp folder (#2763)
* Move C++ stuff into cpp/ * ci: set working-directory to cpp/ for existing pipelines * ci: cache action should now point to the cpp/ folder * ci: fix uploads * ci: fix downloads * ci: fix windows build * ci: remove sonarcloud * ci: fix windows
1 parent 721efdc commit ef29d2e

File tree

1,182 files changed

+101
-84
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,182 files changed

+101
-84
lines changed

.github/workflows/docs_deploy.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,10 @@ on:
88
#tags:
99
# - 'v*'
1010
paths:
11-
- 'docs/**'
11+
- 'cpp/docs/**'
1212
pull_request:
1313
paths:
14-
- 'docs/**'
14+
- 'cpp/docs/**'
1515

1616
workflow_dispatch:
1717

@@ -31,13 +31,13 @@ jobs:
3131
node-version: 20
3232
cache: npm
3333
# Specify the path to lock file for correct caching
34-
cache-dependency-path: ./docs/yarn.lock
34+
cache-dependency-path: ./cpp/docs/yarn.lock
3535

3636
- name: Install dependencies
37-
run: yarn install --frozen-lockfile --cwd ./docs
37+
run: yarn install --frozen-lockfile --cwd ./cpp/docs
3838

3939
- name: Build with VitePress
40-
working-directory: ./docs
40+
working-directory: ./cpp/docs
4141
run: |
4242
npm run docs:build
4343
touch .vitepress/dist/.nojekyll
@@ -46,7 +46,7 @@ jobs:
4646
uses: actions/upload-artifact@v4
4747
with:
4848
name: mavsdk_docs_build
49-
path: docs/.vitepress/dist/
49+
path: cpp/docs/.vitepress/dist/
5050
retention-days: 1
5151

5252
deploy:

.github/workflows/fuzzing.yml

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,16 @@ on:
55
branches:
66
- 'main'
77
paths-ignore:
8-
- 'docs/**'
8+
- 'cpp/docs/**'
99
pull_request:
1010
branches:
1111
- '*'
1212
paths-ignore:
13-
- 'docs/**'
13+
- 'cpp/docs/**'
14+
15+
defaults:
16+
run:
17+
working-directory: cpp
1418

1519
jobs:
1620
fuzz:
@@ -31,7 +35,7 @@ jobs:
3135
uses: actions/cache@v4
3236
id: cache-deps
3337
with:
34-
path: ./build/fuzz/third_party/install
38+
path: ./cpp/build/fuzz/third_party/install
3539
key: fuzz-deps-${{ hashFiles('./third_party/**') }}-1
3640

3741
- name: Disable superbuild on cache hit
@@ -126,8 +130,8 @@ jobs:
126130
with:
127131
name: fuzzer-binary-${{ github.run_id }}
128132
path: |
129-
./build/fuzz/src/fuzz_tests/mavlink_fuzzer
130-
./build/fuzz/src/mavsdk/libmavsdk.so*
133+
./cpp/build/fuzz/src/fuzz_tests/mavlink_fuzzer
134+
./cpp/build/fuzz/src/mavsdk/libmavsdk.so*
131135
retention-days: 30
132136

133137
- name: Upload corpus on crash

.github/workflows/linux.yml

Lines changed: 43 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -7,15 +7,19 @@ on:
77
tags:
88
- 'v*'
99
paths-ignore:
10-
- 'docs/**'
10+
- 'cpp/docs/**'
1111
pull_request:
1212
branches:
1313
- '*'
1414
paths-ignore:
15-
- 'docs/**'
15+
- 'cpp/docs/**'
1616
- '.github/workflows/docs_deploy.yml'
1717
workflow_dispatch:
1818

19+
defaults:
20+
run:
21+
working-directory: cpp
22+
1923
jobs:
2024
check-docker-changes:
2125
name: Check Docker Changes
@@ -31,7 +35,7 @@ jobs:
3135
id: check-changes
3236
uses: tj-actions/changed-files@ed68ef82c095e0d48ec87eccea555d944a631a4c # v46
3337
with:
34-
files: docker/**
38+
files: ../docker/**
3539
since_last_remote_commit: true
3640
- name: List all changed files
3741
id: set-any-changed
@@ -84,7 +88,7 @@ jobs:
8488
- uses: actions/cache@v4
8589
id: cache
8690
with:
87-
path: ./build/third_party/install
91+
path: ./cpp/build/third_party/install
8892
key: ${{ github.job }}-${{ hashFiles('./third_party/**') }}-3
8993
- name: disable superbuild on cache hit
9094
if: steps.cache.outputs.cache-hit == 'true'
@@ -118,10 +122,10 @@ jobs:
118122
with:
119123
name: test-binary-coverage-${{ github.run_id }}
120124
path: |
121-
./build/src/unit_tests/unit_tests_runner
122-
./build/src/system_tests/system_tests_runner
123-
./build/src/mavsdk/libmavsdk.so*
124-
./build/src/mavsdk_server/src/libmavsdk_server.so*
125+
./cpp/build/src/unit_tests/unit_tests_runner
126+
./cpp/build/src/system_tests/system_tests_runner
127+
./cpp/build/src/mavsdk/libmavsdk.so*
128+
./cpp/build/src/mavsdk_server/src/libmavsdk_server.so*
125129
retention-days: 7
126130
- name: run lcov
127131
run: lcov --capture --directory . --no-external --exclude "*/third_party/*" --output-file lcov.info
@@ -132,7 +136,7 @@ jobs:
132136
uses: coverallsapp/github-action@v2
133137
with:
134138
github-token: ${{ secrets.GITHUB_TOKEN }}
135-
path-to-lcov: "./lcov.info"
139+
path-to-lcov: "./cpp/lcov.info"
136140

137141
ubuntu-debug:
138142
name: Ubuntu 24.04 (Debug Build)
@@ -155,7 +159,7 @@ jobs:
155159
- uses: actions/cache@v4
156160
id: cache
157161
with:
158-
path: ./build/debug/third_party/install
162+
path: ./cpp/build/debug/third_party/install
159163
key: ${{ github.job }}-${{ hashFiles('./third_party/**') }}-3
160164
- name: disable superbuild on cache hit
161165
if: steps.cache.outputs.cache-hit == 'true'
@@ -192,7 +196,7 @@ jobs:
192196
- uses: actions/cache@v4
193197
id: cache
194198
with:
195-
path: ./build/asan/third_party/install
199+
path: ./cpp/build/asan/third_party/install
196200
key: ${{ github.job }}-${{ hashFiles('./third_party/**') }}-3
197201
- name: disable superbuild on cache hit
198202
if: steps.cache.outputs.cache-hit == 'true'
@@ -232,7 +236,7 @@ jobs:
232236
- uses: actions/cache@v4
233237
id: cache
234238
with:
235-
path: ./build/tsan/third_party/install
239+
path: ./cpp/build/tsan/third_party/install
236240
key: ${{ github.job }}-${{ hashFiles('./third_party/**') }}-3
237241
- name: disable superbuild on cache hit
238242
if: steps.cache.outputs.cache-hit == 'true'
@@ -272,7 +276,7 @@ jobs:
272276
- uses: actions/cache@v4
273277
id: cache
274278
with:
275-
path: ./build/ubsan/third_party/install
279+
path: ./cpp/build/ubsan/third_party/install
276280
key: ${{ github.job }}-${{ hashFiles('./third_party/**') }}-3
277281
- name: disable superbuild on cache hit
278282
if: steps.cache.outputs.cache-hit == 'true'
@@ -341,7 +345,7 @@ jobs:
341345
- uses: actions/cache@v4
342346
id: cache
343347
with:
344-
path: ./build/release/third_party/install
348+
path: ./cpp/build/release/third_party/install
345349
key: ${{ github.job }}-${{ matrix.ubuntu_version }}-${{ matrix.cc }}-${{ hashFiles('./third_party/**') }}-2
346350
- name: disable superbuild on cache hit
347351
if: steps.cache.outputs.cache-hit == 'true'
@@ -381,11 +385,11 @@ jobs:
381385
with:
382386
name: test-binaries-${{ matrix.description }}-${{ github.run_id }}
383387
path: |
384-
./build/src/unit_tests/unit_tests_runner
385-
./build/release/src/system_tests/system_tests_runner
386-
./build/release/src/mavsdk_server/test/unit_tests_mavsdk_server
387-
./build/release/src/mavsdk/libmavsdk.so*
388-
./build/release/src/mavsdk_server/src/libmavsdk_server.so*
388+
./cpp/build/src/unit_tests/unit_tests_runner
389+
./cpp/build/release/src/system_tests/system_tests_runner
390+
./cpp/build/release/src/mavsdk_server/test/unit_tests_mavsdk_server
391+
./cpp/build/release/src/mavsdk/libmavsdk.so*
392+
./cpp/build/release/src/mavsdk_server/src/libmavsdk_server.so*
389393
retention-days: 7
390394

391395
ubuntu-no-curl:
@@ -403,7 +407,7 @@ jobs:
403407
- uses: actions/cache@v4
404408
id: cache
405409
with:
406-
path: ./build/release/third_party/install
410+
path: ./cpp/build/release/third_party/install
407411
key: ${{ github.job }}-${{ hashFiles('./third_party/**') }}-3
408412
- name: disable superbuild on cache hit
409413
if: steps.cache.outputs.cache-hit == 'true'
@@ -456,7 +460,7 @@ jobs:
456460
- uses: actions/cache@v4
457461
id: cache
458462
with:
459-
path: ./build/default/third_party/install
463+
path: ./cpp/build/default/third_party/install
460464
key: ${{ github.job }}-${{ hashFiles('./third_party/**') }}-3
461465
- name: disable superbuild on cache hit
462466
if: steps.cache.outputs.cache-hit == 'true'
@@ -564,12 +568,12 @@ jobs:
564568
with:
565569
name: test-binaries-${{ matrix.os_type }}-${{ matrix.os_version }}-${{ github.run_id }}
566570
path: |
567-
./build/release/src/unit_tests/unit_tests_runner
568-
./build/release/src/system_tests/system_tests_runner
569-
./build/release/src/system_tests/standalone_param_test
570-
./build/release/src/system_tests/standalone_ftp_test
571-
./build/release/src/mavsdk/libmavsdk.so*
572-
./build/release/src/mavsdk_server/src/libmavsdk_server.so*
571+
./cpp/build/release/src/unit_tests/unit_tests_runner
572+
./cpp/build/release/src/system_tests/system_tests_runner
573+
./cpp/build/release/src/system_tests/standalone_param_test
574+
./cpp/build/release/src/system_tests/standalone_ftp_test
575+
./cpp/build/release/src/mavsdk/libmavsdk.so*
576+
./cpp/build/release/src/mavsdk_server/src/libmavsdk_server.so*
573577
retention-days: 7
574578
- name: install
575579
run: cmake --build build/release --target install
@@ -624,7 +628,7 @@ jobs:
624628
- uses: actions/cache@v4
625629
id: cache
626630
with:
627-
path: ./build/linux-${{ matrix.docker_name }}/third_party/install
631+
path: ./cpp/build/linux-${{ matrix.docker_name }}/third_party/install
628632
key: ${{ github.job }}-linux-${{ matrix.docker_name }}-${{ hashFiles('./third_party/**') }}-2
629633
- name: disable superbuild on cache hit
630634
if: steps.cache.outputs.cache-hit == 'true'
@@ -636,7 +640,8 @@ jobs:
636640
- name: build
637641
run: ./dockcross-linux-${{ matrix.docker_name }}-custom cmake --build build/linux-${{ matrix.docker_name }} -j$(nproc) --target install
638642
- name: create deb packages
639-
run: ./dockcross-linux-${{ matrix.docker_name }}-custom tools/create_packages.sh ./build/linux-${{ matrix.docker_name }}/install . ${{ matrix.arch_name }} libmavsdk-dev
643+
working-directory: .
644+
run: ./cpp/dockcross-linux-${{ matrix.docker_name }}-custom cpp/tools/create_packages.sh ./cpp/build/linux-${{ matrix.docker_name }}/install . ${{ matrix.arch_name }} libmavsdk-dev
640645
- if: ${{ matrix.rename_distro }}
641646
name: Rename LTS versions from debian12 to debian11
642647
run: |
@@ -659,6 +664,7 @@ jobs:
659664
container: alpine:3.19.0
660665
steps:
661666
- name: install tools
667+
working-directory: .
662668
run: apk update && apk add build-base cmake git linux-headers perl tar python3 py3-pip rust cargo
663669
- uses: actions/checkout@v4
664670
with:
@@ -673,7 +679,7 @@ jobs:
673679
- uses: actions/cache@v4
674680
id: cache
675681
with:
676-
path: ./build/release/third_party/install
682+
path: ./cpp/build/release/third_party/install
677683
key: ${{ github.job }}-${{ hashFiles('./third_party/**') }}-3
678684
- name: disable superbuild on cache hit
679685
if: steps.cache.outputs.cache-hit == 'true'
@@ -694,7 +700,7 @@ jobs:
694700
uses: actions/upload-artifact@v4
695701
with:
696702
name: mavsdk_server_musl_x86_64
697-
path: ./install/bin/mavsdk_server
703+
path: ./cpp/install/bin/mavsdk_server
698704
retention-days: 2
699705
- name: Publish artifacts
700706
if: startsWith(github.ref, 'refs/tags/v')
@@ -723,7 +729,7 @@ jobs:
723729
- uses: actions/cache@v4
724730
id: cache
725731
with:
726-
path: ./build/${{ matrix.arch_name }}/third_party/install
732+
path: ./cpp/build/${{ matrix.arch_name }}/third_party/install
727733
key: ${{ github.job }}-${{ matrix.arch_name }}-${{ hashFiles('./third_party/**') }}-2
728734
- name: disable superbuild on cache hit
729735
if: steps.cache.outputs.cache-hit == 'true'
@@ -738,14 +744,14 @@ jobs:
738744
uses: actions/upload-artifact@v4
739745
with:
740746
name: mavsdk_server_${{ matrix.arch_name }}
741-
path: 'build/${{ matrix.arch_name }}/install/bin/mavsdk_server'
747+
path: 'cpp/build/${{ matrix.arch_name }}/install/bin/mavsdk_server'
742748
retention-days: 2
743749
- name: Publish artifacts
744750
if: startsWith(github.ref, 'refs/tags/v')
745751
uses: svenstaro/upload-release-action@v1-release
746752
with:
747753
repo_token: ${{ secrets.GITHUB_TOKEN }}
748-
file: 'build/${{ matrix.arch_name }}/install/bin/mavsdk_server'
754+
file: 'cpp/build/${{ matrix.arch_name }}/install/bin/mavsdk_server'
749755
asset_name: 'mavsdk_server_${{ matrix.arch_name }}'
750756
tag: ${{ github.ref }}
751757
overwrite: true
@@ -778,7 +784,7 @@ jobs:
778784
- uses: actions/cache@v4
779785
id: cache
780786
with:
781-
path: ./build/${{ matrix.name }}/third_party/install
787+
path: ./cpp/build/${{ matrix.name }}/third_party/install
782788
key: ${{ github.job }}-${{ matrix.name }}-${{ hashFiles('./third_party/**') }}-2
783789
- name: disable superbuild on cache hit
784790
if: steps.cache.outputs.cache-hit == 'true'
@@ -795,14 +801,14 @@ jobs:
795801
uses: actions/upload-artifact@v4
796802
with:
797803
name: mavsdk_server_${{ matrix.name }}.tar
798-
path: 'build/${{ matrix.name }}/export/mavsdk_server_${{ matrix.name }}.tar'
804+
path: 'cpp/build/${{ matrix.name }}/export/mavsdk_server_${{ matrix.name }}.tar'
799805
retention-days: 2
800806
- name: Publish artifacts
801807
if: startsWith(github.ref, 'refs/tags/v')
802808
uses: svenstaro/upload-release-action@v1-release
803809
with:
804810
repo_token: ${{ secrets.GITHUB_TOKEN }}
805-
file: 'build/${{ matrix.name }}/export/mavsdk_server_${{ matrix.name }}.tar'
811+
file: 'cpp/build/${{ matrix.name }}/export/mavsdk_server_${{ matrix.name }}.tar'
806812
asset_name: 'mavsdk_server_${{ matrix.name }}.tar'
807813
tag: ${{ github.ref }}
808814
overwrite: true

0 commit comments

Comments
 (0)