-
Notifications
You must be signed in to change notification settings - Fork 65
158 lines (148 loc) · 4.43 KB
/
main.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
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
# modified version of:
# https://gist.github.com/NickNaso/0d478f1481686d5bcc868cac06620a60
name: CI
on: [push, pull_request, release]
jobs:
build:
name: ${{ matrix.config.name }}
runs-on: ${{ matrix.config.os }}
strategy:
fail-fast: false
matrix:
config:
- {
name: "ubuntu_latest_gcc_cxx11",
os: ubuntu-latest,
build_type: "Release",
cc: "gcc",
cxx: "g++",
cxxstd: "11"
}
- {
name: "ubuntu_latest_gcc_cxx11_coverage",
os: ubuntu-latest,
build_type: "Coverage",
cc: "gcc",
cxx: "g++",
cxxstd: "11"
}
- {
name: "ubuntu_latest_gcc9_cxx14",
os: ubuntu-latest,
build_type: "Release",
cc: "gcc-9",
cxx: "g++-9",
cxxstd: "14"
}
- {
name: "ubuntu_latest_gcc10_cxx14",
os: ubuntu-latest,
build_type: "Release",
cc: "gcc-10",
cxx: "g++-10",
cxxstd: "14"
}
- {
name: "ubuntu_latest_gcc11_cxx17",
os: ubuntu-latest,
build_type: "Release",
cc: "gcc-11",
cxx: "g++-11",
cxxstd: "17"
}
- {
name: "ubuntu_latest_gcc11_cxx20",
os: ubuntu-latest,
build_type: "Release",
cc: "gcc-11",
cxx: "g++-11",
cxxstd: "20"
}
- {
name: "ubuntu_latest_clang11_cxx11",
os: ubuntu-latest,
build_type: "Release",
cc: "clang-11",
cxx: "clang++-11",
cxxstd: "11"
}
- {
name: "ubuntu_latest_clang11_cxx14",
os: ubuntu-latest,
build_type: "Release",
cc: "clang-11",
cxx: "clang++-11",
cxxstd: "14"
}
- {
name: "ubuntu_latest_clang12_cxx14",
os: ubuntu-latest,
build_type: "Release",
cc: "clang-12",
cxx: "clang++-12",
cxxstd: "14"
}
- {
name: "ubuntu22_clang13_cxx17",
os: ubuntu-22.04,
build_type: "Release",
cc: "clang-13",
cxx: "clang++-13",
cxxstd: "17"
}
- {
name: "ubuntu22_clang14_cxx20",
os: ubuntu-22.04,
build_type: "Release",
cc: "clang-14",
cxx: "clang++-14",
cxxstd: "20"
}
- {
name: "macos_latest_clang_cxx11",
os: macos-latest,
build_type: "Release",
cc: "clang",
cxx: "clang++",
cxxstd: "11"
}
steps:
- uses: actions/checkout@v2
- name: Print env
run: |
echo github.event.action: ${{ github.event.action }}
echo github.event_name: ${{ github.event_name }}
- name: Install dependencies on ubuntu
if: startsWith(matrix.config.name, 'ubuntu')
run: |
sudo apt-get update
sudo apt-get install ${{ matrix.config.cc }} ${{ matrix.config.cxx }}
${{ matrix.config.cc }} --version
echo "CXXT=${{ matrix.config.cxxstd }}" >> $GITHUB_ENV
- name: Tests
shell: bash
working-directory: tests
run: |
export CC=${{ matrix.config.cc }}
export CXX=${{ matrix.config.cxx }}
export GCEM_CXX_STD="-std=c++${{ matrix.config.cxxstd }}"
echo "Testing CXXT: ${CXXT}"
echo "Testing env.CXXT: ${{ env.CXXT }}"
make
./run_tests
- name: Coverage
if: startsWith(matrix.config.build_type, 'Coverage')
shell: bash
working-directory: tests
run: |
export SHOULD_RUN_COVERAGE="y"
./cov_check
cd ..
curl https://keybase.io/codecovsecurity/pgp_keys.asc | gpg --no-default-keyring --keyring trustedkeys.gpg --import
curl -Os https://uploader.codecov.io/latest/linux/codecov
curl -Os https://uploader.codecov.io/latest/linux/codecov.SHA256SUM
curl -Os https://uploader.codecov.io/latest/linux/codecov.SHA256SUM.sig
gpgv codecov.SHA256SUM.sig codecov.SHA256SUM
shasum -a 256 -c codecov.SHA256SUM
chmod +x codecov
./codecov