Skip to content

Commit a315936

Browse files
committed
ci: add windows ci with v142
1 parent 45c5039 commit a315936

File tree

3 files changed

+167
-1
lines changed

3 files changed

+167
-1
lines changed
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: PyCppAD CI for Windows
1+
name: PyCppAD CI for Windows - Clang
22
on:
33
pull_request:
44
push:
Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
name: PyCppAD CI for Windows - (v142)
2+
on:
3+
pull_request:
4+
push:
5+
6+
env:
7+
# Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.)
8+
BUILD_TYPE: Release
9+
10+
jobs:
11+
build:
12+
runs-on: ${{ matrix.os }}
13+
strategy:
14+
fail-fast: true
15+
matrix:
16+
name: [windows-latest]
17+
18+
include:
19+
- name: windows-latest
20+
os: windows-2019
21+
22+
steps:
23+
- uses: actions/checkout@v2
24+
- name: Checkout submodules
25+
run: |
26+
git submodule update --init
27+
- uses: goanpeca/setup-miniconda@v1
28+
env:
29+
ACTIONS_ALLOW_UNSECURE_COMMANDS: 'true'
30+
with:
31+
activate-environment: pycppad
32+
environment-file: .github/workflows/conda/conda-env.yml
33+
python-version: 3.7
34+
- name: Install cmake and update conda
35+
run: |
36+
conda install cmake -c main
37+
38+
- name: Build PyCppAD
39+
shell: cmd /C CALL {0}
40+
env:
41+
ACTIONS_ALLOW_UNSECURE_COMMANDS: 'true'
42+
run: |
43+
:: unset extra Boost envs
44+
set Boost_ROOT=
45+
set BOOST_ROOT_1_69_0=
46+
set BOOST_ROOT_1_72_0=
47+
set PATH=%PATH:C:\hostedtoolcache\windows\Boost\1.72.0;=%
48+
49+
call "%programfiles(x86)%\Microsoft Visual Studio\2019\Enterprise\VC\Auxiliary\Build\vcvarsall.bat" amd64
50+
51+
:: Create build directory
52+
mkdir build
53+
pushd build
54+
55+
:: Configure
56+
cmake ^
57+
-G "Visual Studio 16 2019" -T "v142" -DCMAKE_GENERATOR_PLATFORM=x64 ^
58+
-DCMAKE_INSTALL_PREFIX=%CONDA_PREFIX%\Library ^
59+
-DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} ^
60+
-DPYTHON_SITELIB=%CONDA_PREFIX%\Lib\site-packages ^
61+
-DPYTHON_EXECUTABLE=%CONDA_PREFIX%\python.exe ^
62+
-DBUILD_WITH_CPPAD_CODEGEN_BINDINGS=OFF ^
63+
..
64+
65+
:: Build
66+
cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}} --target install
67+
68+
:: Testing
69+
set PATH=%PATH%;%CONDA_PREFIX%\Lib\site-packages\pycppad
70+
ctest --output-on-failure -C Release -V
71+
72+
:: Test Python import
73+
cd ..
74+
python -c "import pycppad"
Lines changed: 92 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,92 @@
1+
name: Build Pinocchio for Windows (v142) via Conda
2+
on:
3+
pull_request:
4+
push:
5+
6+
jobs:
7+
build:
8+
runs-on: ${{ matrix.os }}
9+
strategy:
10+
fail-fast: false
11+
matrix:
12+
name: [windows-latest]
13+
14+
include:
15+
- name: windows-latest
16+
os: windows-2019
17+
18+
steps:
19+
- uses: actions/checkout@v2
20+
- name: Checkout submodules
21+
run: |
22+
git submodule update --init
23+
- uses: goanpeca/setup-miniconda@v1
24+
env:
25+
ACTIONS_ALLOW_UNSECURE_COMMANDS: 'true'
26+
with:
27+
activate-environment: pinocchio
28+
environment-file: .github/workflows/conda/conda-env.yml
29+
python-version: 3.7
30+
- name: Install cmake and update conda
31+
run: |
32+
conda install cmake -c main
33+
34+
- name: Display the path
35+
run: echo %cd%
36+
shell: cmd
37+
38+
- name: Build Pinocchio
39+
shell: cmd /C CALL {0}
40+
env:
41+
ACTIONS_ALLOW_UNSECURE_COMMANDS: 'true'
42+
run: |
43+
:: unset extra Boost envs
44+
set Boost_ROOT=
45+
set BOOST_ROOT_1_69_0=
46+
set BOOST_ROOT_1_72_0=
47+
48+
call "%programfiles(x86)%\Microsoft Visual Studio\2019\Enterprise\VC\Auxiliary\Build\vcvarsall.bat" amd64
49+
50+
:: Create build directory
51+
mkdir build
52+
pushd build
53+
54+
:: Configure
55+
cmake ^
56+
-G "Visual Studio 16 2019" -T "v142" -DCMAKE_GENERATOR_PLATFORM=x64 ^
57+
-DCMAKE_INSTALL_PREFIX=%CONDA_PREFIX%\Library ^
58+
-DCMAKE_BUILD_TYPE=Release ^
59+
-DPYTHON_SITELIB=%CONDA_PREFIX%\Lib\site-packages ^
60+
-DPYTHON_EXECUTABLE=%CONDA_PREFIX%\python.exe ^
61+
-DBUILD_WITH_URDF_SUPPORT=ON ^
62+
-DBUILD_PYTHON_INTERFACE=OFF ^
63+
-DBUILD_WITH_COLLISION_SUPPORT=ON ^
64+
-DBUILD_TESTING=ON ^
65+
..
66+
67+
:: Build
68+
cmake --build . --config Release --target install
69+
70+
# - name: Start SSH session
71+
# uses: luchihoratiu/debug-via-ssh@main
72+
# with:
73+
# NGROK_AUTH_TOKEN: ${{ secrets.NGROK_AUTH_TOKEN }}
74+
# SSH_PASS: ${{ secrets.SSH_PASS }}
75+
#
76+
- name: Testing
77+
shell: cmd /C CALL {0}
78+
env:
79+
ACTIONS_ALLOW_UNSECURE_COMMANDS: 'true'
80+
run: |
81+
:: Testing
82+
pushd build
83+
set PATH=%PATH%;%CONDA_PREFIX%\Lib\site-packages\pinocchio
84+
set PATH=%PATH%;%CONDA_PREFIX%\Library\Lib
85+
set PATH=%PATH%;%CONDA_PREFIX%\Library\bin
86+
.\unittest\Release\test-cpp-urdf.exe
87+
.\examples\Release\example-cpp-geometry-models.exe
88+
ctest --output-on-failure -C Release -V --repeat until-pass:1
89+
90+
# :: Test Python import
91+
# cd ..
92+
# python -c "import pinocchio"

0 commit comments

Comments
 (0)