Skip to content

Commit

Permalink
ENH: add Windows Cuda CI
Browse files Browse the repository at this point in the history
  • Loading branch information
Simon Rit committed Apr 15, 2022
1 parent 49b3557 commit e7ae96d
Showing 1 changed file with 31 additions and 7 deletions.
38 changes: 31 additions & 7 deletions .github/workflows/build-test-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,18 @@ jobs:
strategy:
max-parallel: 3
matrix:
os: [self-hosted,ubuntu-20.04, windows-2019, macos-10.15]
os: [self-hosted-linux, self-hosted-windows,ubuntu-20.04, windows-2019, macos-10.15]
include:
- os: self-hosted
- os: self-hosted-linux
c-compiler: "gcc"
cxx-compiler: "g++"
itk-git-tag: "801370c025c7d296783481779a41c6d559c992c5"
cmake-build-type: "MinSizeRel"
- os: self-hosted-windows
c-compiler: "cl.exe"
cxx-compiler: "cl.exe"
itk-git-tag: "801370c025c7d296783481779a41c6d559c992c5"
cmake-build-type: "Release"
- os: ubuntu-20.04
c-compiler: "gcc"
cxx-compiler: "g++"
Expand All @@ -35,7 +40,7 @@ jobs:
- uses: actions/checkout@v2

- name: Set up Python 3.8
if: matrix.os != 'self-hosted'
if: matrix.os != 'self-hosted-windows' && matrix.os != 'self-hosted-linux'
uses: actions/setup-python@v2
with:
python-version: 3.8
Expand All @@ -49,7 +54,7 @@ jobs:
uses: lukka/get-cmake@v3.18.3

- name: self-hosted cleanup
if: matrix.os == 'self-hosted'
if: matrix.os == 'self-hosted-windows' || matrix.os == 'self-hosted-linux'
shell: bash
run: |
rm -fr ../ITK
Expand All @@ -64,7 +69,7 @@ jobs:
git checkout ${{ matrix.itk-git-tag }}
- name: Build ITK
if: matrix.os != 'windows-2019'
if: matrix.os != 'windows-2019' && matrix.os != 'self-hosted-windows'
run: |
cd ..
mkdir ITK-build
Expand All @@ -83,7 +88,19 @@ jobs:
ninja
shell: cmd

- name: Build ITK
if: matrix.os == 'self-hosted-windows'
run: |
cd ..
mkdir ITK-build
cd ITK-build
call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Auxiliary\Build\vcvars64.bat"
cmake -DCMAKE_C_COMPILER:FILEPATH="${{ matrix.c-compiler }}" -DBUILD_SHARED_LIBS:BOOL=ON -DCMAKE_CXX_COMPILER="${{ matrix.cxx-compiler }}" -DCMAKE_BUILD_TYPE:STRING=${{ matrix.cmake-build-type }} -DBUILD_TESTING:BOOL=OFF -GNinja ../ITK
ninja
shell: cmd

- name: Fetch CTest driver script
shell: bash
run: |
curl -L https://raw.githubusercontent.com/InsightSoftwareConsortium/ITK/dashboard/itk_common.cmake -O
Expand Down Expand Up @@ -132,7 +149,7 @@ jobs:
cat dashboard.cmake
- name: Build and test
if: matrix.os != 'windows-2019'
if: matrix.os != 'windows-2019' && matrix.os != 'self-hosted-windows'
run: |
ctest --output-on-failure -j 2 -V -S dashboard.cmake
Expand All @@ -143,6 +160,13 @@ jobs:
ctest --output-on-failure -j 2 -V -S dashboard.cmake
shell: cmd

- name: Build and test
if: matrix.os == 'self-hosted-windows'
run: |
call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Auxiliary\Build\vcvars64.bat"
ctest --output-on-failure -j 2 -V -S dashboard.cmake
shell: cmd

build-linux-python-packages:
runs-on: ubuntu-20.04
strategy:
Expand Down Expand Up @@ -181,7 +205,7 @@ jobs:
path: dist

build-linux-cuda-python-packages:
runs-on: self-hosted
runs-on: self-hosted-linux
strategy:
max-parallel: 2
matrix:
Expand Down

0 comments on commit e7ae96d

Please sign in to comment.