Skip to content

Commit

Permalink
workflows bugfix wiped database
Browse files Browse the repository at this point in the history
  • Loading branch information
silverqx committed May 1, 2024
1 parent 0af2012 commit f4438a2
Show file tree
Hide file tree
Showing 2 changed files with 43 additions and 6 deletions.
19 changes: 19 additions & 0 deletions .github/workflows/vcpkg-linux-drivers.yml
Original file line number Diff line number Diff line change
Expand Up @@ -180,6 +180,25 @@ jobs:
run: |
mkdir --parents '../HelloWorld-builds-cmake'
# The linux-qt6-drivers.yml workflow calls migrate:fresh and it calls the db:wipe internally,
# so we need a freshly migrated MySQL database, I should use fresh database anyway.
# The tom_testdata binary lives in the /usr/local/bin/ and it's from GCC static Release build
# build-TinyDrivers-gcc13-Static-release, I don't need the latest actual version build before.
- name: Prepare MySQL database
run: |
tom_testdata migrate:fresh --database=tinyorm_testdata_tom_mysql --seed --drop-views
env:
DB_MYSQL_CHARSET: ${{ secrets.DB_MYSQL_CHARSET }}
DB_MYSQL_COLLATION: ${{ secrets.DB_MYSQL_COLLATION }}
DB_MYSQL_DATABASE: ${{ secrets.DB_MYSQL_DATABASE }}
DB_MYSQL_HOST: ${{ secrets.DB_MYSQL_HOST_SELF }}
DB_MYSQL_PASSWORD: ${{ secrets.DB_MYSQL_PASSWORD_SELF }}
DB_MYSQL_SSL_CA: ${{ secrets.DB_MYSQL_DATA_SELF_LINUX }}/ca.pem
DB_MYSQL_SSL_CERT: ${{ secrets.DB_MYSQL_DATA_SELF_LINUX }}/client-cert.pem
DB_MYSQL_SSL_KEY: ${{ secrets.DB_MYSQL_DATA_SELF_LINUX }}/client-key.pem
DB_MYSQL_SSL_MODE: ${{ secrets.DB_MYSQL_SSL_MODE }}
DB_MYSQL_USERNAME: ${{ secrets.DB_MYSQL_USERNAME_SELF }}

# VcpkgManifest method (no install or deployment)
# ---

Expand Down
30 changes: 24 additions & 6 deletions .github/workflows/vcpkg-windows-drivers.yml
Original file line number Diff line number Diff line change
Expand Up @@ -225,6 +225,30 @@ jobs:
New-Item -Type Directory $buildTreesPath
}
# The tom_testdata.exe, FetchContent, and Manual methods below need Qt installed and to be
# accessible on the system
- name: ${{ matrix.qt.name }} prepare environment
run: |
"$env:TINY_QT_ROOT\${{ matrix.qt.version }}\msvc2019_64\bin" >> $env:GITHUB_PATH
# The msvc2022-qt6-drivers.yml workflow calls migrate:fresh and it calls the db:wipe internally,
# so we need a freshly migrated MySQL database, I should use fresh database anyway
- name: Prepare MySQL database
working-directory: E:/dotfiles/bin
run: |
.\tom_testdata.exe migrate:fresh --database=tinyorm_testdata_tom_mysql --seed --drop-views
env:
DB_MYSQL_CHARSET: ${{ secrets.DB_MYSQL_CHARSET }}
DB_MYSQL_COLLATION: ${{ secrets.DB_MYSQL_COLLATION }}
DB_MYSQL_DATABASE: ${{ secrets.DB_MYSQL_DATABASE }}
DB_MYSQL_HOST: ${{ secrets.DB_MYSQL_HOST_SELF }}
DB_MYSQL_PASSWORD: ${{ secrets.DB_MYSQL_PASSWORD_SELF }}
DB_MYSQL_SSL_CA: ${{ secrets.DB_MYSQL_DATA_SELF_WINDOWS }}/ca.pem
DB_MYSQL_SSL_CERT: ${{ secrets.DB_MYSQL_DATA_SELF_WINDOWS }}/client-cert.pem
DB_MYSQL_SSL_KEY: ${{ secrets.DB_MYSQL_DATA_SELF_WINDOWS }}/client-key.pem
DB_MYSQL_SSL_MODE: ${{ secrets.DB_MYSQL_SSL_MODE }}
DB_MYSQL_USERNAME: ${{ secrets.DB_MYSQL_USERNAME_SELF }}

# VcpkgManifest method with the VCPKG_APPLOCAL_DEPS (no install or deployment)
# ---

Expand Down Expand Up @@ -278,12 +302,6 @@ jobs:
DB_MYSQL_SSL_MODE: ${{ secrets.DB_MYSQL_SSL_MODE }}
DB_MYSQL_USERNAME: ${{ secrets.DB_MYSQL_USERNAME_SELF }}

# The FetchContent and Manual methods below need Qt installed and to be accessible on the system

- name: ${{ matrix.qt.name }} prepare environment
run: |
"$env:TINY_QT_ROOT\${{ matrix.qt.version }}\msvc2019_64\bin" >> $env:GITHUB_PATH
# Prepare ccache
#
# The TinyORM build in the Manual method and the FetchContent method are using the ccache,
Expand Down

0 comments on commit f4438a2

Please sign in to comment.