-
Notifications
You must be signed in to change notification settings - Fork 0
55 lines (53 loc) · 1.84 KB
/
clang.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
name: Clang
on: push
jobs:
clang:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
include:
- version: 12
os: ubuntu-22.04
- version: 13
os: ubuntu-22.04
- version: 14
os: ubuntu-22.04
- version: 15
os: ubuntu-24.04
- version: 16
os: ubuntu-24.04
steps:
# Checks-out the repository under $GITHUB_WORKSPACE.
- uses: actions/checkout@v4
- name: Install Debian packages
run: |
sudo apt-get update
sudo apt-get install -y catch2 clang-${{ matrix.version }} cmake git libcurl4-gnutls-dev libmariadb-dev pkg-config
- name: Start MySQL database
run: sudo systemctl start mysql.service
- name: Show MySQL version information
run: |
mysql -uroot -proot -e "SHOW VARIABLES LIKE '%version%';"
- name: Prepare MySQL database
run: |
mysql -uroot -proot -e "CREATE DATABASE IF NOT EXISTS weather_information_collector"
mysql -uroot -proot -e "GRANT ALL ON weather_information_collector.* TO 'root'@'localhost';"
mysql -uroot --password=root -e "SHOW DATABASES;"
- name: Adjust MySQL 8.0 authentication
run: |
mysql -uroot -proot -e "ALTER USER root@localhost IDENTIFIED WITH mysql_native_password BY ''; ALTER USER root@localhost IDENTIFIED BY 'root'; FLUSH PRIVILEGES;"
mysql -uroot --password=root -e "SHOW DATABASES;"
- name: Build
run: |
export CXX=clang++-${{ matrix.version }}
export CC=clang-${{ matrix.version }}
cd "$GITHUB_WORKSPACE"
mkdir build
cd build
cmake ../ -DJSON_BENCHMARK=ON
make -j2
- name: Tests
run: |
cd "$GITHUB_WORKSPACE"/build
ctest -V