ci: do not run tests with MariaDB 11.1 anymore, it reached EOL #164
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |