Skip to content

MSYS2 UCRT64 GCC/Clang #214

MSYS2 UCRT64 GCC/Clang

MSYS2 UCRT64 GCC/Clang #214

Workflow file for this run

# MySQL
# ---
# Both use the default unencrypted database connections because maria client can't connect
# to the MySQL >= 8.0.34 or >=8.1, there is some problem in TLS 1.2 and 1.3 connection, it can't
# select correct cipher. I will revert this back in the future when it will be fixed.
# PostgreSQL
# ---
# It uses the default unencrypted database connections.
name: MSYS2 UCRT64 GCC/Clang
on:
workflow_dispatch:
push:
branches:
- main
- gh-actions
jobs:
build:
name: cmake build / ctest
runs-on: windows-2022
env:
# Settings (constant variables)
# First value is a compressed data size
# GCC: ~ 180 * 3 + 100 ; clang: ~ 140 * 3 + 100
TINY_CCACHE_MAX_SIZE_GCC: 640M
TINY_CCACHE_MAX_SIZE_CLANG: 520M
# Clang and vcpkg uses $env:NUMBER_OF_PROCESSORS
TINY_PARALLEL_GCC: 2
TINY_MYSQL_SERVICE: MySQL
TINY_POSTGRES_SERVICE: postgresql-x64-14
# Used by the cygpath.exe
MSYS2_ROOT: C:\msys64
strategy:
matrix:
compiler:
- key: clang
pacboy: [ 'clang:u', 'gcc:u' ]
command: clang++.exe
# GitHub Free Plan is not enough for this (no money πŸ’΅)
# Qt6 with g++ is causing exhausted memory even with -j1
# - key: gcc
# pacboy: [ 'gcc:u' ]
# command: g++.exe
# Leaving here this matrix for future versions
qt:
- key: qt6
pacboy: qt6-base:u
steps:
- uses: actions/checkout@v4
- name: TinyORM prepare environment
run: |
$runnerWorkPath = Resolve-Path -Path "$env:RUNNER_WORKSPACE/.."
"TinyRunnerWorkPath=$runnerWorkPath" >> $env:GITHUB_ENV
$sqlitePath = Join-Path -Path $runnerWorkPath -ChildPath "SQLite/$env:DB_SQLITE_DATABASE"
"TinySQLitePath=$sqlitePath" >> $env:GITHUB_ENV
$mysqlExePath = (Get-Command -Name mysql.exe).Source
$mysqlInstallationPath = Split-Path -Parent -Path (Split-Path -Parent -Path $mysqlExePath)
"TinyMySQLInstallationPath=$mysqlInstallationPath" >> $env:GITHUB_ENV
$mysqlDataPath = Join-Path -Path $runnerWorkPath -ChildPath 'mysql/data'
"TinyMySQLDataPath=$mysqlDataPath" >> $env:GITHUB_ENV
$ccacheMaxSize = '${{ matrix.compiler.key }}' -ceq 'gcc' ? $env:TINY_CCACHE_MAX_SIZE_GCC :
$env:TINY_CCACHE_MAX_SIZE_CLANG
"TinyCcacheMaxSize=$ccacheMaxSize" >> $env:GITHUB_ENV
$parallel = '${{ matrix.compiler.key }}' -ceq 'gcc' ? $env:TINY_PARALLEL_GCC :
$env:NUMBER_OF_PROCESSORS
"TinyParallel=$parallel" >> $env:GITHUB_ENV
"TinyParallelVcpkg=$env:NUMBER_OF_PROCESSORS" >> $env:GITHUB_ENV
$tinyormBuildName = '${{ matrix.compiler.key }}-${{ matrix.qt.key }}-cmake-debug'
"TinyORMBuildName=$tinyormBuildName" >> $env:GITHUB_ENV
$tinyormBuildTree = Join-Path -Path $env:RUNNER_WORKSPACE TinyORM-builds-cmake `
"build-$tinyormBuildName"
"TinyORMBuildTree=$tinyormBuildTree" >> $env:GITHUB_ENV
$tinyormBuildTreeCyg = & "$env:MSYS2_ROOT\usr\bin\cygpath.exe" --unix $tinyormBuildTree
"TinyORMBuildTreeCyg=$tinyormBuildTreeCyg" >> $env:GITHUB_ENV
env:
DB_SQLITE_DATABASE: ${{ secrets.DB_SQLITE_DATABASE }}
- name: PostgreSQL service start
run: |
Set-Service -Name $env:TINY_POSTGRES_SERVICE -StartupType Manual
Start-Service $env:TINY_POSTGRES_SERVICE
- name: PostgreSQL PGBIN add on the $env:Path
run: |
$env:PGBIN >> $env:GITHUB_PATH
- name: PostgreSQL service check status
run: |
$pgsqlService = Get-Service $env:TINY_POSTGRES_SERVICE
Write-Output $pgsqlService
$pgsqlService.status.ToString() -ceq 'Running' `
-or $(throw "$env:TINY_POSTGRES_SERVICE service is not running") > $null
pg_isready.exe
- name: PostgreSQL create TinyORM user
run: >-
"create user `"$env:DB_PGSQL_USERNAME`"
with createdb password '$env:DB_PGSQL_PASSWORD';" | psql.exe
env:
DB_PGSQL_PASSWORD: ${{ secrets.DB_PGSQL_PASSWORD }}
DB_PGSQL_USERNAME: ${{ secrets.DB_PGSQL_USERNAME }}
- name: PostgreSQL create TinyORM database
run: |
createdb.exe --owner=$env:DB_PGSQL_USERNAME $env:DB_PGSQL_DATABASE
env:
DB_PGSQL_DATABASE: ${{ secrets.DB_PGSQL_DATABASE }}
DB_PGSQL_USERNAME: ${{ secrets.DB_PGSQL_USERNAME }}
- name: MySQL create data folder
run: |
New-Item -Type Directory $env:TinyMySQLDataPath
- name: MySQL initialize my.ini configuration
working-directory: .github/resources/windows
run: >-
(Get-Content -Path ./my_8.template.ini) -creplace
'\{MYSQL_DATADIR\}', $env:TinyMySQLDataPath -creplace
'\{MYSQL_HOST\}', $env:DB_MYSQL_HOST |
Set-Content -Path "$env:TinyMySQLInstallationPath/my.ini"
env:
DB_MYSQL_HOST: ${{ secrets.DB_MYSQL_HOST }}
# The ConvertFrom-SecureString must be called on the [SecureString] instance to be able to
# store it in the environment or output variable
- name: MySQL initialize data directory
id: initializes-initialize-mysql-data-folder
run: >-
$regEx = '(?:\[MY-010454\].*temporary.*: )(?<password>.+)'
$securedPassword = (mysqld.exe --initialize --console 2>&1 |
Select-String -Pattern $regEx).Matches[0].Groups['password'].Value |
ConvertTo-SecureString -AsPlainText | ConvertFrom-SecureString
"SecuredPassword=$securedPassword" >> $env:GITHUB_OUTPUT
- name: MySQL service install/start
run: |
mysqld.exe --install $env:TINY_MYSQL_SERVICE
Start-Service $env:TINY_MYSQL_SERVICE
# The secured_password is store in the string form so we have to re-create the [SecureString]
# from this encrypted string and then it can be decrypted as normally would 😬
- name: MySQL change ${{ secrets.DB_MYSQL_ROOT_USERNAME }} password
run: >-
"alter user '$env:DB_MYSQL_ROOT_USERNAME'@'localhost'
identified with caching_sha2_password by '$env:DB_MYSQL_ROOT_PASSWORD';" |
mysql.exe --user=$env:DB_MYSQL_ROOT_USERNAME
--password=$($env:secured_password | ConvertTo-SecureString |
ConvertFrom-SecureString -AsPlainText)
--connect-expired-password
env:
DB_MYSQL_ROOT_PASSWORD: ${{ secrets.DB_MYSQL_ROOT_PASSWORD }}
DB_MYSQL_ROOT_USERNAME: ${{ secrets.DB_MYSQL_ROOT_USERNAME }}
secured_password: ${{ steps.initializes-initialize-mysql-data-folder.outputs.SecuredPassword }}
- name: MySQL time zone POSIX tables initialize download
id: downloads-initialize-mysql-timezone-tables
run: |
$filename = Split-Path -Path $env:URL_MYSQL_TIMEZONE_TABLES -Leaf
"Filename=$filename" >> $env:GITHUB_OUTPUT
$filepath = Join-Path -Path $env:RUNNER_TEMP -ChildPath $filename
"Filepath=$filepath" >> $env:GITHUB_OUTPUT
$basename = Split-Path -Path $filename -LeafBase
$extractedFolder = Join-Path -Path $env:RUNNER_TEMP -ChildPath $basename
"ExtractedFolder=$extractedFolder" >> $env:GITHUB_OUTPUT
"Hash=$basename" >> $env:GITHUB_OUTPUT
env:
URL_MYSQL_TIMEZONE_TABLES: ${{ secrets.URL_MYSQL_TIMEZONE_TABLES }}
- name: MySQL time zone POSIX tables restore cache (download)
uses: actions/cache@v4
id: downloads-cache-mysql-timezone-tables
with:
path: ${{ env.extracted_folder }}
key: ${{ runner.os }}-databases-${{ env.cache_name }}-${{ env.cache_hash }}
env:
cache_hash: ${{ steps.downloads-initialize-mysql-timezone-tables.outputs.Hash }}
cache_name: mysql-timezone-tables
extracted_folder: ${{ steps.downloads-initialize-mysql-timezone-tables.outputs.ExtractedFolder }}
- name: MySQL time zone POSIX tables download
if: steps.downloads-cache-mysql-timezone-tables.outputs.cache-hit != 'true'
run: >-
Invoke-WebRequest -Uri $env:URL_MYSQL_TIMEZONE_TABLES -HttpVersion 2.0
-MaximumRetryCount 3 -RetryIntervalSec 10 |
Select-Object -ExpandProperty Content |
Set-Content -Path $env:archive_filepath -AsByteStream
7z.exe x -y -o"$env:RUNNER_TEMP" "$env:archive_filepath"
env:
archive_filepath: ${{ steps.downloads-initialize-mysql-timezone-tables.outputs.Filepath }}
URL_MYSQL_TIMEZONE_TABLES: ${{ secrets.URL_MYSQL_TIMEZONE_TABLES }}
- name: MySQL populate time zone tables πŸ‘Œ
run: >-
$filepath = Join-Path -Path $env:extracted_folder -ChildPath 'timezone_posix.sql'
# source path can't be quoted, it works correctly even with spaces
"source $filepath" |
mysql.exe --user=$env:DB_MYSQL_ROOT_USERNAME --password=$env:DB_MYSQL_ROOT_PASSWORD mysql
Restart-Service $env:TINY_MYSQL_SERVICE
env:
extracted_folder: ${{ steps.downloads-initialize-mysql-timezone-tables.outputs.ExtractedFolder }}
DB_MYSQL_ROOT_PASSWORD: ${{ secrets.DB_MYSQL_ROOT_PASSWORD }}
DB_MYSQL_ROOT_USERNAME: ${{ secrets.DB_MYSQL_ROOT_USERNAME }}
- name: MySQL service check status
run: |
Write-Output '::group::Get-Service'
$mysqlService = Get-Service $env:TINY_MYSQL_SERVICE
Write-Output $mysqlService
Write-Output '::endgroup::'
Write-Output '::group::Service running check'
$mysqlService.status.ToString() -ceq 'Running' -or `
$(throw "$env:TINY_MYSQL_SERVICE service is not running") > $null
Write-Output '::endgroup::'
Write-Output '::group::Ping'
mysqladmin.exe --user=$env:DB_MYSQL_ROOT_USERNAME `
--password=$env:DB_MYSQL_ROOT_PASSWORD ping
Write-Output '::endgroup::'
env:
DB_MYSQL_ROOT_PASSWORD: ${{ secrets.DB_MYSQL_ROOT_PASSWORD }}
DB_MYSQL_ROOT_USERNAME: ${{ secrets.DB_MYSQL_ROOT_USERNAME }}
- name: MySQL create TinyORM database
run: >-
"create database if not exists ``$env:DB_MYSQL_DATABASE``
default character set $env:DB_MYSQL_CHARSET
default collate $env:DB_MYSQL_COLLATION;" |
mysql.exe --user=$env:DB_MYSQL_ROOT_USERNAME --password=$env:DB_MYSQL_ROOT_PASSWORD
env:
DB_MYSQL_CHARSET: ${{ secrets.DB_MYSQL_CHARSET }}
DB_MYSQL_COLLATION: ${{ secrets.DB_MYSQL_COLLATION }}
DB_MYSQL_DATABASE: ${{ secrets.DB_MYSQL_DATABASE }}
DB_MYSQL_ROOT_PASSWORD: ${{ secrets.DB_MYSQL_ROOT_PASSWORD }}
DB_MYSQL_ROOT_USERNAME: ${{ secrets.DB_MYSQL_ROOT_USERNAME }}
- name: MySQL create TinyORM user
run: >-
"create user '$env:DB_MYSQL_USERNAME'@'%'
identified with caching_sha2_password by '$env:DB_MYSQL_PASSWORD';
grant all privileges on ``tinyorm\_%``.* to '$env:DB_MYSQL_USERNAME'@'%';
grant select on ``mysql``.``time_zone_name`` to '$env:DB_MYSQL_USERNAME'@'%';
flush privileges;" |
mysql.exe --user=$env:DB_MYSQL_ROOT_USERNAME --password=$env:DB_MYSQL_ROOT_PASSWORD
env:
DB_MYSQL_PASSWORD: ${{ secrets.DB_MYSQL_PASSWORD }}
DB_MYSQL_ROOT_PASSWORD: ${{ secrets.DB_MYSQL_ROOT_PASSWORD }}
DB_MYSQL_ROOT_USERNAME: ${{ secrets.DB_MYSQL_ROOT_USERNAME }}
DB_MYSQL_USERNAME: ${{ secrets.DB_MYSQL_USERNAME }}
- name: SQLite create TinyORM database
run: |
New-Item -Type Directory (Split-Path -Path $env:TinySQLitePath -Parent)
New-Item -Type File -Path $env:TinySQLitePath
# Windows github hosted runners don't contain sqlite3 executable
- name: Print MySQL and PostgreSQL database versions
run: |
Write-Output '::group::MySQL version'
mysql.exe --version
Write-Output '::endgroup::'
Write-Output '::group::PostgreSQL version'
postgres.exe --version
Write-Output '::endgroup::'
- name: >-
MSYS2 UCRT64 setup (${{ join(matrix.compiler.pacboy, ', ') }}, lld:u,
${{ matrix.qt.pacboy }}, ccache:u)
uses: msys2/setup-msys2@v2
with:
msystem: ucrt64
path-type: minimal
update: true
install: |
git
pacboy: >-
${{ join(matrix.compiler.pacboy, ' ') }} lld:u
cmake:u ninja:u ccache:u
${{ matrix.qt.pacboy }}
libmariadbclient:u postgresql:u
- name: Ccache initialize
id: ccache-initialize-cache
shell: msys2 {0}
run: |
# No need to install it as it's installed above using the pacboy
cachePath=$(ccache.exe --get-config cache_dir)
echo "CachePath=$cachePath" >> $GITHUB_OUTPUT
echo "ImageOS=$ImageOS" >> $GITHUB_OUTPUT
- name: Ccache restore cache πŸ•Ί
uses: actions/cache@v4
with:
# This path is ok also for MSYS2 shells
path: ${{ env.cache_path }}
key: ${{ runner.os }}-${{ env.image_os }}-ccache-${{ env.cache_name }}-${{ github.run_id }}
restore-keys: |
${{ runner.os }}-${{ env.image_os }}-ccache-${{ env.cache_name }}-
env:
cache_name: msys2-ucrt64-${{ matrix.compiler.key }}-${{ matrix.qt.key }}
cache_path: ${{ steps.ccache-initialize-cache.outputs.CachePath }}
image_os: ${{ steps.ccache-initialize-cache.outputs.ImageOS }}
- name: Ccache prepare configuration πŸ₯³
shell: msys2 {0}
run: |
ccache.exe --set-config max_size=$TinyCcacheMaxSize
ccache.exe --set-config sloppiness=pch_defines,time_macros
ccache.exe --set-config depend_mode=true
ccache.exe --set-config inode_cache=true
- name: Ccache print version and configuration
shell: msys2 {0}
run: |
echo '::group::Print version'
ccache.exe --version
echo '::endgroup::'
echo '::group::Print ccache config'
ccache.exe --show-config
echo '::endgroup::'
- name: vcpkg prepare environment
shell: msys2 {0}
run: |
echo "VCPKG_ROOT=$VCPKG_INSTALLATION_ROOT" >> $GITHUB_ENV
echo 'VCPKG_DEFAULT_TRIPLET=x64-mingw-dynamic' >> $GITHUB_ENV
echo 'VCPKG_DEFAULT_HOST_TRIPLET=x64-mingw-dynamic' >> $GITHUB_ENV
echo "VCPKG_MAX_CONCURRENCY=$TinyParallelVcpkg" >> $GITHUB_ENV
- name: Compiler print version (${{ matrix.compiler.command }})
shell: msys2 {0}
run: |
${{ matrix.compiler.command }} --version
# On MSYS2 is the lld linker used for both g++ and also clang++
- name: Linker print version (ld.lld.exe)
shell: msys2 {0}
run: |
ld.lld.exe --version
- name: Linker print version (ld.exe - unused!)
shell: msys2 {0}
run: |
ld.exe --version
- name: CMake print version
shell: msys2 {0}
run: |
cmake.exe --version
- name: Ninja print version
shell: msys2 {0}
run: |
ninja.exe --version
- name: vcpkg print version
shell: msys2 {0}
run: |
"$VCPKG_INSTALLATION_ROOT/vcpkg.exe" --version
- name: Qt print version
shell: msys2 {0}
run: |
qmake6.exe -query QT_VERSION
- name: Ccache clear statistics
shell: msys2 {0}
run: |
ccache.exe --zero-stats
- name: TinyORM cmake configure (${{ env.TinyORMBuildName }})
shell: msys2 {0}
run: >-
cmake.exe --log-level=DEBUG --log-context
-S .
-B "$TinyORMBuildTreeCyg"
-G Ninja
-D CMAKE_CXX_COMPILER_LAUNCHER:FILEPATH=ccache.exe
-D CMAKE_CXX_COMPILER:FILEPATH=${{ matrix.compiler.command }}
-D CMAKE_TOOLCHAIN_FILE:FILEPATH="$VCPKG_INSTALLATION_ROOT/scripts/buildsystems/vcpkg.cmake"
-D CMAKE_DISABLE_PRECOMPILE_HEADERS:BOOL=ON
-D CMAKE_EXPORT_PACKAGE_REGISTRY:BOOL=OFF
-D CMAKE_BUILD_TYPE:STRING=Debug
-D CMAKE_CXX_SCAN_FOR_MODULES:BOOL=OFF
-D CMAKE_LINKER_TYPE:STRING=LLD
-D VCPKG_APPLOCAL_DEPS:BOOL=OFF
-D VERBOSE_CONFIGURE:BOOL=ON
-D BUILD_TREE_DEPLOY:BOOL=OFF
-D STRICT_MODE:BOOL=OFF
-D MYSQL_PING:BOOL=ON
-D BUILD_TESTS:BOOL=ON
-D ORM:BOOL=ON
-D TOM:BOOL=ON
-D TOM_EXAMPLE:BOOL=ON
-D BUILD_DRIVERS:BOOL=OFF
- name: TinyORM cmake build ✨ (${{ env.TinyORMBuildName }})
shell: msys2 {0}
working-directory: ${{ env.TinyORMBuildTree }}
run: |
cmake.exe --build . --target all --parallel $TinyParallel
- name: Ccache print statistics
shell: msys2 {0}
run: |
ccache.exe --show-stats --verbose
- name: TinyOrm print linker version
working-directory: ${{ env.TinyORMBuildTree }}
run: |
objdump.exe --all-headers ./TinyOrm0d.dll | grep --ignore-case 'LinkerVersion'
- name: Create and Seed tables for unit tests πŸŽ‰
shell: msys2 {0}
working-directory: ${{ env.TinyORMBuildTree }}/tests/testdata_tom
run: >-
export PATH="$TinyORMBuildTreeCyg"${PATH:+:}"$PATH"
./tom_testdata.exe migrate
--database=tinyorm_testdata_tom_mysql,tinyorm_testdata_tom_postgres,tinyorm_testdata_tom_sqlite
--seed --no-ansi
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 }}
DB_MYSQL_PASSWORD: ${{ secrets.DB_MYSQL_PASSWORD }}
DB_MYSQL_USERNAME: ${{ secrets.DB_MYSQL_USERNAME }}
DB_PGSQL_CHARSET: ${{ secrets.DB_PGSQL_CHARSET }}
DB_PGSQL_DATABASE: ${{ secrets.DB_PGSQL_DATABASE }}
DB_PGSQL_HOST: ${{ secrets.DB_PGSQL_HOST }}
DB_PGSQL_PASSWORD: ${{ secrets.DB_PGSQL_PASSWORD }}
DB_PGSQL_SEARCHPATH: ${{ secrets.DB_PGSQL_SEARCHPATH }}
DB_PGSQL_USERNAME: ${{ secrets.DB_PGSQL_USERNAME }}
DB_SQLITE_DATABASE: ${{ env.TinySQLitePath }}
TOM_TESTDATA_ENV: ${{ vars.TOM_TESTDATA_ENV }}
# $NUMBER_OF_PROCESSORS / 2 : rounds down; also don't use nproc here!
- name: TinyORM execute ctest πŸ”₯
shell: msys2 {0}
working-directory: ${{ env.TinyORMBuildTree }}
run: |
ctest.exe --output-on-failure --parallel $(($TinyParallel + $NUMBER_OF_PROCESSORS / 2))
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 }}
DB_MYSQL_PASSWORD: ${{ secrets.DB_MYSQL_PASSWORD }}
DB_MYSQL_USERNAME: ${{ secrets.DB_MYSQL_USERNAME }}
DB_PGSQL_CHARSET: ${{ secrets.DB_PGSQL_CHARSET }}
DB_PGSQL_DATABASE: ${{ secrets.DB_PGSQL_DATABASE }}
DB_PGSQL_HOST: ${{ secrets.DB_PGSQL_HOST }}
DB_PGSQL_PASSWORD: ${{ secrets.DB_PGSQL_PASSWORD }}
DB_PGSQL_SEARCHPATH: ${{ secrets.DB_PGSQL_SEARCHPATH }}
DB_PGSQL_USERNAME: ${{ secrets.DB_PGSQL_USERNAME }}
DB_SQLITE_DATABASE: ${{ env.TinySQLitePath }}
TOM_TESTS_ENV: ${{ vars.TOM_TESTS_ENV }}
- name: Tom example test some commands (MySQL) πŸš€
shell: msys2 {0}
working-directory: ${{ env.TinyORMBuildTree }}/examples/tom
run: |
export PATH="$TinyORMBuildTreeCyg"${PATH:+:}"$PATH"
./tom.exe migrate:fresh --database=tinyorm_tom_mysql --no-ansi
./tom.exe migrate:uninstall --reset --database=tinyorm_tom_mysql --no-ansi
./tom.exe migrate:install --database=tinyorm_tom_mysql --no-ansi
./tom.exe migrate --database=tinyorm_tom_mysql --seed --no-ansi
./tom.exe migrate:status --database=tinyorm_tom_mysql --no-ansi
./tom.exe migrate:refresh --database=tinyorm_tom_mysql --seed --no-ansi
./tom.exe migrate:reset --database=tinyorm_tom_mysql --no-ansi
./tom.exe migrate:uninstall --database=tinyorm_tom_mysql --no-ansi
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 }}
DB_MYSQL_PASSWORD: ${{ secrets.DB_MYSQL_PASSWORD }}
DB_MYSQL_USERNAME: ${{ secrets.DB_MYSQL_USERNAME }}
TOM_EXAMPLE_ENV: ${{ vars.TOM_EXAMPLE_ENV }}
- name: Tom example test some commands (PostgreSQL) πŸ™Œ
shell: msys2 {0}
working-directory: ${{ env.TinyORMBuildTree }}/examples/tom
run: |
export PATH="$TinyORMBuildTreeCyg"${PATH:+:}"$PATH"
./tom.exe migrate:fresh --database=tinyorm_tom_postgres --no-ansi
./tom.exe migrate:uninstall --reset --database=tinyorm_tom_postgres --no-ansi
./tom.exe migrate:install --database=tinyorm_tom_postgres --no-ansi
./tom.exe migrate --database=tinyorm_tom_postgres --seed --no-ansi
./tom.exe migrate:status --database=tinyorm_tom_postgres --no-ansi
./tom.exe migrate:refresh --database=tinyorm_tom_postgres --seed --no-ansi
./tom.exe migrate:reset --database=tinyorm_tom_postgres --no-ansi
./tom.exe migrate:uninstall --database=tinyorm_tom_postgres --no-ansi
env:
DB_PGSQL_CHARSET: ${{ secrets.DB_PGSQL_CHARSET }}
DB_PGSQL_DATABASE: ${{ secrets.DB_PGSQL_DATABASE }}
DB_PGSQL_HOST: ${{ secrets.DB_PGSQL_HOST }}
DB_PGSQL_PASSWORD: ${{ secrets.DB_PGSQL_PASSWORD }}
DB_PGSQL_SEARCHPATH: ${{ secrets.DB_PGSQL_SEARCHPATH }}
DB_PGSQL_USERNAME: ${{ secrets.DB_PGSQL_USERNAME }}
TOM_EXAMPLE_ENV: ${{ vars.TOM_EXAMPLE_ENV }}
- name: Tom example test some commands (SQLite) 🏁
shell: msys2 {0}
working-directory: ${{ env.TinyORMBuildTree }}/examples/tom
run: |
export PATH="$TinyORMBuildTreeCyg"${PATH:+:}"$PATH"
./tom.exe migrate:fresh --database=tinyorm_tom_sqlite --no-ansi
./tom.exe migrate:uninstall --reset --database=tinyorm_tom_sqlite --no-ansi
./tom.exe migrate:install --database=tinyorm_tom_sqlite --no-ansi
./tom.exe migrate --database=tinyorm_tom_sqlite --seed --no-ansi
./tom.exe migrate:status --database=tinyorm_tom_sqlite --no-ansi
./tom.exe migrate:refresh --database=tinyorm_tom_sqlite --seed --no-ansi
./tom.exe migrate:reset --database=tinyorm_tom_sqlite --no-ansi
./tom.exe migrate:uninstall --database=tinyorm_tom_sqlite --no-ansi
env:
DB_SQLITE_DATABASE: ${{ env.TinySQLitePath }}
TOM_EXAMPLE_ENV: ${{ vars.TOM_EXAMPLE_ENV }}