Skip to content

Commit 3d97c4c

Browse files
Merge branch 'main' into add-musl-support
2 parents ace8757 + e9a06b7 commit 3d97c4c

172 files changed

Lines changed: 7199 additions & 855 deletions

File tree

Some content is hidden

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

.github/actions/save-disk-space/action.yml

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,10 @@ inputs:
1212
description: "Defines if the Dotnet Framework shall be removed in the pre step"
1313
required: false
1414
default: "false"
15+
skip-remove-go-from-runner:
16+
description: "Defines if the golang shall be removed in the pre step"
17+
required: false
18+
default: "false"
1519
runs:
1620
using: "composite"
1721
steps:
@@ -22,8 +26,11 @@ runs:
2226
sudo rm -rf /opt/ghc || true # Remove Haskell
2327
sudo rm -rf /usr/local/.ghcup || true # Remove Haskell
2428
sudo rm -rf /usr/share/swift || true
25-
sudo rm -rf /usr/lib/google-cloud-sdk || true
26-
sudo rm -rf /usr/local/share/chromium || true
29+
sudo rm -rf /usr/lib/firefox || true
30+
sudo rm -rf /usr/lib/google-cloud-sdk || true
31+
sudo rm -rf /usr/local/julia* || true
32+
sudo rm -rf /usr/local/share/chromium || true
33+
sudo rm -rf /usr/share/miniconda || true
2734
sudo rm -rf /opt/microsoft/msedge || true
2835
sudo rm -rf /opt/google/chrome || true
2936
@@ -35,10 +42,14 @@ runs:
3542
sudo rm -rf /usr/share/dotnet || true
3643
fi
3744
45+
if [[ ${{ inputs.skip-remove-go-from-runner }} == 'false' ]]; then
46+
sudo rm -rf /opt/hostedtoolcache/go || true
47+
fi
48+
3849
3950
- name: Cleanup build files from cargo target folder
4051
if: ${{ inputs.mode == 'cleanup-rust-build-files-from-cargo-target-folder' }}
4152
shell: bash
4253
run: |
4354
rm -rf ${{ github.workspace }}/target/{debug,release}/{deps,incremental}
44-
rm -rf ${{ github.workspace }}/target/*/{debug,release}/{deps,incremental} # Cleanup subfolders for target triples
55+
rm -rf ${{ github.workspace }}/target/*/{debug,release}/{deps,incremental} # Cleanup subfolders for target triples

.github/workflows/build-test.yml

Lines changed: 55 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -67,15 +67,38 @@ jobs:
6767
- name: Lint Rust
6868
run: |
6969
just lint sdk rust
70-
just lint integrations rust
70+
just lint integrations-zenoh rust
7171
7272
- name: Install rust-script
7373
run: cargo install rust-script --locked
7474

7575
- name: Verify std feature propagation
7676
run: |
7777
just verify sdk std-propagation
78-
just verify integrations std-propagation
78+
just verify integrations-zenoh std-propagation
79+
just verify integrations-ros2 std-propagation
80+
81+
nightly-check:
82+
if: github.event.pull_request.draft == false
83+
timeout-minutes: 20
84+
runs-on: ubuntu-latest
85+
steps:
86+
- name: Check nightly action status
87+
run: |
88+
COLOR_OFF='\033[0m'
89+
COLOR_RED='\033[1;31m'
90+
COLOR_GREEN='\033[1;32m'
91+
COLOR_YELLOW='\033[1;33m'
92+
LAST_RUN_STATUS=$(curl -s "https://api.github.com/repos/eclipse-iceoryx/iceoryx2/actions/workflows/nightly.yml/runs" | jq -r '.workflow_runs[0].conclusion')
93+
if [[ "${LAST_RUN_STATUS}" == "success" ]]; then
94+
echo -e "Last nightly run status: ${COLOR_GREEN}${LAST_RUN_STATUS}${COLOR_OFF}"
95+
else
96+
echo -e "Last nightly run status: ${COLOR_RED}${LAST_RUN_STATUS}${COLOR_OFF}"
97+
echo -e "${COLOR_RED}Error! The nightly workflow failed on the last run. Please check and fix the nightly workflow before merging this PR.${COLOR_OFF}"
98+
echo -e "${COLOR_YELLOW}You can trigger the nightly workflow manually from 'https://github.com/eclipse-iceoryx/iceoryx2/actions/workflows/nightly.yml'.${COLOR_OFF}"
99+
echo -e "${COLOR_YELLOW}Just look for the 'Run workflow' button. The branch where the workflow shall run can also be selected.${COLOR_OFF}"
100+
exit 1
101+
fi
79102
80103
linting-markdown:
81104
needs: changes
@@ -100,7 +123,7 @@ jobs:
100123
- name: Lint markdown
101124
run: |
102125
just lint sdk markdown
103-
just lint integrations markdown
126+
just lint integrations-zenoh markdown
104127
105128
- name: Check config key documentation
106129
run: ./internal/scripts/ci_check_description_vector_and_README.sh
@@ -153,12 +176,12 @@ jobs:
153176
- name: Run code examples in documentation
154177
run: |
155178
just test sdk --doc
156-
just test integrations --doc
179+
just test integrations-zenoh --doc
157180
158181
- name: Build documentation
159182
run: |
160183
just doc sdk rust
161-
just doc integrations rust
184+
just doc integrations-zenoh rust
162185
163186
cargo-nextest:
164187
needs: preflight-check
@@ -314,7 +337,7 @@ jobs:
314337
docker build \
315338
-f iceoryx2-services/tunnel-end-to-end-tests/Dockerfile \
316339
--build-arg ENTRYPOINT_BIN=target/release/iox2-tunnel \
317-
--build-arg BACKEND_BIN=integrations/target/release/iox2-tunnel-${{ matrix.tunnel }} \
340+
--build-arg BACKEND_BIN=integrations/${{ matrix.tunnel }}/target/release/iox2-tunnel-${{ matrix.tunnel }} \
318341
--build-arg PINGER_BIN=target/release/iceoryx2-services-tunnel-end-to-end-tests-pinger \
319342
--build-arg PONGER_BIN=target/release/iceoryx2-services-tunnel-end-to-end-tests-ponger \
320343
-t end-to-end-tests:${{ github.sha }} .
@@ -364,7 +387,7 @@ jobs:
364387
profile: "debug"
365388
workspace: sdk
366389

367-
integrations-stable-debug:
390+
integrations-zenoh-stable-debug:
368391
needs: [preflight-check, cargo-nextest]
369392
if: ${{ needs.changes.outputs.source-code == 'true' }}
370393
strategy:
@@ -376,7 +399,23 @@ jobs:
376399
os: ${{ matrix.os }}
377400
toolchain: ${{ matrix.toolchain }}
378401
profile: "debug"
379-
workspace: integrations
402+
workspace: zenoh
403+
404+
integrations-ros2-stable-debug:
405+
needs: [preflight-check]
406+
if: ${{ needs.changes.outputs.source-code == 'true' }}
407+
strategy:
408+
fail-fast: false
409+
matrix:
410+
ros:
411+
- { distro: jazzy, rmw: rmw_fastrtps_cpp }
412+
- { distro: humble, rmw: rmw_cyclonedds_cpp }
413+
uses: ./.github/workflows/reuse_ros2.yml
414+
with:
415+
ros-distro: ${{ matrix.ros.distro }}
416+
rmw: ${{ matrix.ros.rmw }}
417+
toolchain: stable
418+
profile: "debug"
380419

381420
sdk-stable-release:
382421
needs: [preflight-check, cargo-nextest]
@@ -388,15 +427,15 @@ jobs:
388427
profile: "release"
389428
workspace: sdk
390429

391-
integrations-stable-release:
430+
integrations-zenoh-stable-release:
392431
needs: [preflight-check, cargo-nextest]
393432
if: ${{ needs.changes.outputs.source-code == 'true' }}
394433
uses: ./.github/workflows/reuse_stable.yml
395434
with:
396435
os: ubuntu-latest
397436
toolchain: stable
398437
profile: "release"
399-
workspace: integrations
438+
workspace: zenoh
400439

401440
unstable:
402441
needs: [preflight-check, cargo-nextest]
@@ -441,7 +480,7 @@ jobs:
441480
./internal/scripts/ci_prepare_freebsd.sh
442481
./internal/scripts/ci_build_and_test_freebsd.sh --toolchain ${{ matrix.toolchain }} --mode ${{ matrix.mode }}
443482
444-
# NOTE: No Bazel build for integrations workspace. This is on purpose.
483+
# NOTE: No Bazel build for zenoh workspace. This is on purpose.
445484
Bazel:
446485
needs: [preflight-check]
447486
if: ${{ needs.changes.outputs.source-code == 'true' }}
@@ -524,14 +563,14 @@ jobs:
524563
run: |
525564
just prepare-release all versions --version 0.0.0
526565
527-
# NOTE: No publish dry run for integrations workspace. This is on purpose.
528-
# A dry run is not possible since the integrations workspace depends
566+
# NOTE: No publish dry run for zenoh workspace. This is on purpose.
567+
# A dry run is not possible since the zenoh workspace depends
529568
# on crates in the sdk workspace.
530569
# TODO: Test publishing to local crate registry OR kellnr.
531570
- name: Cargo Publish Dry-Run
532571
run: |
533572
just publish sdk --dry-run --allow-dirty
534-
just publish integrations --sanity-checks
573+
just publish integrations-zenoh --sanity-checks
535574
536575
grcov:
537576
needs: [preflight-check]
@@ -563,7 +602,8 @@ jobs:
563602
static-code-analysis-rust,
564603
static-code-analysis-cpp,
565604
sdk-stable-debug,
566-
integrations-stable-debug,
605+
integrations-zenoh-stable-debug,
606+
integrations-ros2-stable-debug,
567607
freebsd,
568608
Bazel,
569609
x86_32-debug,

.github/workflows/nightly.yml

Lines changed: 22 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ jobs:
6868
profile: ${{ matrix.profile }}
6969
workspace: sdk
7070

71-
integrations-stable-nightly:
71+
integrations-zenoh-stable-nightly:
7272
needs: [static-code-analysis-rust-nightly, cargo-nextest-nightly]
7373
strategy:
7474
matrix:
@@ -84,7 +84,27 @@ jobs:
8484
os: ${{ matrix.os }}
8585
toolchain: ${{ matrix.toolchain }}
8686
profile: ${{ matrix.profile }}
87-
workspace: integrations
87+
workspace: zenoh
88+
89+
integrations-ros2-stable-nightly:
90+
needs: [static-code-analysis-rust-nightly]
91+
strategy:
92+
fail-fast: false
93+
matrix:
94+
ros:
95+
- { distro: jazzy, rmw: rmw_fastrtps_cpp }
96+
- { distro: humble, rmw: rmw_cyclonedds_cpp }
97+
toolchain: [stable, 1.88.0]
98+
profile: ["release", "debug"]
99+
exclude:
100+
- toolchain: stable
101+
profile: "debug"
102+
uses: ./.github/workflows/reuse_ros2.yml
103+
with:
104+
ros-distro: ${{ matrix.ros.distro }}
105+
rmw: ${{ matrix.ros.rmw }}
106+
toolchain: ${{ matrix.toolchain }}
107+
profile: ${{ matrix.profile }}
88108

89109
unstable-nightly:
90110
needs: [static-code-analysis-rust-nightly, cargo-nextest-nightly]

.github/workflows/reuse_ros2.yml

Lines changed: 93 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,93 @@
1+
name: Reusable workflow for ros2 integrations
2+
3+
on:
4+
workflow_call:
5+
inputs:
6+
ros-distro:
7+
required: true
8+
type: string
9+
rmw:
10+
required: true
11+
type: string
12+
toolchain:
13+
required: true
14+
type: string
15+
profile:
16+
required: true
17+
type: string
18+
19+
jobs:
20+
ros2:
21+
timeout-minutes: 90
22+
runs-on: ubuntu-latest
23+
container:
24+
image: ros:${{ inputs.ros-distro }}
25+
env:
26+
RMW_IMPLEMENTATION: ${{ inputs.rmw }}
27+
steps:
28+
# git is required by actions/checkout and is not present in the base
29+
# ros image, so it must be installed before checking out.
30+
- name: Install git
31+
run: |
32+
apt-get update
33+
apt-get install -y git
34+
35+
- name: Checkout sources
36+
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # version v6.0.1
37+
38+
- name: Install build dependencies and RMW
39+
run: |
40+
# The RMW package name is the implementation name with '_' -> '-',
41+
# e.g. rmw_cyclonedds_cpp -> ros-<distro>-rmw-cyclonedds-cpp.
42+
RMW_PKG="ros-${{ inputs.ros-distro }}-$(echo '${{ inputs.rmw }}' | tr '_' '-')"
43+
apt-get update
44+
apt-get install -y build-essential ca-certificates curl pkg-config libclang-dev "$RMW_PKG"
45+
46+
- name: Install just
47+
uses: extractions/setup-just@f8a3cce218d9f83db3a2ecd90e41ac3de6cdfd9b # version: v3.1.0
48+
49+
- name: Setup Rust
50+
uses: dtolnay/rust-toolchain@e97e2d8cc328f1b50210efc529dca0028893a2d9 # version: v1
51+
with:
52+
toolchain: ${{ inputs.toolchain }}
53+
components: clippy
54+
55+
- name: Install cargo-nextest
56+
run: curl -LsSf https://get.nexte.st/latest/linux | tar zxf - -C "${CARGO_HOME:-$HOME/.cargo}/bin"
57+
58+
- name: Install rust-script
59+
run: cargo install rust-script --locked
60+
61+
- name: Setup sccache
62+
uses: mozilla-actions/sccache-action@bafd42bd91680affe190f697cac6ef3ad958ecba # version: v0.0.9
63+
64+
- name: Set caching env vars
65+
run: |
66+
echo "SCCACHE_GHA_ENABLED=true" >> $GITHUB_ENV
67+
echo "RUSTC_WRAPPER=sccache" >> $GITHUB_ENV
68+
69+
- name: Set build flags
70+
id: set-build-flags
71+
uses: ./.github/actions/set-build-flags
72+
with:
73+
profile: ${{ inputs.profile }}
74+
75+
- name: Build ros2 workspace
76+
shell: bash
77+
run: |
78+
source /opt/ros/${{ inputs.ros-distro }}/setup.bash
79+
rustc --version
80+
just build integrations-ros2 +${{ inputs.toolchain }} ${{ steps.set-build-flags.outputs.cargo-build-mode }} -- --all-targets
81+
82+
- name: Test ros2 workspace
83+
shell: bash
84+
run: |
85+
source /opt/ros/${{ inputs.ros-distro }}/setup.bash
86+
echo "Using RMW: $RMW_IMPLEMENTATION"
87+
just test integrations-ros2 +${{ inputs.toolchain }} ${{ steps.set-build-flags.outputs.cargo-build-mode }} -- --all-targets --no-fail-fast
88+
89+
- name: Run clippy on ros2 workspace
90+
shell: bash
91+
run: |
92+
source /opt/ros/${{ inputs.ros-distro }}/setup.bash
93+
just verify integrations-ros2 clippy ${{ steps.set-build-flags.outputs.cargo-build-mode }}

.github/workflows/reuse_stable.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -102,19 +102,19 @@ jobs:
102102
rustc --version
103103
just test sdk +${{ inputs.toolchain }} ${{ steps.set-build-flags.outputs.cargo-build-mode }} -- --all-targets --no-fail-fast
104104
105-
- name: Build integrations workspace
106-
if: ${{ inputs.workspace == 'integrations' }}
105+
- name: Build zenoh workspace
106+
if: ${{ inputs.workspace == 'zenoh' }}
107107
shell: bash
108108
run: |
109109
rustc --version
110-
just build integrations +${{ inputs.toolchain }} ${{ steps.set-build-flags.outputs.cargo-build-mode }} -- --all-targets
110+
just build integrations-zenoh +${{ inputs.toolchain }} ${{ steps.set-build-flags.outputs.cargo-build-mode }} -- --all-targets
111111
112-
- name: Test integrations workspace
113-
if: ${{ inputs.workspace == 'integrations' }}
112+
- name: Test zenoh workspace
113+
if: ${{ inputs.workspace == 'zenoh' }}
114114
shell: bash
115115
run: |
116116
rustc --version
117-
just test integrations +${{ inputs.toolchain }} ${{ steps.set-build-flags.outputs.cargo-build-mode }} -- --all-targets --no-fail-fast
117+
just test integrations-zenoh +${{ inputs.toolchain }} ${{ steps.set-build-flags.outputs.cargo-build-mode }} -- --all-targets --no-fail-fast
118118
119119
- name: Cleanup build artifacts
120120
uses: ./.github/actions/save-disk-space

.github/workflows/reuse_static_code_analysis.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,12 +39,12 @@ jobs:
3939
- name: Run cargo clippy with default features for 'std' in debug mode
4040
run: |
4141
just verify sdk clippy
42-
just verify integrations clippy
42+
just verify integrations-zenoh clippy
4343
4444
- name: Run cargo clippy with default features for 'std' in release mode
4545
run: |
4646
just verify sdk clippy --release
47-
just verify integrations clippy --release
47+
just verify integrations-zenoh clippy --release
4848
4949
- name: Run cargo clippy with no-default features for 'no_std' in debug mode
5050
if: ${{ runner.os == 'Linux' }}
@@ -80,4 +80,4 @@ jobs:
8080
ALL_CHANGED_FILES: ${{ steps.changed-files.outputs.all_changed_files }}
8181
run: |
8282
just verify sdk miri
83-
just verify integrations miri
83+
just verify integrations-zenoh miri

0 commit comments

Comments
 (0)