minor style adjustments for writing to std::cout + std::cerr #180
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: Test update program | |
on: push | |
jobs: | |
update_structure_v0_5_3: | |
runs-on: ubuntu-22.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 cmake g++-12 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 weather-information-collector-update | |
run: | | |
export CXX=g++-12 | |
export CC=gcc-12 | |
cd "$GITHUB_WORKSPACE" | |
mkdir build | |
cd build | |
cmake ../ -DJSON_BENCHMARK=OFF | |
make -j2 weather-information-collector-update | |
- name: Prepare table structure and connection information | |
run: | | |
sudo apt-get install -y mysql-client | |
cd "$GITHUB_WORKSPACE" | |
mysql -proot -u root -hlocalhost < ci/structure_v0.5.3.sql | |
touch connection.conf | |
echo "database.host=localhost" >> connection.conf | |
echo "database.name=weather_information_collector" >> connection.conf | |
echo "database.user=root" >> connection.conf | |
echo "database.password=root" >> connection.conf | |
- name: Tests | |
run: | | |
cd "$GITHUB_WORKSPACE" | |
./build/src/update/weather-information-collector-update -c connection.conf |