|
10 | 10 | - cron: '0 0 * * *' |
11 | 11 |
|
12 | 12 | jobs: |
| 13 | + windows-build-test: |
| 14 | + runs-on: windows-2019 |
| 15 | + |
| 16 | + env: |
| 17 | + CXXFLAGS: /MP |
| 18 | + OPENSSL64_ROOT: "C:/Program Files/OpenSSL-Win64" |
| 19 | + |
| 20 | + steps: |
| 21 | + |
| 22 | + - name: install OpenSSL |
| 23 | + shell: pwsh |
| 24 | + run: | |
| 25 | + choco install openssl -yr --no-progress |
| 26 | + "System32;SysWoW64" -split ";" | Join-Path -Path $env:windir -ChildPath {$_} ` |
| 27 | + | ls -Include libssl-*.dll | rm |
| 28 | +
|
| 29 | + - name: Install python build dependencies |
| 30 | + shell: pwsh |
| 31 | + run: > |
| 32 | + pip install -U colcon-common-extensions colcon-mixin vcstool; |
| 33 | +
|
| 34 | + - name: Install python tests dependencies |
| 35 | + shell: pwsh |
| 36 | + run: | |
| 37 | + cd (ni -Type Directory -Path "$Env:TMP\$(New-Guid)") |
| 38 | + $cr = "`n" |
| 39 | + 'cmake_minimum_required(VERSION 3.5)' + $cr + |
| 40 | + 'project(dummy VERSION 1.0.0 LANGUAGES CXX)' + $cr + |
| 41 | + 'find_package (Python3 COMPONENTS Interpreter Development REQUIRED)' + $cr + |
| 42 | + 'message(STATUS "cmake detected python=>>>>>${Python3_EXECUTABLE}<<<<<<")' | |
| 43 | + Out-File CMakeLists.txt |
| 44 | + (cmake .) *>&1 | % { |
| 45 | + if($_ -Match "cmake detected python=>>>>>(?<exec>.*)<<<<<<") |
| 46 | + { |
| 47 | + $python_exec = $Matches.exec |
| 48 | + return |
| 49 | + } |
| 50 | + } |
| 51 | + & $python_exec -m pip install -U pytest pywin32 |
| 52 | +
|
| 53 | + - uses: actions/checkout@v2 |
| 54 | + with: |
| 55 | + path: src/fastdds_python |
| 56 | + |
| 57 | + - name: Fetch repositories |
| 58 | + shell: pwsh |
| 59 | + run: | |
| 60 | + vcs import src --skip-existing --input src/fastdds_python/fastdds_python.repos |
| 61 | +
|
| 62 | + - name: Build workspace |
| 63 | + shell: pwsh |
| 64 | + run: | |
| 65 | + $installpath = "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise" |
| 66 | + $modulepath = "$installpath\Common7\Tools\Microsoft.VisualStudio.DevShell.dll" |
| 67 | + Import-Module $modulepath |
| 68 | + Enter-VsDevShell -SetDefaultWindowTitle -InstallPath $installpath ` |
| 69 | + -DevCmdArguments '/arch=x64 /host_arch=x64'; |
| 70 | + $cargs = @("--event-handlers=console_direct+", ` |
| 71 | + "--metas", "./src/fastdds_python/.github/workflows/test.meta") |
| 72 | + colcon build --executor parallel $cargs |
| 73 | +
|
| 74 | + - name: Run tests |
| 75 | + shell: pwsh |
| 76 | + run: | |
| 77 | + colcon test --packages-select fastdds_python --event-handlers=console_direct+ ` |
| 78 | + --return-code-on-test-failure --ctest-args --timeout 60 |
| 79 | +
|
| 80 | + - name: Upload Logs |
| 81 | + uses: actions/upload-artifact@v1 |
| 82 | + with: |
| 83 | + name: colcon-logs-windows |
| 84 | + path: log/ |
| 85 | + if: always() |
| 86 | + |
13 | 87 | ubuntu-build-test: |
14 | 88 | runs-on: ubuntu-20.04 |
15 | 89 |
|
|
24 | 98 | sudo apt install -y \ |
25 | 99 | python3 \ |
26 | 100 | python3-pip \ |
27 | | - libasio-dev \ |
28 | | - libtinyxml2-dev \ |
29 | 101 | swig \ |
30 | 102 | libpython3-dev |
31 | 103 |
|
|
40 | 112 | vcs import --skip-existing src < src/fastdds_python/fastdds_python.repos |
41 | 113 |
|
42 | 114 | - name: Build workspace |
43 | | - run: colcon build --event-handlers=console_direct+ |
| 115 | + run: > |
| 116 | + colcon build --event-handlers=console_direct+ --metas ./src/fastdds_python/.github/workflows/test.meta |
44 | 117 |
|
45 | 118 | - name: Run tests |
46 | 119 | run: | |
|
0 commit comments