CI #1693
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: CI | |
| on: | |
| workflow_dispatch: | |
| pull_request: | |
| push: | |
| branches: | |
| - main | |
| schedule: | |
| - cron: '0 2 * * *' # run at 2 AM UTC | |
| jobs: | |
| unix: | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: [ubuntu-latest, macos-latest] | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: Install micromamba | |
| uses: mamba-org/setup-micromamba@v3 | |
| with: | |
| environment-file: environment-dev.yml | |
| - name: CMake configure | |
| shell: bash -l {0} | |
| run: | | |
| cmake -B build/ -G Ninja \ | |
| -D CMAKE_BUILD_TYPE=Release \ | |
| -D CMAKE_PREFIX_PATH="${CONDA_PREFIX}" \ | |
| -D CMAKE_INSTALL_PREFIX="${CONDA_PREFIX}" \ | |
| -D CMAKE_INSTALL_LIBDIR=lib \ | |
| -D XEUS_BUILD_TESTS=ON | |
| - name: Build | |
| shell: bash -l {0} | |
| run: cmake --build build/ --parallel | |
| - name: Install | |
| shell: bash -l {0} | |
| run: cmake --install build/ | |
| - name: Test | |
| shell: micromamba-shell {0} | |
| run: pytest test/ --reruns 5 | |
| win: | |
| runs-on: windows-2022 | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: Install micromamba | |
| uses: mamba-org/setup-micromamba@v3 | |
| with: | |
| environment-file: environment-dev.yml | |
| init-shell: cmd.exe | |
| environment-name: xeus-r | |
| - name: Micromamba shell hook | |
| shell: powershell | |
| run: | | |
| micromamba shell hook -s cmd.exe --root-prefix C:\Users\runneradmin\micromamba-root | |
| - name: CMake configure | |
| run: | | |
| micromamba run -n xeus-r ` | |
| cmake -B build/ -G "Ninja" ` | |
| -D CMAKE_BUILD_TYPE=Release ` | |
| -D CMAKE_PREFIX_PATH="%CONDA_PREFIX%\Library" ` | |
| -D CMAKE_INSTALL_PREFIX="%CONDA_PREFIX%\Library" ` | |
| -D XEUS_BUILD_TESTS=ON | |
| - name: Build | |
| run: micromamba run -n xeus-r cmake --build build/ --parallel | |
| - name: Install | |
| run: micromamba run -n xeus-r cmake --install build/ | |
| - name: Register kernelspec | |
| run: | | |
| xcopy ` | |
| C:\Users\runneradmin\micromamba\envs\xeus-r\Library\share\jupyter\kernels\xr ` | |
| C:\Users\runneradmin\micromamba\envs\xeus-r\share\jupyter\kernels\xr\ ` | |
| /E /I /Y | |
| - name: Test | |
| run: micromamba run -n xeus-r pytest -sv test/test_xr_kernel.py |