-
Notifications
You must be signed in to change notification settings - Fork 939
132 lines (121 loc) · 3.79 KB
/
c-cpp.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
120
121
122
123
124
125
126
127
128
129
130
131
132
name: EASTL Build & Test Pipeline
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
checkout:
name: Checkout EASTL
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
path: EASTL/
- name: Upload checked out code
uses: actions/[email protected]
with:
name: Code
path: EASTL/
build:
needs: checkout
strategy:
fail-fast: false
matrix:
os: [ windows-latest, ubuntu-latest ]
compiler: [ clang, gcc, msvc ]
configuration: [ Debug, Release ]
std_iter_compatibility: [ std_iter_category_disabled, std_iter_category_enabled ]
exclude:
- os: windows-latest
compiler: gcc
- os: windows-latest
compiler: clang
- os: ubuntu-latest
compiler: msvc
include:
- os: windows-latest
compiler: msvc
cxxflags: '/std:c++20 /Zc:char8_t'
- os: ubuntu-latest
compiler: clang
cc: 'clang-14'
cxx: 'clang++-14'
cxxflags: '-std=c++20'
- os: ubuntu-latest
compiler: gcc
cc: 'gcc-12'
cxx: 'g++-12'
cxxflags: '-std=c++2a'
name: Build EASTL
runs-on: ${{ matrix.os }}
steps:
- name: Download a Build Artifact
uses: actions/[email protected]
with:
name: Code
path: Code/
- run: mkdir build
- run: cd build && cmake ../Code -DEASTL_BUILD_BENCHMARK:BOOL=ON -DEASTL_BUILD_TESTS:BOOL=ON -DEASTL_STD_ITERATOR_CATEGORY_ENABLED:BOOL=${{ contains(matrix.std_iter_compatibility, 'enabled') && 'ON' || 'OFF' }}
env:
CXXFLAGS: ${{ matrix.cxxflags }}
CXX: ${{ matrix.cxx }}
CC: ${{ matrix.cc }}
- run: cd build && cmake --build . --config ${{ matrix.configuration }}
- name: Upload binaries
uses: actions/[email protected]
with:
name: Binaries-${{ matrix.os }}-${{ matrix.compiler }}-${{ matrix.configuration }}
path: build/
test:
needs: build
name: Run EASTL tests
strategy:
fail-fast: false
matrix:
os: [ windows-latest, ubuntu-latest ]
compiler: [ clang, msvc, gcc ]
configuration: [ Debug, Release ]
exclude:
- os: windows-latest
compiler: gcc
- os: windows-latest
compiler: clang
- os: ubuntu-latest
compiler: msvc
runs-on: ${{ matrix.os }}
steps:
- name: Download a Build Artifact
uses: actions/[email protected]
with:
name: Binaries-${{ matrix.os }}-${{ matrix.compiler }}-${{ matrix.configuration }}
path: Binaries/
- if: matrix.os == 'ubuntu-latest'
run: chmod 755 ./Binaries/test/EASTLTest
- run: cd Binaries/test && ctest -C ${{ matrix.configuration }} -V
benchmark:
needs: build
name: Run EASTL benchmarks
strategy:
fail-fast: false
matrix:
os: [ windows-latest, ubuntu-latest ]
compiler: [ clang, msvc, gcc ]
configuration: [ Release ]
exclude:
- os: windows-latest
compiler: gcc
- os: windows-latest
compiler: clang
- os: ubuntu-latest
compiler: msvc
runs-on: ${{ matrix.os }}
steps:
- name: Download a Build Artifact
uses: actions/[email protected]
with:
name: Binaries-${{ matrix.os }}-${{ matrix.compiler }}-${{ matrix.configuration }}
path: Binaries/
- if: matrix.os == 'ubuntu-latest'
run: chmod 755 ./Binaries/benchmark/EASTLBenchmarks
- run: cd Binaries/benchmark && ctest -C ${{ matrix.configuration }} -V