Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add windows CI #102

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
45 changes: 41 additions & 4 deletions .github/workflows/main.yml
Expand Up @@ -13,7 +13,7 @@ defaults:
shell: bash -l -eo pipefail {0}

jobs:
test:
test-unix:
strategy:
matrix:
os: [ubuntu-latest, macos-latest]
Expand All @@ -27,11 +27,11 @@ jobs:
environment-name: xeus-octave
cache-downloads: true
- name: Configure
run: cmake --preset conda-debug
run: cmake --preset conda-debug-unix
- name: Build
run: cmake --build --preset conda-debug
run: cmake --build --preset conda-debug-unix
- name: Install
run: cmake --install build/cmake/conda-debug
run: cmake --install build/cmake/conda-debug-unix
- name: Test
run: python -m pytest ./test -k 'not plot'
- name: Plotly toolkit test
Expand All @@ -42,6 +42,43 @@ jobs:
sudo apt-get update && sudo apt-get install libgl1-mesa-dev xvfb
xvfb-run python -m pytest ./test -k 'plot_notebook'

test-win:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ windows-latest]
steps:
- uses: actions/checkout@v3
- name: Install mamba
uses: mamba-org/provision-with-micromamba@v13
with:
environment-file: environment-dev.yml
environment-name: xeus-octave
cache-downloads: true
- name: micromamba shell hook
shell: powershell
run: micromamba shell hook -s cmd.exe -p C:\Users\runneradmin\micromamba
- name: Configure
shell: cmd
run: |
call C:\Users\runneradmin\micromamba\condabin\micromamba.bat activate xeus-octave
cmake --preset conda-debug-win
- name: Build
shell: cmd
run: |
call C:\Users\runneradmin\micromamba\condabin\micromamba.bat activate xeus-octave
cmake --build --preset conda-debug-win
- name: Install
shell: cmd
run: |
call C:\Users\runneradmin\micromamba\condabin\micromamba.bat activate xeus-octave
cmake --install build\cmake\conda-debug-win
- name: Test
shell: cmd
run: |
call C:\Users\runneradmin\micromamba\condabin\micromamba.bat activate xeus-octave
pytest test

static-analysis:
runs-on: "ubuntu-latest"
steps:
Expand Down
47 changes: 39 additions & 8 deletions CMakePresets.json
@@ -1,23 +1,25 @@
{
"version": 2,
"version": 4,
"buildPresets": [
{
"configurePreset": "conda-debug",
"name": "conda-debug"
"configurePreset": "conda-debug-unix",
"name": "conda-debug-unix"
},
{
"configurePreset": "conda-debug-win",
"name": "conda-debug-win"
}
],
"configurePresets": [
{
"binaryDir": "${sourceDir}/build/cmake/${presetName}",
"cacheVariables": {
"CMAKE_CXX_COMPILER_LAUNCHER": "ccache",
"CMAKE_EXPORT_COMPILE_COMMANDS": "ON",
"CMAKE_INSTALL_PREFIX": "$env{CONDA_PREFIX}",
"CMAKE_PREFIX_PATH": "$env{CONDA_PREFIX}"
},
"description": "Dev base profile using conda libraries",
"displayName": "Conda Dev",
"generator": "Unix Makefiles",
"hidden": true,
"name": "conda-dev",
"warnings": {
Expand All @@ -30,12 +32,41 @@
"cacheVariables": {
"CMAKE_BUILD_TYPE": "Debug"
},
"description": "A debug build using conda libraries",
"displayName": "Debug",
"hidden": true,
"name": "debug"
},
{
"cacheVariables": {
"CMAKE_CXX_COMPILER_LAUNCHER": "ccache"
},
"condition": {
"lhs": "${hostSystemName}",
"rhs": "Windows",
"type": "notEquals"
},
"description": "A debug build using conda libraries for Linux/MacOS",
"displayName": "Conda Debug",
"generator": "Unix Makefiles",
"inherits": [
"conda-dev",
"debug"
],
"name": "conda-debug-unix"
},
{
"condition": {
"lhs": "${hostSystemName}",
"rhs": "Windows",
"type": "equals"
},
"description": "A debug build using conda libraries for Windows",
"generator": "NMake Makefiles",
"inherits": [
"conda-dev"
"conda-dev",
"debug"
],
"name": "conda-debug"
"name": "conda-debug-win"
}
]
}