Merge pull request #154 from zussel/feature/backend-database-version #242
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: matador@linux | |
on: | |
push: | |
branches: | |
- develop | |
- master | |
paths-ignore: | |
- .github/workflows/windows.yml | |
- .github/workflows/release.yml | |
- appveyor.yml | |
pull_request: | |
branches: | |
- develop | |
paths-ignore: | |
- .github/workflows/windows.yml | |
- .github/workflows/release.yml | |
- appveyor.yml | |
env: | |
# Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.) | |
BUILD_TYPE: Debug | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
compiler-version: [12] | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Create MySQL database | |
run: | | |
sudo systemctl start mysql.service | |
mysql --version | |
mysql -u root -proot -e "CREATE DATABASE matador_test;" | |
# mysql -u root -p root -e "GRANT ALL PRIVILEGES ON matador_test.* TO 'root'@'%';"; | |
- name: CMake Version | |
run: cmake --version | |
- name: Configure CMake | |
env: | |
CC: gcc-${{ matrix.compiler-version }} | |
CXX: g++-${{ matrix.compiler-version }} | |
run: > | |
cmake -B ${{github.workspace}}/build | |
-DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} | |
-DMATADOR_ODBC_TEST=false | |
-DMATADOR_ODBC=false | |
-DMATADOR_POSTGRESQL_TEST=true | |
-DMATADOR_MYSQL_TEST=true | |
-DMATADOR_SQLITE3_TEST=true | |
- name: Build | |
run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}} --target matador test_matador | |
- name: Copy Matador Libs | |
working-directory: ${{github.workspace}}/build | |
run: | | |
ls -la lib/libmatador-*.* | |
cp lib/libmatador-*.* bin/ | |
pwd | |
ls -la bin/ | |
- uses: harmon758/postgresql-action@v1 | |
with: | |
postgresql version: '14' | |
postgresql db: matador_test | |
postgresql user: test | |
postgresql password: test123 | |
- name: Test | |
working-directory: ${{github.workspace}}/build | |
run: | | |
ls -la bin/ | |
ctest --verbose -C ${{env.BUILD_TYPE}} |