|
18 | 18 | CTEST_PARALLEL_LEVEL: 2
|
19 | 19 | CMAKE_BUILD_TYPE: ${{ matrix.build_type }}
|
20 | 20 | PYTHON_VERSION: ${{ matrix.python_version }}
|
| 21 | + BOOST_VERSION: 1.72.0 |
| 22 | + BOOST_EXE: boost_1_72_0-msvc-14.2 |
21 | 23 |
|
22 | 24 | strategy:
|
23 | 25 | fail-fast: true
|
|
30 | 32 | ubuntu-20.04-gcc-9-tbb,
|
31 | 33 | ubuntu-20.04-clang-9,
|
32 | 34 | macOS-11-xcode-13.4.1,
|
| 35 | + windows-2019-msbuild, |
33 | 36 | ]
|
34 | 37 |
|
35 | 38 | build_type: [Release]
|
|
56 | 59 | compiler: xcode
|
57 | 60 | version: "13.4.1"
|
58 | 61 |
|
| 62 | + - name: windows-2019-msbuild |
| 63 | + os: windows-2019 |
| 64 | + platform: 64 |
| 65 | + |
59 | 66 | steps:
|
60 | 67 | - name: Checkout
|
61 | 68 | uses: actions/checkout@v3
|
@@ -97,29 +104,68 @@ jobs:
|
97 | 104 | echo "CC=clang" >> $GITHUB_ENV
|
98 | 105 | echo "CXX=clang++" >> $GITHUB_ENV
|
99 | 106 |
|
| 107 | + - name: Setup msbuild (Windows) |
| 108 | + if: runner.os == 'Windows' |
| 109 | + uses: ilammy/msvc-dev-cmd@v1 |
| 110 | + with: |
| 111 | + arch: x${{matrix.platform}} |
| 112 | + |
| 113 | + - name: Setup python (Windows) |
| 114 | + uses: actions/setup-python@v4 |
| 115 | + if: runner.os == 'Windows' |
| 116 | + with: |
| 117 | + python-version: ${{ matrix.python_version }} |
| 118 | + |
| 119 | + - name: Install ninja (Windows) |
| 120 | + if: runner.os == 'Windows' |
| 121 | + shell: bash |
| 122 | + run: | |
| 123 | + choco install ninja |
| 124 | + ninja --version |
| 125 | + where ninja |
| 126 | +
|
| 127 | + - name: Install Boost (Windows) |
| 128 | + if: runner.os == 'Windows' |
| 129 | + shell: powershell |
| 130 | + run: | |
| 131 | + # Snippet from: https://github.com/actions/virtual-environments/issues/2667 |
| 132 | + $BOOST_PATH = "C:\hostedtoolcache\windows\Boost\$env:BOOST_VERSION\x86_64" |
| 133 | +
|
| 134 | + # Use the prebuilt binary for Windows |
| 135 | + $Url = "https://sourceforge.net/projects/boost/files/boost-binaries/$env:BOOST_VERSION/$env:BOOST_EXE-${{matrix.platform}}.exe" |
| 136 | + (New-Object System.Net.WebClient).DownloadFile($Url, "$env:TEMP\boost.exe") |
| 137 | + Start-Process -Wait -FilePath "$env:TEMP\boost.exe" "/SILENT","/SP-","/SUPPRESSMSGBOXES","/DIR=$BOOST_PATH" |
| 138 | +
|
| 139 | + # Set the BOOST_ROOT variable |
| 140 | + echo "BOOST_ROOT=$BOOST_PATH" >> $env:GITHUB_ENV |
| 141 | +
|
100 | 142 | - name: Set GTSAM_WITH_TBB Flag
|
101 | 143 | if: matrix.flag == 'tbb'
|
102 | 144 | run: |
|
103 | 145 | echo "GTSAM_WITH_TBB=ON" >> $GITHUB_ENV
|
104 | 146 | echo "GTSAM Uses TBB"
|
105 | 147 |
|
106 |
| - - name: Set Swap Space |
| 148 | + - name: Set Swap Space (Linux) |
107 | 149 | if: runner.os == 'Linux'
|
108 | 150 | uses: pierotofy/set-swap-space@master
|
109 | 151 | with:
|
110 | 152 | swap-size-gb: 6
|
111 | 153 |
|
112 |
| - - name: Install System Dependencies |
| 154 | + - name: Install System Dependencies (Linux, macOS) |
| 155 | + if: runner.os != 'Windows' |
113 | 156 | run: |
|
114 | 157 | bash .github/scripts/python.sh -d
|
115 | 158 |
|
116 | 159 | - name: Install Python Dependencies
|
| 160 | + shell: bash |
117 | 161 | run: python$PYTHON_VERSION -m pip install -r python/dev_requirements.txt
|
118 | 162 |
|
119 | 163 | - name: Build
|
| 164 | + shell: bash |
120 | 165 | run: |
|
121 | 166 | bash .github/scripts/python.sh -b
|
122 | 167 |
|
123 | 168 | - name: Test
|
| 169 | + shell: bash |
124 | 170 | run: |
|
125 | 171 | bash .github/scripts/python.sh -t
|
0 commit comments