Skip to content

Commit

Permalink
Refs #18687. Fixing windows ci
Browse files Browse the repository at this point in the history
Signed-off-by: Ricardo González Moreno <[email protected]>
  • Loading branch information
richiware committed Sep 27, 2023
1 parent 4f0622d commit 360f475
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 8 deletions.
38 changes: 31 additions & 7 deletions .github/workflows/build_and_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,8 @@ jobs:
'cmake_minimum_required(VERSION 3.5)' + $cr +
'project(dummy VERSION 1.0.0 LANGUAGES CXX)' + $cr +
'find_package (Python3 COMPONENTS Interpreter Development REQUIRED)' + $cr +
'message(STATUS "cmake detected python=>>>>>${Python3_EXECUTABLE}<<<<<<")' |
Out-File CMakeLists.txt
'message(STATUS "cmake detected python=>>>>>${Python3_EXECUTABLE}<<<<<<")' |
Out-File CMakeLists.txt
(cmake .) *>&1 | % {
if($_ -Match "cmake detected python=>>>>>(?<exec>.*)<<<<<<")
{
Expand All @@ -59,6 +59,18 @@ jobs:
run: |
vcs import src --skip-existing --input src/fastdds_python/fastdds_python.repos
- name: Get minimum supported version of CMake
uses: lukka/get-cmake@latest
with:
cmakeVersion: 3.22.6
- name: Use cmake
run: cmake --version

- name: Setup ccache
uses: Chocobo1/setup-ccache-action@v1
with:
windows_compile_environment: msvc

- name: Build workspace
shell: pwsh
run: |
Expand All @@ -67,14 +79,15 @@ jobs:
Import-Module $modulepath
Enter-VsDevShell -SetDefaultWindowTitle -InstallPath $installpath `
-StartInPath (pwd) -DevCmdArguments '/arch=x64 /host_arch=x64';
$cargs = @("--event-handlers=console_direct+", `
"--metas", "./src/fastdds_python/.github/workflows/test.meta")
colcon build --executor parallel $cargs
colcon build --executor parallel --event-handlers console_direct+ desktop_notification- `
--metas ./src/fastdds_python/.github/workflows/test.meta `
--cmake-args -DCMAKE_C_COMPILER_LAUNCHER="${{ env.ccache_symlinks_path }}" `
-DCMAKE_CXX_COMPILER_LAUNCHER="${{ env.ccache_symlinks_path }}"
- name: Run tests
shell: pwsh
run: |
colcon test --packages-select fastdds_python --event-handlers=console_direct+ `
colcon test --packages-select fastdds_python --event-handlers console_direct+ desktop_notification- `
--return-code-on-test-failure --ctest-args --timeout 60
- name: Upload Logs
Expand Down Expand Up @@ -111,9 +124,20 @@ jobs:
run: |
vcs import --skip-existing src < src/fastdds_python/fastdds_python.repos
- name: Get minimum supported version of CMake
uses: lukka/get-cmake@latest
with:
cmakeVersion: 3.22.6
- name: Use cmake
run: cmake --version

- name: Setup ccache
uses: Chocobo1/setup-ccache-action@v1

- name: Build workspace
run: >
colcon build --event-handlers=console_direct+ --metas ./src/fastdds_python/.github/workflows/test.meta
colcon build --event-handlers=console_direct+ --metas ./src/fastdds_python/.github/workflows/test.meta \
--cmake-args -DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_COMPILER_LAUNCHER=ccache
- name: Run tests
run: |
Expand Down
2 changes: 1 addition & 1 deletion fastdds_python/colcon.pkg
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "fastdds_python",
"type": "cmake",
"build-dependencies": ["fastrtps"]
"build-dependencies": ["fastcdr", "fastrtps"]
}

0 comments on commit 360f475

Please sign in to comment.