From da84158de640a11e00e3138cdea631290fce72e6 Mon Sep 17 00:00:00 2001 From: Peter LeVasseur Date: Wed, 8 Jan 2025 09:59:07 -0500 Subject: [PATCH 1/5] Add shell script to set environment variables, updated CI workflows to use it. --- .github/workflows/bundled-lint-and-test.yaml | 32 ++++- .../workflows/unbundled-lint-and-test.yaml | 53 ++++++-- build/envsetup.sh | 120 ++++++++++++++++++ 3 files changed, 190 insertions(+), 15 deletions(-) create mode 100755 build/envsetup.sh diff --git a/.github/workflows/bundled-lint-and-test.yaml b/.github/workflows/bundled-lint-and-test.yaml index 5a574ad..f12945e 100644 --- a/.github/workflows/bundled-lint-and-test.yaml +++ b/.github/workflows/bundled-lint-and-test.yaml @@ -15,8 +15,6 @@ name: Lint and Test - Bundled env: VSOMEIP_INSTALL_PATH: vsomeip-install - GENERIC_CPP_STDLIB_PATH: /usr/include/c++/11 - ARCH_SPECIFIC_CPP_STDLIB_PATH: /usr/include/x86_64-linux-gnu/c++/11 on: push: @@ -35,9 +33,31 @@ concurrency: jobs: + set-env: + name: Set environment variables + runs-on: ubuntu-22.04 + + outputs: + arch_specific_cpp_stdlib_path: ${{ steps.set_env.outputs.arch_specific_cpp_stdlib_path }} + generic_cpp_stdlib_path: ${{ steps.set_env.outputs.generic_cpp_stdlib_path }} + + steps: + - uses: actions/checkout@v4 + + - name: Add execute permissions for envsetup + run: chmod +x build/envsetup.sh + + - name: Set stdlib paths dynamically + id: set_env + run: | + source ./build/envsetup.sh highest + echo "arch_specific_cpp_stdlib_path=$ARCH_SPECIFIC_CPP_STDLIB_PATH" >> $GITHUB_OUTPUT + echo "generic_cpp_stdlib_path=$GENERIC_CPP_STDLIB_PATH" >> $GITHUB_OUTPUT + lint: name: Lint - runs-on: ubuntu-latest + runs-on: ubuntu-22.04 + needs: set-env steps: - uses: actions/checkout@v4 @@ -81,7 +101,8 @@ jobs: test: name: Test - runs-on: ubuntu-latest + runs-on: ubuntu-22.04 + needs: set-env steps: - uses: actions/checkout@v4 @@ -146,7 +167,8 @@ jobs: build-docs: name: Build documentation - runs-on: ubuntu-latest + runs-on: ubuntu-22.04 + needs: set-env steps: - uses: actions/checkout@v4 diff --git a/.github/workflows/unbundled-lint-and-test.yaml b/.github/workflows/unbundled-lint-and-test.yaml index e5b02bb..b638726 100644 --- a/.github/workflows/unbundled-lint-and-test.yaml +++ b/.github/workflows/unbundled-lint-and-test.yaml @@ -19,9 +19,6 @@ env: VSOMEIP_SOURCE_PATH: vsomeip-src VSOMEIP_INSTALL_PATH: vsomeip-install - GENERIC_CPP_STDLIB_PATH: /usr/include/c++/11 - ARCH_SPECIFIC_CPP_STDLIB_PATH: /usr/include/x86_64-linux-gnu/c++/11 - on: push: branches: [ main ] @@ -38,10 +35,38 @@ concurrency: cancel-in-progress: true jobs: + set-env: + name: Set environment variables + runs-on: ubuntu-22.04 + + outputs: + arch_specific_cpp_stdlib_path: ${{ steps.set_env.outputs.arch_specific_cpp_stdlib_path }} + generic_cpp_stdlib_path: ${{ steps.set_env.outputs.generic_cpp_stdlib_path }} + + steps: + - uses: actions/checkout@v4 + + - name: Add execute permissions for envsetup + run: chmod +x build/envsetup.sh + + - name: Set stdlib paths dynamically + id: set_env + run: | + source ./build/envsetup.sh highest + echo "arch_specific_cpp_stdlib_path=$ARCH_SPECIFIC_CPP_STDLIB_PATH" >> $GITHUB_OUTPUT + echo "generic_cpp_stdlib_path=$GENERIC_CPP_STDLIB_PATH" >> $GITHUB_OUTPUT + obtain_and_build_vsomeip: - runs-on: ubuntu-latest + runs-on: ubuntu-22.04 + needs: set-env + outputs: cache_key: ${{ steps.generate_cache_key.outputs.CACHE_KEY }} + + env: + ARCH_SPECIFIC_CPP_STDLIB_PATH: ${{ needs.set-env.outputs.arch_specific_cpp_stdlib_path }} + GENERIC_CPP_STDLIB_PATH: ${{ needs.set-env.outputs.generic_cpp_stdlib_path }} + steps: - name: Checkout repository uses: actions/checkout@v4 @@ -52,6 +77,7 @@ jobs: echo "VSOMEIP_SOURCE_PATH=${{ github.workspace }}/${{ env.VSOMEIP_SOURCE_PATH }}" >> $GITHUB_ENV echo "VSOMEIP_INSTALL_PATH=${{ github.workspace }}/${{ env.VSOMEIP_INSTALL_PATH }}" >> $GITHUB_ENV echo "VSOMEIP_SOURCE_PATH_WITH_WILDCARD=${{ github.workspace }}/${{ env.VSOMEIP_SOURCE_PATH }}/*" >> $GITHUB_ENV + env - name: Print environment variables for debugging run: | @@ -59,7 +85,10 @@ jobs: echo "VSOMEIP_SOURCE_PATH: ${{ env.VSOMEIP_SOURCE_PATH }}" echo "VSOMEIP_INSTALL_PATH: ${{ env.VSOMEIP_INSTALL_PATH }}" echo "VSOMEIP_SOURCE_PATH_WITH_WILDCARD: ${{ env.VSOMEIP_SOURCE_PATH_WITH_WILDCARD }}" - + echo "GENERIC_CPP_STDLIB_PATH: ${{ env.GENERIC_CPP_STDLIB_PATH }}" + echo "ARCH_SPECIFIC_CPP_STDLIB_PATH: ${{ env.ARCH_SPECIFIC_CPP_STDLIB_PATH }}" + env + - name: Download tarball run: | wget -O vsomeip-source.tar.gz $VSOMEIP_SOURCE_TARBALL @@ -101,7 +130,7 @@ jobs: - name: Install dependencies if: steps.cache-vsomeip.outputs.cache-hit != 'true' - run: sudo apt-get install -y build-essential cmake libboost-all-dev + run: sudo apt-get install -y build-essential cmake libboost-all-dev doxygen asciidoc - name: Build vsomeip if: steps.cache-vsomeip.outputs.cache-hit != 'true' @@ -178,8 +207,10 @@ jobs: test: name: Test - needs: obtain_and_build_vsomeip - runs-on: ubuntu-latest + needs: + - obtain_and_build_vsomeip + - set-env + runs-on: ubuntu-22.04 env: CACHE_KEY: ${{ needs.obtain_and_build_vsomeip.outputs.cache_key }} @@ -257,8 +288,10 @@ jobs: build-docs: name: Build documentation - needs: obtain_and_build_vsomeip - runs-on: ubuntu-latest + needs: + - obtain_and_build_vsomeip + - set-env + runs-on: ubuntu-22.04 env: CACHE_KEY: ${{ needs.obtain_and_build_vsomeip.outputs.cache_key }} diff --git a/build/envsetup.sh b/build/envsetup.sh new file mode 100755 index 0000000..28a364e --- /dev/null +++ b/build/envsetup.sh @@ -0,0 +1,120 @@ +#!/bin/bash +# +# to set environment variables for c++ stdlib paths: +# $ source build/envsetup.sh +# +# to automatically select the highest version of the c++ stdlib: +# $ source build/envsetup.sh highest + +# console colors +RED='\033[0;31m' +GRN='\033[0;32m' +ORNG='\033[0;33m' +NC='\033[0;0m' +USE_HIGHEST=0 +if [ "$1" == "highest" ]; then + USE_HIGHEST=1 +fi + +# find the highest number in an array +select_highest_number() { + local numbers=("$@") + local highest_number=0 + + for number in "${numbers[@]}"; do + if [ "$number" -gt "$highest_number" ]; then + highest_number=$number + fi + done + + echo "$highest_number" +} + +# Select a directory from a list of directories +select_directory() { + local directories=("$@") + local selected_path="" + # Check if the directory array contains numbers or strings + is_number=0 + if [[ "${directories[0]}" =~ ^[0-9]+$ ]]; then + is_number=1 + fi + + # Check the number of directories + if [ "${#directories[@]}" -eq 1 ]; then + # If only one directory is found, set MY_PATH to it + selected_path="${directories[0]}" + + elif [ "$USE_HIGHEST" -eq 1 ] && [ "$is_number" -eq 1 ]; then + highest_version=$(select_highest_number "${directories[@]}") + selected_path="$highest_version" + + else + # Display directories to the user if more than one exists + printf "Select a directory: \n" 1>&2 + for i in "${!directories[@]}"; do + printf "%d) %s\n" "$((i + 1))" "${directories[i]}" 1>&2 + done + + # Prompt the user to enter a choice + read -p "Enter the number of your choice: " choice + + # Validate the user’s input + if [[ "$choice" -ge 1 && "$choice" -le "${#directories[@]}" ]]; then + selected_path="${directories[choice - 1]}" + else + printf "${RED}Invalid selection ${NC}\n" 1>&2 + return 1 + fi + fi + + # Return the selected path + echo "$selected_path" +} + +# find c++ include +if [ -d "/usr/include/c++/" ]; then + CPP_DIRS=$( ls /usr/include/c++/ ) + CPP_ARRAY=($CPP_DIRS) + STDLIB_DIR=$(select_directory "${CPP_ARRAY[@]}") + if [ -z "$STDLIB_DIR" ]; then + return 1 + fi + STDLIB_PATH="/usr/include/c++/${STDLIB_DIR}" +else + # Print warning if the directory doesn't exist + echo -e "${RED}/usr/include/c++/ does not exist.${NC}" + return +fi + +# find machine dir +MACHINE_NAME=$(uname -m) +MACHINE_DIRS=$( ls /usr/include/ | grep "${MACHINE_NAME}" ) +MACHINE_ARRAY=($MACHINE_DIRS) +ARCH_DIR=$(select_directory "${MACHINE_ARRAY[@]}") +if [ -z "$ARCH_DIR" ]; then + return 1 +fi +ARCH_PATH="/usr/include/${ARCH_DIR}" + +# find arch c++ include +if [ -d "$ARCH_PATH/c++/" ]; then + CPP_DIRS=$( ls ${ARCH_PATH}/c++/ ) + CPP_ARRAY=($CPP_DIRS) + STDLIB_DIR=$(select_directory "${CPP_ARRAY[@]}") + if [ -z "$STDLIB_DIR" ]; then + return 1 + fi + ARCH_STDLIB_PATH="${ARCH_PATH}/c++/${STDLIB_DIR}" +else + # Print warning if the directory doesn't exist + echo -e "${RED}$ARCH_PATH/c++/ does not exist.${NC}" + return +fi + +# export the variables +export GENERIC_CPP_STDLIB_PATH=$STDLIB_PATH +export ARCH_SPECIFIC_CPP_STDLIB_PATH=$ARCH_STDLIB_PATH + +echo -e "${ORNG}Set GENERIC_CPP_STDLIB_PATH=${GRN}$GENERIC_CPP_STDLIB_PATH${NC}" +echo -e "${ORNG}Set ARCH_SPECIFIC_CPP_STDLIB_PATH=${GRN}$ARCH_SPECIFIC_CPP_STDLIB_PATH${NC}" From 0e9dd9e83cb9c934e700dd3a46c3b043796bb0c6 Mon Sep 17 00:00:00 2001 From: Peter LeVasseur Date: Wed, 8 Jan 2025 12:20:43 -0500 Subject: [PATCH 2/5] Update up-transport-vsomeip-rust and up-streamer-rust to use up-rust 0.3.0 --- Cargo.lock | 55 ++++++++++++++++++++--------- Cargo.toml | 8 +++-- up-linux-streamer-plugin/Cargo.toml | 2 +- 3 files changed, 44 insertions(+), 21 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 19706d0..14773af 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1162,7 +1162,7 @@ dependencies = [ "protobuf", "serde", "tokio", - "up-rust", + "up-rust 0.3.0", "up-transport-mqtt5", "up-transport-vsomeip", "up-transport-zenoh", @@ -1734,7 +1734,7 @@ dependencies = [ "serde_json", "tokio", "tokio-condvar", - "up-rust", + "up-rust 0.3.0", "up-streamer", "uuid", ] @@ -3548,7 +3548,7 @@ dependencies = [ "protobuf", "serde", "serde_json", - "up-rust", + "up-rust 0.3.0", "uuid", ] @@ -4094,7 +4094,7 @@ dependencies = [ "protobuf", "serde", "tokio", - "up-rust", + "up-rust 0.3.0", "up-streamer", "up-transport-mqtt5", "up-transport-vsomeip", @@ -4115,7 +4115,7 @@ dependencies = [ "serde_json", "tokio", "tracing", - "up-rust", + "up-rust 0.3.0", "up-streamer", "up-transport-vsomeip", "up-transport-zenoh", @@ -4148,6 +4148,26 @@ dependencies = [ "uuid-simd", ] +[[package]] +name = "up-rust" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "30118ab07c7ca420e2196bbc0f6f380b3100928d03ec1cd960f9220472f48f1a" +dependencies = [ + "async-trait", + "bytes", + "mediatype", + "protobuf", + "protobuf-codegen", + "protoc-bin-vendored", + "rand", + "thiserror", + "tokio", + "tracing", + "uriparse", + "uuid-simd", +] + [[package]] name = "up-streamer" version = "0.1.0" @@ -4165,7 +4185,7 @@ dependencies = [ "subscription-cache", "tokio", "tokio-condvar", - "up-rust", + "up-rust 0.3.0", "usubscription-static-file", "uuid", ] @@ -4190,15 +4210,15 @@ dependencies = [ "serde_json", "tokio", "tokio-macros", - "up-rust", + "up-rust 0.2.0", "url", "uuid", ] [[package]] name = "up-transport-vsomeip" -version = "0.2.0" -source = "git+https://github.com/eclipse-uprotocol/up-transport-vsomeip-rust.git?tag=v0.3.0#d659287126120d4feb75cbcc35a5334def421f50" +version = "0.3.0" +source = "git+https://github.com/PLeVasseur/up-client-vsomeip-rust?branch=add-build-script_update-up-rust-version#ed295aba9e979ff7cf59b3d085586677e43c75f5" dependencies = [ "async-trait", "bimap", @@ -4213,26 +4233,27 @@ dependencies = [ "serde", "serde_json", "tokio", - "up-rust", + "up-rust 0.3.0", "vsomeip-proc-macro", "vsomeip-sys", ] [[package]] name = "up-transport-zenoh" -version = "0.3.0" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "739441e501be7ea887024bcb2df2b452a362ee39d8efb0f2663fae0dc35e564c" +checksum = "1dba40062ff410f59a9a34a51a9288c8ad92454e4199725264f4f9eaeb604fd9" dependencies = [ "anyhow", "async-trait", "bytes", "lazy_static", "protobuf", + "serde_json", "tokio", "tracing", "tracing-subscriber", - "up-rust", + "up-rust 0.3.0", "zenoh", ] @@ -4265,7 +4286,7 @@ dependencies = [ "async-trait", "serde_json", "subscription-cache", - "up-rust", + "up-rust 0.3.0", ] [[package]] @@ -4362,7 +4383,7 @@ checksum = "5c3082ca00d5a5ef149bb8b555a72ae84c9c59f7250f013ac822ac2e49b19c64" [[package]] name = "vsomeip-proc-macro" version = "0.1.0" -source = "git+https://github.com/eclipse-uprotocol/up-transport-vsomeip-rust.git?tag=v0.3.0#d659287126120d4feb75cbcc35a5334def421f50" +source = "git+https://github.com/PLeVasseur/up-client-vsomeip-rust?branch=add-build-script_update-up-rust-version#ed295aba9e979ff7cf59b3d085586677e43c75f5" dependencies = [ "proc-macro2", "quote", @@ -4372,8 +4393,8 @@ dependencies = [ [[package]] name = "vsomeip-sys" -version = "0.2.0" -source = "git+https://github.com/eclipse-uprotocol/up-transport-vsomeip-rust.git?tag=v0.3.0#d659287126120d4feb75cbcc35a5334def421f50" +version = "0.3.0" +source = "git+https://github.com/PLeVasseur/up-client-vsomeip-rust?branch=add-build-script_update-up-rust-version#ed295aba9e979ff7cf59b3d085586677e43c75f5" dependencies = [ "autocxx", "autocxx-build", diff --git a/Cargo.toml b/Cargo.toml index b3d0320..3cd8706 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -41,9 +41,11 @@ serde_json = { version = "1.0.94" } uuid = { version = "1.7.0" } tokio = { version = "1.35.1", default-features = false, features = ["rt", "rt-multi-thread", "sync", "time"] } protobuf = { version = "3.3", features = ["with-bytes"] } -up-rust = { version = "0.2.0", default-features = false } -up-transport-zenoh = { version = "0.3.0" } -up-transport-vsomeip = { git = "https://github.com/eclipse-uprotocol/up-transport-vsomeip-rust.git", tag = "v0.3.0", default-features = false } +up-rust = { version = "0.3.0", default-features = false } +up-transport-zenoh = { version = "0.4.0" } +# TODO: Update this to dmacattack version for test +up-transport-vsomeip = { git = "https://github.com/PLeVasseur/up-client-vsomeip-rust", branch = "add-build-script_update-up-rust-version", default-features = false } +# up-transport-vsomeip = { git = "https://github.com/eclipse-uprotocol/up-transport-vsomeip-rust.git", tag = "v0.3.0", default-features = false } up-transport-mqtt5 = { version = "0.1.0" } zenoh = { version = "1.0.0", features = ["default", "plugins"] } zenoh-core = { version = "1.0.0" } diff --git a/up-linux-streamer-plugin/Cargo.toml b/up-linux-streamer-plugin/Cargo.toml index 9b34f4e..bddb08d 100644 --- a/up-linux-streamer-plugin/Cargo.toml +++ b/up-linux-streamer-plugin/Cargo.toml @@ -47,7 +47,7 @@ serde = { version = "1.0.154" } serde_json = { version = "1.0.94" } tokio = { version = "1.35.1", default-features = false } up-rust = { workspace = true } -up-transport-zenoh = { workspace = true, optional = true } +up-transport-zenoh = { workspace = true, optional = true, features = ["zenoh-unstable"] } up-transport-vsomeip = { workspace = true, optional = true } up-streamer = { path = "../up-streamer" } usubscription-static-file = {path = "../utils/usubscription-static-file"} From 4f2d98f42dee31224d8764442319bc91be1a2e81 Mon Sep 17 00:00:00 2001 From: Peter LeVasseur Date: Wed, 8 Jan 2025 12:31:43 -0500 Subject: [PATCH 3/5] Update up-transport-mqtt5 to 0.2.0 --- Cargo.lock | 44 ++++++++++++-------------------------------- Cargo.toml | 2 +- 2 files changed, 13 insertions(+), 33 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 14773af..e221c59 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1162,7 +1162,7 @@ dependencies = [ "protobuf", "serde", "tokio", - "up-rust 0.3.0", + "up-rust", "up-transport-mqtt5", "up-transport-vsomeip", "up-transport-zenoh", @@ -1734,7 +1734,7 @@ dependencies = [ "serde_json", "tokio", "tokio-condvar", - "up-rust 0.3.0", + "up-rust", "up-streamer", "uuid", ] @@ -3548,7 +3548,7 @@ dependencies = [ "protobuf", "serde", "serde_json", - "up-rust 0.3.0", + "up-rust", "uuid", ] @@ -4094,7 +4094,7 @@ dependencies = [ "protobuf", "serde", "tokio", - "up-rust 0.3.0", + "up-rust", "up-streamer", "up-transport-mqtt5", "up-transport-vsomeip", @@ -4115,7 +4115,7 @@ dependencies = [ "serde_json", "tokio", "tracing", - "up-rust 0.3.0", + "up-rust", "up-streamer", "up-transport-vsomeip", "up-transport-zenoh", @@ -4128,26 +4128,6 @@ dependencies = [ "zenoh_backend_traits", ] -[[package]] -name = "up-rust" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "af7f283ab2b74869f69bcd5a87950b87db5110e46764af2ddae3248109f0e374" -dependencies = [ - "async-trait", - "bytes", - "mediatype", - "protobuf", - "protobuf-codegen", - "protoc-bin-vendored", - "rand", - "thiserror", - "tokio", - "tracing", - "uriparse", - "uuid-simd", -] - [[package]] name = "up-rust" version = "0.3.0" @@ -4185,16 +4165,16 @@ dependencies = [ "subscription-cache", "tokio", "tokio-condvar", - "up-rust 0.3.0", + "up-rust", "usubscription-static-file", "uuid", ] [[package]] name = "up-transport-mqtt5" -version = "0.1.0" +version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0063dbc750c320501e17ce9d0834a616b26ec49ef6c41887f30bc2788ec25405" +checksum = "43adade571c38ed57b35440a5e524f642f440be19b3f3a5dd79924e0419ce01b" dependencies = [ "async-channel 1.9.0", "async-trait", @@ -4210,7 +4190,7 @@ dependencies = [ "serde_json", "tokio", "tokio-macros", - "up-rust 0.2.0", + "up-rust", "url", "uuid", ] @@ -4233,7 +4213,7 @@ dependencies = [ "serde", "serde_json", "tokio", - "up-rust 0.3.0", + "up-rust", "vsomeip-proc-macro", "vsomeip-sys", ] @@ -4253,7 +4233,7 @@ dependencies = [ "tokio", "tracing", "tracing-subscriber", - "up-rust 0.3.0", + "up-rust", "zenoh", ] @@ -4286,7 +4266,7 @@ dependencies = [ "async-trait", "serde_json", "subscription-cache", - "up-rust 0.3.0", + "up-rust", ] [[package]] diff --git a/Cargo.toml b/Cargo.toml index 3cd8706..c26690a 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -46,7 +46,7 @@ up-transport-zenoh = { version = "0.4.0" } # TODO: Update this to dmacattack version for test up-transport-vsomeip = { git = "https://github.com/PLeVasseur/up-client-vsomeip-rust", branch = "add-build-script_update-up-rust-version", default-features = false } # up-transport-vsomeip = { git = "https://github.com/eclipse-uprotocol/up-transport-vsomeip-rust.git", tag = "v0.3.0", default-features = false } -up-transport-mqtt5 = { version = "0.1.0" } +up-transport-mqtt5 = { version = "0.2.0" } zenoh = { version = "1.0.0", features = ["default", "plugins"] } zenoh-core = { version = "1.0.0" } zenoh-plugin-trait = { version = "1.0.0" } From b12bbaacdd9c092e4a3f674e13f5ce4f0652e8b9 Mon Sep 17 00:00:00 2001 From: Peter LeVasseur Date: Wed, 8 Jan 2025 13:04:15 -0500 Subject: [PATCH 4/5] Add necessary piping through of environment variables for paths to C++ stdlib --- .github/workflows/bundled-lint-and-test.yaml | 16 ++++++++++++++++ .github/workflows/unbundled-lint-and-test.yaml | 16 ++++++++++++++-- 2 files changed, 30 insertions(+), 2 deletions(-) diff --git a/.github/workflows/bundled-lint-and-test.yaml b/.github/workflows/bundled-lint-and-test.yaml index f12945e..7c62c51 100644 --- a/.github/workflows/bundled-lint-and-test.yaml +++ b/.github/workflows/bundled-lint-and-test.yaml @@ -59,6 +59,10 @@ jobs: runs-on: ubuntu-22.04 needs: set-env + env: + ARCH_SPECIFIC_CPP_STDLIB_PATH: ${{ needs.set-env.outputs.arch_specific_cpp_stdlib_path }} + GENERIC_CPP_STDLIB_PATH: ${{ needs.set-env.outputs.generic_cpp_stdlib_path }} + steps: - uses: actions/checkout@v4 @@ -68,10 +72,14 @@ jobs: - name: Set environment variables run: | echo "VSOMEIP_INSTALL_PATH=${{ github.workspace }}/${{ env.VSOMEIP_INSTALL_PATH }}" >> $GITHUB_ENV + env - name: Print environment variables for debugging run: | echo "VSOMEIP_INSTALL_PATH: ${{ env.VSOMEIP_INSTALL_PATH }}" + echo "GENERIC_CPP_STDLIB_PATH: ${{ env.GENERIC_CPP_STDLIB_PATH }}" + echo "ARCH_SPECIFIC_CPP_STDLIB_PATH: ${{ env.ARCH_SPECIFIC_CPP_STDLIB_PATH }}" + env - name: Ensure vsomeip install path exists run: | @@ -104,6 +112,10 @@ jobs: runs-on: ubuntu-22.04 needs: set-env + env: + ARCH_SPECIFIC_CPP_STDLIB_PATH: ${{ needs.set-env.outputs.arch_specific_cpp_stdlib_path }} + GENERIC_CPP_STDLIB_PATH: ${{ needs.set-env.outputs.generic_cpp_stdlib_path }} + steps: - uses: actions/checkout@v4 - uses: dtolnay/rust-toolchain@stable @@ -170,6 +182,10 @@ jobs: runs-on: ubuntu-22.04 needs: set-env + env: + ARCH_SPECIFIC_CPP_STDLIB_PATH: ${{ needs.set-env.outputs.arch_specific_cpp_stdlib_path }} + GENERIC_CPP_STDLIB_PATH: ${{ needs.set-env.outputs.generic_cpp_stdlib_path }} + steps: - uses: actions/checkout@v4 diff --git a/.github/workflows/unbundled-lint-and-test.yaml b/.github/workflows/unbundled-lint-and-test.yaml index b638726..c046fc3 100644 --- a/.github/workflows/unbundled-lint-and-test.yaml +++ b/.github/workflows/unbundled-lint-and-test.yaml @@ -35,6 +35,7 @@ concurrency: cancel-in-progress: true jobs: + set-env: name: Set environment variables runs-on: ubuntu-22.04 @@ -148,9 +149,14 @@ jobs: lint: name: Lint - needs: obtain_and_build_vsomeip - runs-on: ubuntu-latest + needs: + - obtain_and_build_vsomeip + - set-env + runs-on: ubuntu-22.04 + env: + ARCH_SPECIFIC_CPP_STDLIB_PATH: ${{ needs.set-env.outputs.arch_specific_cpp_stdlib_path }} + GENERIC_CPP_STDLIB_PATH: ${{ needs.set-env.outputs.generic_cpp_stdlib_path }} CACHE_KEY: ${{ needs.obtain_and_build_vsomeip.outputs.cache_key }} steps: @@ -211,7 +217,10 @@ jobs: - obtain_and_build_vsomeip - set-env runs-on: ubuntu-22.04 + env: + ARCH_SPECIFIC_CPP_STDLIB_PATH: ${{ needs.set-env.outputs.arch_specific_cpp_stdlib_path }} + GENERIC_CPP_STDLIB_PATH: ${{ needs.set-env.outputs.generic_cpp_stdlib_path }} CACHE_KEY: ${{ needs.obtain_and_build_vsomeip.outputs.cache_key }} steps: @@ -292,7 +301,10 @@ jobs: - obtain_and_build_vsomeip - set-env runs-on: ubuntu-22.04 + env: + ARCH_SPECIFIC_CPP_STDLIB_PATH: ${{ needs.set-env.outputs.arch_specific_cpp_stdlib_path }} + GENERIC_CPP_STDLIB_PATH: ${{ needs.set-env.outputs.generic_cpp_stdlib_path }} CACHE_KEY: ${{ needs.obtain_and_build_vsomeip.outputs.cache_key }} steps: From 4e48ea09cbe7fa09659e70ac4ec1494f897ea1a4 Mon Sep 17 00:00:00 2001 From: Peter LeVasseur Date: Thu, 23 Jan 2025 10:07:19 -0500 Subject: [PATCH 5/5] Update to published up-transport-vsomeip 0.4.1 --- Cargo.toml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index c26690a..d4a78c9 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -43,9 +43,7 @@ tokio = { version = "1.35.1", default-features = false, features = ["rt", "rt-mu protobuf = { version = "3.3", features = ["with-bytes"] } up-rust = { version = "0.3.0", default-features = false } up-transport-zenoh = { version = "0.4.0" } -# TODO: Update this to dmacattack version for test -up-transport-vsomeip = { git = "https://github.com/PLeVasseur/up-client-vsomeip-rust", branch = "add-build-script_update-up-rust-version", default-features = false } -# up-transport-vsomeip = { git = "https://github.com/eclipse-uprotocol/up-transport-vsomeip-rust.git", tag = "v0.3.0", default-features = false } +up-transport-vsomeip = { version = "0.4.1", default-features = false } up-transport-mqtt5 = { version = "0.2.0" } zenoh = { version = "1.0.0", features = ["default", "plugins"] } zenoh-core = { version = "1.0.0" }