Skip to content

Fix windows ccache [19657] #773

Fix windows ccache [19657]

Fix windows ccache [19657] #773

Workflow file for this run

name: test
on:
workflow_dispatch:
pull_request:
push:
branches:
- main
schedule:
- cron: '0 0 * * *'
jobs:
windows-build-test:
runs-on: windows-2019
env:
CXXFLAGS: /MP
OPENSSL64_ROOT: "C:/Program Files/OpenSSL-Win64"
steps:
- name: Install ccache
run: |
powershell -File "src/fastdds_python/.github/ci/ccache.ps1"
echo "$pwdpath\.github\ccache" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
Set-Item -Force -Path "env:PATH" -Value "$pwdpath\.github\ccache;$env:PATH"
ls "$pwdpath\.github"
ls "$pwdpath\.github\ccache"
ccache --version
- name: Setup ccache
uses: Chocobo1/setup-ccache-action@v1
with:
prepend_symlinks_to_path: false
install_ccache: false
windows_compile_environment: msvc
- name: Build workspace
shell: pwsh
run: |
$installpath = "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise"
$modulepath = "$installpath\Common7\Tools\Microsoft.VisualStudio.DevShell.dll"
Import-Module $modulepath
Enter-VsDevShell -SetDefaultWindowTitle -InstallPath $installpath `
-StartInPath (pwd) -DevCmdArguments '/arch=x64 /host_arch=x64';
colcon build --executor parallel --event-handlers console_direct+ desktop_notification- `
--metas ./src/fastdds_python/.github/workflows/test.meta `
--cmake-args -DCMAKE_C_COMPILER_LAUNCHER=ccache
-DCMAKE_CXX_COMPILER_LAUNCHE=ccache
- name: Run tests
shell: pwsh
run: |
colcon test --packages-select fastdds_python --event-handlers console_direct+ desktop_notification- `
--return-code-on-test-failure --ctest-args --timeout 60
- name: Upload Logs
uses: actions/upload-artifact@v1
with:
name: colcon-logs-windows
path: log/
if: always()
ubuntu-build-test:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v2
with:
path: src/fastdds_python
- name: Install apt dependencies
run: |
sudo apt update
sudo apt install -y \
python3 \
python3-pip \
swig \
libpython3-dev
- name: Install python dependencies
run: |
sudo pip3 install -U \
vcstool \
colcon-common-extensions
- name: Fetch repositories
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 \
--cmake-args -DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_COMPILER_LAUNCHER=ccache
- name: Run tests
run: |
source install/setup.bash && \
colcon test \
--packages-select fastdds_python \
--event-handlers=console_direct+ \
--return-code-on-test-failure \
--ctest-args \
--output-on-failure \
--timeout 60
- name: Upload Logs
uses: actions/upload-artifact@v1
with:
name: colcon-logs-ubuntu
path: log/
if: always()