-
Notifications
You must be signed in to change notification settings - Fork 39
102 lines (89 loc) · 2.81 KB
/
windows-conda.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
name: Build Eigenpy on Windows via Conda
on: [push,pull_request]
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [windows-latest]
steps:
- uses: actions/checkout@v3
- name: Checkout submodules
run: |
git submodule update --init
- uses: goanpeca/setup-miniconda@v1
env:
ACTIONS_ALLOW_UNSECURE_COMMANDS: 'true'
with:
activate-environment: eigenpy
environment-file: .github/workflows/conda/environment.yml
python-version: 3.7
- name: Build Eigenpy
shell: cmd /C CALL {0}
env:
ACTIONS_ALLOW_UNSECURE_COMMANDS: 'true'
run: |
:: unset extra Boost envs
set Boost_ROOT=
set BOOST_ROOT_1_69_0=
set BOOST_ROOT_1_72_0=
set PATH=%PATH:C:\hostedtoolcache\windows\Boost\1.72.0;=%
if errorlevel 1 exit 1
:: start building
call "%programfiles%\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvarsall.bat" amd64
if errorlevel 1 exit 1
mkdir build
pushd build
cmake ^
-G "NMake Makefiles" ^
-DCMAKE_INSTALL_PREFIX=%CONDA_PREFIX%\Library ^
-DCMAKE_BUILD_TYPE=Release ^
-DGENERATE_PYTHON_STUBS=ON ^
-DPYTHON_SITELIB=%CONDA_PREFIX%\Lib\site-packages ^
-DPYTHON_EXECUTABLE=%CONDA_PREFIX%\python.exe ^
..
if errorlevel 1 exit 1
:: Build and Install
cmake --build . --config Release --target install
if errorlevel 1 exit 1
:: Testing
ctest --output-on-failure -C Release -V
if errorlevel 1 exit 1
:: Test Python import
cd ..
python -c "import eigenpy"
if errorlevel 1 exit 1
:: Test packaging
cmake -B test-packaging -S unittest/packaging/cmake ^
-G "NMake Makefiles" ^
-DPYTHON_EXECUTABLE=%CONDA_PREFIX%\python.exe
if errorlevel 1 exit 1
:: Configure hpp-fcl
conda install -c conda-forge octomap assimp qhull
git clone --recursive https://github.com/humanoid-path-planner/hpp-fcl.git
pushd hpp-fcl
mkdir build
pushd build
cmake ^
-G "NMake Makefiles" ^
-DCMAKE_INSTALL_PREFIX=%CONDA_PREFIX%\Library ^
-DCMAKE_BUILD_TYPE=Release ^
-DPYTHON_EXECUTABLE=%CONDA_PREFIX%\python.exe ^
..
cd ..
if errorlevel 1 exit 1
:: Uninstall
cmake --build . --config Release --target uninstall
if errorlevel 1 exit 1
check:
if: always()
name: check-windows-conda
needs:
- build
runs-on: Ubuntu-latest
steps:
- name: Decide whether the needed jobs succeeded or failed
uses: re-actors/alls-green@release/v1
with:
jobs: ${{ toJSON(needs) }}