-
Notifications
You must be signed in to change notification settings - Fork 5
60 lines (51 loc) · 1.5 KB
/
ci-windows-v142.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
name: PyCppAD CI for Windows - (v142)
on:
pull_request:
push:
env:
# Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.)
BUILD_TYPE: Release
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: true
matrix:
os: [windows-2019]
compiler: [cl, clang-cl]
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
- uses: conda-incubator/setup-miniconda@v3
with:
activate-environment: pycppad
auto-update-conda: true
environment-file: .github/workflows/conda/conda-env-win.yml
python-version: 3.8
auto-activate-base: false
- name: Build PyCppAD
shell: cmd /C CALL {0}
env:
CC: ${{ matrix.compiler }}
CXX: ${{ matrix.compiler }}
run: |
:: Create build directory
mkdir build
pushd build
:: Configure
cmake ^
-G "Ninja" ^
-DCMAKE_INSTALL_PREFIX=%CONDA_PREFIX%\Library ^
-DPYTHON_SITELIB=%CONDA_PREFIX%\Lib\site-packages ^
-DPYTHON_EXECUTABLE=%CONDA_PREFIX%\python.exe ^
-DBUILD_WITH_CPPAD_CODEGEN_BINDINGS=OFF ^
..
:: Build
cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}} --target install -j1
:: Testing
set PATH=%PATH%;%CONDA_PREFIX%\Lib\site-packages\pycppad
ctest --output-on-failure -C Release -V
:: Test Python import
cd ..
python -c "import pycppad"