-
Notifications
You must be signed in to change notification settings - Fork 143
64 lines (61 loc) · 1.58 KB
/
cmake.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
name: CMake
on:
push:
branches:
- master
- 'release-*'
pull_request:
# run on all pr
jobs:
build:
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macOS-latest]
shared: ["ON", "OFF"]
runs-on: ${{ matrix.os }}
name: ${{ matrix.os }} - shared=${{ matrix.shared }}
steps:
- uses: actions/checkout@v2
- name: Build
run: |
mkdir build
cmake -S . -B build -DBUILD_SHARED_LIBS=${{ matrix.shared }} -DUTF8PROC_ENABLE_TESTING=ON
cmake --build build
- name: Run Test
run: ctest --test-dir build -V
- name: Upload shared lib
if: matrix.shared == 'ON'
uses: actions/upload-artifact@v2
with:
name: ${{ matrix.os }}
path: |
build/libutf8proc.*
build/Debug/utf8proc.*
mingw:
strategy:
matrix:
os: [windows-latest]
shared: ["ON", "OFF"]
runs-on: ${{ matrix.os }}
name: mingw64 - shared=${{ matrix.shared }}
defaults:
run:
shell: msys2 {0}
steps:
- uses: actions/checkout@v2
- uses: msys2/setup-msys2@v2
with:
install: gcc make mingw-w64-x86_64-cmake
- name: Build
run: |
mkdir build
cmake -S . -B build -DBUILD_SHARED_LIBS=${{ matrix.shared }} -DUTF8PROC_ENABLE_TESTING=ON -G'MSYS Makefiles'
cmake --build build
- name: Run Test
run: ctest --test-dir build -V
- name: Upload shared lib
if: matrix.shared == 'ON'
uses: actions/upload-artifact@v2
with:
name: windows-mingw64
path: build/libutf8proc.*