Skip to content

Commit

Permalink
Add windows CI
Browse files Browse the repository at this point in the history
  • Loading branch information
rapgenic committed Mar 5, 2023
1 parent d815f0b commit ec76e7a
Show file tree
Hide file tree
Showing 2 changed files with 80 additions and 12 deletions.
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"
}
]
}

0 comments on commit ec76e7a

Please sign in to comment.