Skip to content

ENH: Switch from CircleCI to GitHub Action for building CTK #5

ENH: Switch from CircleCI to GitHub Action for building CTK

ENH: Switch from CircleCI to GitHub Action for building CTK #5

Workflow file for this run

name: CI (Build)
on:
# Triggers the workflow on push or pull request events
push:
branches:
- "master"
pull_request:
branches:
- "*"
# Allows running this workflow manually from the Actions tab
workflow_dispatch:
permissions:
contents: read
jobs:
build:
runs-on: ubuntu-latest
strategy:
fail-fast: true
matrix:
qt-version: ["5.15.2", "5.12.8"]
steps:
- uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v4.1.2
- name: Setup CMake
uses: jwlawson/actions-setup-cmake@959f1116cf9f1ae42fff8ec1a4aaae6d4a0e348b # v2.0.1
with:
cmake-version: "3.16.3"
- name: Display CMake version
run: |
cmake --version
- name: Install Qt
uses: jurplel/install-qt-action@v3
with:
version: "${{ matrix.qt-version }}"
arch: "gcc_64"
- name: Install DCMTK
run: sudo apt-get install -y dcmtk
- name: Install VTK
run: sudo apt-get install -y libvtk9-dev ibvtk9-qt-dev
- name: Configure CTK
run: |
cmake \
-DCTK_QT_VERSION:STRING=5 \
-DCTK_ENABLE_Widgets:BOOL=ON \
-DCTK_LIB_Visualization/VTK/Widgets:BOOL=ON \
-DCTK_LIB_Visualization/VTK/Widgets_USE_TRANSFER_FUNCTION_CHARTS:BOOL=ON \
-DCTK_APP_ctkDICOM:BOOL=ON \
-DCTK_LIB_DICOM/Widgets:BOOL=ON \
-B CTK-build \
-S .
- name: Display Qt5_DIR
run: |
cat CTK-build/CMakeCache.txt | grep ^Qt5_DIR
- name: Build CTK
run: |
cmake \
--build CTK-build -- -j4