-
Notifications
You must be signed in to change notification settings - Fork 21
54 lines (48 loc) · 2.36 KB
/
build.yml
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
53
54
name: Build
on: push
jobs:
build:
runs-on: ${{ matrix.os }}
container: ${{ matrix.container }}
name: ${{ matrix.container || matrix.os }}/${{ matrix.packaging }}
strategy:
fail-fast: false
matrix:
include:
- { os: "ubuntu-latest", container: "debian:bullseye", packaging: "apt", python: "python3" }
- { os: "ubuntu-latest", container: "debian:bookworm", packaging: "apt", cmake_options: "-DCMAKE_CXX_STANDARD=17", python: "python3" }
- { os: "ubuntu-latest", container: "ubuntu:jammy", packaging: "apt", cmake_options: "-DCMAKE_CXX_STANDARD=17", python: "python3" }
- { os: "ubuntu-latest", container: "ubuntu:noble", packaging: "apt", cmake_options: "-DCMAKE_CXX_STANDARD=17", python: "python3" }
- { os: "ubuntu-latest", packaging: "conda", cmake_options: "-DCMAKE_CXX_STANDARD=17", python: "python" }
# NOTE: macos-latest may run macOS on M1 CPUs for which DCMTK is not compiled.
- { os: "macos-13", 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 }}"
defaults:
run:
shell: ${{ contains(matrix.os, 'windows') && 'pwsh' || 'bash -l {0}' }}
steps:
- name: Provision (Debian, Ubuntu)
# Install Python and Git. macOS workers already have this, however for
# Linux we are running in minimal containers.
run: |
apt-get update
DEBIAN_FRONTEND=noninteractive apt-get install -y git python3
if: ${{ contains(matrix.packaging, 'apt') }}
- name: Provision (Micromamba)
uses: mamba-org/setup-micromamba@v1
with:
init-shell: bash powershell
environment-name: odil
create-args: python=3.11
if: ${{ contains(matrix.packaging, 'conda') }}
- name: Checkout latest revision
uses: actions/checkout@v4
- name: Set-up (${{ matrix.packaging }})
run: ${{ matrix.python }} .ci/build/${{ matrix.packaging }}.py
- name: Build
run: ${{ matrix.python }} ./.ci/build/build.py
- name: Run tests
run: ${{ matrix.python }} ./.ci/build/post_build.py