Skip to content

Commit

Permalink
Add Windows CI
Browse files Browse the repository at this point in the history
  • Loading branch information
lamyj committed Apr 14, 2024
1 parent 57b1040 commit 83f8d97
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 4 deletions.
7 changes: 5 additions & 2 deletions .ci/build/build.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,14 @@
subprocess.check_call(
[
"cmake",
"-G", "Ninja",
"-DPython_EXECUTABLE={}".format(sys.executable),
"-DCMAKE_INSTALL_PREFIX={}".format(install_dir),
*([os.environ["CMAKE_OPTIONS"]] if "CMAKE_OPTIONS" in os.environ else []),
workspace],
cwd=build_dir)

subprocess.check_call(["ninja", "install"], cwd=build_dir)
subprocess.check_call(
[
"cmake", "--build", ".", "--target", "install", "--config", "Release",
"--parallel"],
cwd=build_dir)
3 changes: 2 additions & 1 deletion .ci/build/conda.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
import os
import subprocess
import sys

conda = sys.argv[1] if len(sys.argv) >= 2 else "conda"
conda = sys.argv[1] if len(sys.argv) >= 2 else os.environ.get("MAMBA_EXE", "conda")

subprocess.check_call([
conda, "install", "--yes", "-c", "conda-forge",
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ jobs:
- { os: "ubuntu-latest", container: "ubuntu:jammy", packaging: "apt", cmake_options: "-DCMAKE_CXX_STANDARD=17", python: "python3" }
- { os: "ubuntu-latest", packaging: "conda", cmake_options: "-DCMAKE_CXX_STANDARD=17", python: "python" }
- { os: "macos-latest", packaging: "conda", cmake_options: "-DCMAKE_CXX_STANDARD=17", python: "python" }
- { os: "windows-latest", packaging: "conda", cmake_options: "-DCMAKE_CXX_STANDARD=17", python: "python" }
env:
WORKSPACE: "${{ github.workspace }}"
CMAKE_OPTIONS: "${{ matrix.cmake_options }}"
Expand All @@ -35,7 +36,7 @@ jobs:
uses: mamba-org/setup-micromamba@v1
with:
init-shell: bash powershell
environment-name: dicomifier
environment-name: odil
create-args: python=3.11
if: ${{ contains(matrix.packaging, 'conda') }}

Expand Down

0 comments on commit 83f8d97

Please sign in to comment.