forked from dvidelabs/flatcc
-
Notifications
You must be signed in to change notification settings - Fork 1
105 lines (93 loc) · 2.62 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
name: CI
on: [push, pull_request]
env:
CTEST_OUTPUT_ON_FAILURE: 1
permissions:
contents: read
jobs:
ubuntu-ninja-clang:
name: Ubuntu (ninja, clang)
runs-on: ubuntu-22.04
steps:
- name: Prepare
run: |
sudo apt update
sudo apt install ninja-build
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
- name: Build and run tests
env:
CC: clang
CXX: clang++
run: |
scripts/test.sh
ubuntu-make-gcc:
name: Ubuntu (make, gcc)
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
- name: Build and run tests
env:
CC: gcc
CXX: g++
run: |
scripts/initbuild.sh make
scripts/test.sh
macos:
name: macOS
runs-on: macos-14
steps:
- name: Prepare
run: |
brew install ninja
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
- name: Build and run tests
run: |
scripts/test.sh
windows:
name: Windows
runs-on: windows-2022
steps:
- uses: microsoft/setup-msbuild@6fb02220983dee41ce7ae257b6f4d8f9bf5ed4ce # v2.0.0
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
- name: Build and run tests
run: |
cmake .
msbuild FlatCC.sln /m /property:Configuration=Release
ctest -VV
meson-build:
name: Meson (${{matrix.os}})
runs-on: ${{matrix.os}}
continue-on-error: true
strategy:
matrix:
os: [ ubuntu-22.04, macos-12, windows-2022 ]
steps:
- uses: actions/checkout@v3
- uses: microsoft/[email protected]
if: runner.os == 'windows'
- uses: actions/setup-python@v2
if: runner.os == 'windows'
- name: Prepare MSVC
uses: bus1/cabuild/action/msdevshell@v1
with:
architecture: x64
if: runner.os == 'windows'
- name: Install dependencies (windows)
if: runner.os == 'windows'
run: |
pip install meson
- name: Install dependencies (ubuntu)
if: runner.os == 'linux'
run: |
sudo apt update -y
sudo apt install ninja-build meson
- name: Install dependencies (macos)
if: runner.os == 'macos'
run: |
brew install meson ninja
- name: Build and run tests
run: |
meson setup build --buildtype release
meson compile -C build
meson test -C build --verbose
meson test -C build --benchmark --verbose