-
-
Notifications
You must be signed in to change notification settings - Fork 85
119 lines (95 loc) · 3.41 KB
/
ci.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
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
name: infoware CI
on:
push:
pull_request:
jobs:
linux:
name: ${{matrix.os}} amd64 (${{matrix.cpp-version}})
runs-on: ${{matrix.os}}
strategy:
fail-fast: false
matrix:
cpp-version: [g++, clang++]
os: ["ubuntu-20.04", "ubuntu-22.04"]
steps:
- name: Checkout infoware
uses: actions/checkout@v2
with:
path: infoware
- name: Install apt packages
run: sudo apt update && sudo apt install -y cmake ninja-build ocl-icd-opencl-dev
- name: Generate CMake
run: mkdir infoware/build && cd infoware/build && cmake -DCMAKE_BUILD_TYPE=Release -DINFOWARE_USE_OPENCL=ON -DINFOWARE_EXAMPLES=ON -DINFOWARE_TESTS=ON -G Ninja ..
env:
CXX: ${{matrix.cpp-version}}
- name: Build Project
run: cmake --build infoware/build
- name: Run Tests
run: ctest --test-dir infoware/build
mingw:
name: Linux MinGW (${{matrix.arch.pkg}})
runs-on: ubuntu-22.04
strategy:
fail-fast: false
matrix:
arch:
- { pkg: i686, paths: i686 }
- { pkg: x86-64, paths: x86_64 }
steps:
- name: Checkout infoware
uses: actions/checkout@v2
with:
path: infoware
- name: Install apt packages
run: sudo apt update && sudo apt install -y cmake ninja-build g++-mingw-w64-${{matrix.arch.pkg}}
- name: Generate CMake
run: mkdir infoware/build && cd infoware/build && cmake -DCMAKE_BUILD_TYPE=Release -DMINGW_ARCH=${{matrix.arch.paths}} -DCMAKE_TOOLCHAIN_FILE=../.github/workflows/mingw.cmake -G Ninja ..
- name: Build Project
run: cmake --build infoware/build
macos:
name: macOS ${{matrix.os}} ${{matrix.arch}}
runs-on: ${{matrix.os}}
strategy:
fail-fast: false
matrix:
os: ["macos-12", "macos-11", "macos-10.15"]
arch: ["X64", "ARM64"]
steps:
- name: Checkout infoware
uses: actions/checkout@v2
with:
path: infoware
- name: Install homebrew packages
run: brew install cmake ninja openssl
- name: Generate CMake
run: mkdir infoware/build && cd infoware/build && cmake -DCMAKE_BUILD_TYPE=Release -DINFOWARE_USE_OPENCL=ON -DINFOWARE_EXAMPLES=ON -DINFOWARE_TESTS=ON -G Ninja ..
- name: Build Project
run: cmake --build infoware/build
- name: Run Tests
run: ctest --test-dir infoware/build
windows: # Windows amd64 and i386 build matrix
strategy:
fail-fast: false # Don't cancel other matrix jobs if one fails
matrix:
cfg:
- { name: i386, arch: x86, chocoargs: "--x86"}
- { name: amd64, arch: x64, chocoargs: ""}
name: "Windows MSVC ${{matrix.cfg.name}}"
runs-on: windows-2019
steps:
- name: Checkout infoware
uses: actions/checkout@v2
with:
path: infoware
- name: Configure MSBuild
uses: ilammy/msvc-dev-cmd@v1
with:
arch: ${{ matrix.cfg.arch }}
- name: Install chocolatey packages (${{ matrix.cfg.name }})
run: choco install ninja -y ${{ matrix.cfg.chocargs }}
- name: Generate CMake
run: mkdir infoware/build && cd infoware/build && cmake -G Ninja -DCMAKE_BUILD_TYPE=Release -DINFOWARE_EXAMPLES=ON -DINFOWARE_TESTS=ON ..
- name: Build Project
run: cmake --build infoware/build
- name: Run Tests
run: ctest --test-dir infoware/build