Skip to content

Commit f012a63

Browse files
committed
Add windows CI
1 parent d815f0b commit f012a63

File tree

2 files changed

+81
-13
lines changed

2 files changed

+81
-13
lines changed

.github/workflows/main.yml

Lines changed: 41 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ defaults:
1313
shell: bash -l -eo pipefail {0}
1414

1515
jobs:
16-
test:
16+
test-unix:
1717
strategy:
1818
matrix:
1919
os: [ubuntu-latest, macos-latest]
@@ -27,11 +27,11 @@ jobs:
2727
environment-name: xeus-octave
2828
cache-downloads: true
2929
- name: Configure
30-
run: cmake --preset conda-debug
30+
run: cmake --preset conda-debug-unix
3131
- name: Build
32-
run: cmake --build --preset conda-debug
32+
run: cmake --build --preset conda-debug-unix
3333
- name: Install
34-
run: cmake --install build/cmake/conda-debug
34+
run: cmake --install build/cmake/conda-debug-unix
3535
- name: Test
3636
run: python -m pytest ./test -k 'not plot'
3737
- name: Plotly toolkit test
@@ -42,6 +42,43 @@ jobs:
4242
sudo apt-get update && sudo apt-get install libgl1-mesa-dev xvfb
4343
xvfb-run python -m pytest ./test -k 'plot_notebook'
4444
45+
test-win:
46+
runs-on: ${{ matrix.os }}
47+
strategy:
48+
matrix:
49+
os: [ windows-latest]
50+
steps:
51+
- uses: actions/checkout@v3
52+
- name: Install mamba
53+
uses: mamba-org/provision-with-micromamba@v13
54+
with:
55+
environment-file: environment-dev.yml
56+
environment-name: xeus-octave
57+
cache-downloads: true
58+
- name: micromamba shell hook
59+
shell: powershell
60+
run: micromamba shell hook -s cmd.exe -p C:\Users\runneradmin\micromamba
61+
- name: Configure
62+
shell: cmd
63+
run: |
64+
call C:\Users\runneradmin\micromamba\condabin\micromamba.bat activate xeus-octave
65+
cmake --preset conda-debug-win
66+
- name: Build
67+
shell: cmd
68+
run: |
69+
call C:\Users\runneradmin\micromamba\condabin\micromamba.bat activate xeus-octave
70+
cmake --build --preset conda-debug-win
71+
- name: Install
72+
shell: cmd
73+
run: |
74+
call C:\Users\runneradmin\micromamba\condabin\micromamba.bat activate xeus-octave
75+
cmake --install build\cmake\conda-debug-win
76+
- name: Test
77+
shell: cmd
78+
run: |
79+
call C:\Users\runneradmin\micromamba\condabin\micromamba.bat activate xeus-octave
80+
pytest test
81+
4582
static-analysis:
4683
runs-on: "ubuntu-latest"
4784
steps:

CMakePresets.json

Lines changed: 40 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,25 @@
11
{
2-
"version": 2,
2+
"version": 4,
33
"buildPresets": [
44
{
5-
"configurePreset": "conda-debug",
6-
"name": "conda-debug"
5+
"configurePreset": "conda-debug-unix",
6+
"name": "conda-debug-unix"
7+
},
8+
{
9+
"configurePreset": "conda-debug-win",
10+
"name": "conda-debug-win"
711
}
812
],
913
"configurePresets": [
1014
{
1115
"binaryDir": "${sourceDir}/build/cmake/${presetName}",
1216
"cacheVariables": {
13-
"CMAKE_CXX_COMPILER_LAUNCHER": "ccache",
1417
"CMAKE_EXPORT_COMPILE_COMMANDS": "ON",
1518
"CMAKE_INSTALL_PREFIX": "$env{CONDA_PREFIX}",
1619
"CMAKE_PREFIX_PATH": "$env{CONDA_PREFIX}"
1720
},
1821
"description": "Dev base profile using conda libraries",
1922
"displayName": "Conda Dev",
20-
"generator": "Unix Makefiles",
2123
"hidden": true,
2224
"name": "conda-dev",
2325
"warnings": {
@@ -27,15 +29,44 @@
2729
}
2830
},
2931
{
32+
"name": "debug",
33+
"hidden": true,
34+
"displayName": "Debug",
3035
"cacheVariables": {
3136
"CMAKE_BUILD_TYPE": "Debug"
37+
}
38+
},
39+
{
40+
"cacheVariables": {
41+
"CMAKE_CXX_COMPILER_LAUNCHER": "ccache"
3242
},
33-
"description": "A debug build using conda libraries",
43+
"generator": "Unix Makefiles",
44+
"description": "A debug build using conda libraries for Linux/MacOS",
3445
"displayName": "Conda Debug",
3546
"inherits": [
36-
"conda-dev"
47+
"conda-dev",
48+
"debug"
3749
],
38-
"name": "conda-debug"
50+
"name": "conda-debug-unix",
51+
"condition": {
52+
"type": "notEquals",
53+
"lhs": "${hostSystemName}",
54+
"rhs": "Windows"
55+
}
56+
},
57+
{
58+
"name": "conda-debug-win",
59+
"generator": "NMake Makefiles",
60+
"description": "A debug build using conda libraries for Windows",
61+
"inherits": [
62+
"conda-dev",
63+
"debug"
64+
],
65+
"condition": {
66+
"type": "equals",
67+
"lhs": "${hostSystemName}",
68+
"rhs": "Windows"
69+
}
3970
}
4071
]
41-
}
72+
}

0 commit comments

Comments
 (0)