File: action.yml

package info (click to toggle)
elastix 5.3.1-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 45,644 kB
  • sloc: cpp: 85,720; lisp: 4,118; python: 1,045; sh: 200; xml: 182; makefile: 33
file content (52 lines) | stat: -rw-r--r-- 1,682 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
name: Build elastix
description: "Build elastix cross-platform"

inputs:
  c-compiler:
    required: true
  cxx-compiler:
    required: true
  cmake-build-type:
    required: true
  vcvars:
    required: false
    default: ""

runs:
  using: "composite"
  steps:
    - name: Build elastix (non-Windows)
      if: runner.os != 'Windows'
      shell: bash
      run: |
        mkdir elastix-build
        cd elastix-build
        cmake -DCMAKE_C_COMPILER="${{ inputs.c-compiler }}" \
              -DCMAKE_CXX_COMPILER="${{ inputs.cxx-compiler }}" \
              -DCMAKE_BUILD_TYPE="${{ inputs.cmake-build-type }}" \
              -DITK_DIR=../ITK-build \
              -DTorch_DIR=../libtorch/libtorch/share/cmake/Torch \
              -DUSE_ALL_COMPONENTS=ON \
              -DBUILD_TESTING:BOOL=ON \
              -DELASTIX_USE_GTEST=ON \
              -GNinja ../elastix-source
        ninja

    - name: Build elastix (Windows)
      if: runner.os == 'Windows'
      shell: cmd
      run: |
        call "${{ inputs.vcvars }}"
        mkdir elastix-build
        cd elastix-build
        cmake -DCMAKE_C_COMPILER="${{ inputs.c-compiler }}" ^
              -DCMAKE_CXX_COMPILER="${{ inputs.cxx-compiler }}" ^
              -DCMAKE_BUILD_TYPE="${{ inputs.cmake-build-type }}" ^
              -DITK_DIR=../ITK-build ^
              -DCMAKE_CUDA_FLAGS="-allow-unsupported-compiler -Xcompiler \"/D_ALLOW_COMPILER_AND_STL_VERSION_MISMATCH\"" ^
              -DTorch_DIR=../libtorch/libtorch/share/cmake/Torch ^
              -DUSE_ALL_COMPONENTS=ON ^
              -DBUILD_TESTING:BOOL=ON ^
              -DELASTIX_USE_GTEST=ON ^
              -GNinja ../elastix-source
        ninja