-
-
Notifications
You must be signed in to change notification settings - Fork 59
85 lines (69 loc) · 2.34 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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
name: Build
on: [push, pull_request]
jobs:
build:
name: ${{ matrix.config.name }} (${{ matrix.build_type }})
runs-on: ${{ matrix.config.os }}
strategy:
fail-fast: false
matrix:
build_type: ['Debug', 'Release']
config:
- { name: 'macOS Clang', os: macos-latest }
- { name: 'Ubuntu GCC', os: ubuntu-latest }
- { name: 'Windows MSVC', os: windows-latest }
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Install Dependencies (macOS)
if: matrix.config.os == 'macos-latest'
run: |
brew install ninja xerces-c
- name: Install Dependencies (Ubuntu)
if: matrix.config.os == 'ubuntu-latest'
run: |
sudo apt-get update
sudo apt-get install -y libxerces-c-dev ninja-build
- name: Install miniconda (Windows)
if: matrix.config.os == 'windows-latest'
uses: conda-incubator/setup-miniconda@v2
with:
auto-update-conda: true
channels: conda-forge
miniconda-version: 'latest'
- name: Install Dependencies (Windows)
if: matrix.config.os == 'windows-latest'
run: |
conda install -y ninja xerces-c
- name: Configure MSVC console (Windows)
if: matrix.config.os == 'windows-latest'
uses: ilammy/msvc-dev-cmd@v1
- name: Set environment for MSVC (Windows)
if: matrix.config.os == 'windows-latest'
run: |
# Set these env vars so cmake picks the correct compiler
echo "CXX=cl.exe" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
echo "CC=cl.exe" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
- name: Configure (Debug)
if: matrix.build_type == 'Debug'
run: >
mkdir libE57Format-build
cmake
-B libE57Format-build
-G "Ninja"
-DCMAKE_BUILD_TYPE=${{ matrix.build_type }}
-DE57_MAX_DEBUG=1
.
- name: Configure (Release)
if: matrix.build_type == 'Release'
run: >
mkdir libE57Format-build
cmake
-B libE57Format-build
-G "Ninja"
-DCMAKE_BUILD_TYPE=${{ matrix.build_type }}
-DE57_DEBUG=0
.
- name: Build
run: |
cmake --build libE57Format-build