mirror of
https://github.com/getml/sqlgen.git
synced 2026-01-07 01:50:09 -06:00
committed by
GitHub
parent
1424d29c5d
commit
3f8c5556d2
29
.github/workflows/linux-cxx20-conan.yaml
vendored
29
.github/workflows/linux-cxx20-conan.yaml
vendored
@@ -10,16 +10,37 @@ jobs:
|
||||
include:
|
||||
- compiler: llvm
|
||||
compiler-version: 16
|
||||
link: "static"
|
||||
- compiler: llvm
|
||||
compiler-version: 18
|
||||
link: "static"
|
||||
- compiler: gcc
|
||||
compiler-version: 11
|
||||
additional-dep: "g++-11"
|
||||
link: "static"
|
||||
- compiler: gcc
|
||||
compiler-version: 12
|
||||
link: "static"
|
||||
- compiler: gcc
|
||||
compiler-version: 14
|
||||
name: "${{ github.job }} (${{ matrix.compiler }}-${{ matrix.compiler-version }})"
|
||||
link: "static"
|
||||
- compiler: llvm
|
||||
compiler-version: 16
|
||||
link: "shared"
|
||||
- compiler: llvm
|
||||
compiler-version: 18
|
||||
link: "shared"
|
||||
- compiler: gcc
|
||||
compiler-version: 11
|
||||
additional-dep: "g++-11"
|
||||
link: "shared"
|
||||
- compiler: gcc
|
||||
compiler-version: 12
|
||||
link: "shared"
|
||||
- compiler: gcc
|
||||
compiler-version: 14
|
||||
link: "shared"
|
||||
name: "${{ github.job }} (${{ matrix.compiler }}-${{ matrix.compiler-version }}-${{ matrix.link }})"
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
@@ -47,4 +68,8 @@ jobs:
|
||||
sudo ln -s $(which ccache) /usr/local/bin/$CC
|
||||
sudo ln -s $(which ccache) /usr/local/bin/$CXX
|
||||
$CXX --version
|
||||
conan build . --build=missing -s compiler.cppstd=gnu20
|
||||
if [[ "${{ matrix.link }}" == "static" ]]; then
|
||||
conan build . --build=missing -s compiler.cppstd=gnu20
|
||||
else
|
||||
conan build . --build=missing -s compiler.cppstd=gnu20 -o sqlgen/*:with_mysql=True -o */*:shared=True
|
||||
fi
|
||||
|
||||
38
.github/workflows/linux-cxx20-vcpkg.yaml
vendored
38
.github/workflows/linux-cxx20-vcpkg.yaml
vendored
@@ -43,6 +43,22 @@ jobs:
|
||||
- compiler: gcc
|
||||
compiler-version: 14
|
||||
db: sqlite
|
||||
- compiler: llvm
|
||||
compiler-version: 16
|
||||
db: mysql
|
||||
- compiler: llvm
|
||||
compiler-version: 18
|
||||
db: mysql
|
||||
- compiler: gcc
|
||||
compiler-version: 11
|
||||
additional-dep: "g++-11"
|
||||
db: mysql
|
||||
- compiler: gcc
|
||||
compiler-version: 12
|
||||
db: mysql
|
||||
- compiler: gcc
|
||||
compiler-version: 14
|
||||
db: mysql
|
||||
name: "${{ github.job }} (${{ matrix.compiler }}-${{ matrix.compiler-version }}-${{ matrix.db }})"
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
@@ -98,11 +114,33 @@ jobs:
|
||||
$CXX --version
|
||||
cmake -S . -B build -G Ninja -DCMAKE_CXX_STANDARD=20 -DSQLGEN_BUILD_TESTS=ON -DSQLGEN_POSTGRES=OFF
|
||||
cmake --build build
|
||||
- name: Compile
|
||||
if: matrix.db == 'mysql'
|
||||
run: |
|
||||
if [[ "${{ matrix.compiler }}" == "llvm" ]]; then
|
||||
export CC=clang-${{ matrix.compiler-version }}
|
||||
export CXX=clang++-${{ matrix.compiler-version }}
|
||||
elif [[ "${{ matrix.compiler }}" == "gcc" ]]; then
|
||||
export CC=gcc-${{ matrix.compiler-version }}
|
||||
export CXX=g++-${{ matrix.compiler-version }}
|
||||
fi
|
||||
sudo ln -s $(which ccache) /usr/local/bin/$CC
|
||||
sudo ln -s $(which ccache) /usr/local/bin/$CXX
|
||||
$CXX --version
|
||||
cmake -S . -B build -G Ninja -DCMAKE_CXX_STANDARD=20 -DSQLGEN_BUILD_TESTS=ON -DSQLGEN_MYSQL=ON -DSQLGEN_POSTGRES=OFF -DSQLGEN_SQLITE3=OFF -DBUILD_SHARED_LIBS=ON -DVCPKG_TARGET_TRIPLET=x64-linux-dynamic
|
||||
cmake --build build
|
||||
- name: Set up postgres
|
||||
if: matrix.db == 'postgres'
|
||||
run: |
|
||||
sudo systemctl start postgresql.service
|
||||
sudo -u postgres psql -c "ALTER USER postgres PASSWORD 'password';"
|
||||
- name: Set up mysql
|
||||
if: matrix.db == 'mysql'
|
||||
run: |
|
||||
sudo systemctl start mysql
|
||||
sudo mysql -uroot -proot -e "CREATE USER sqlgen IDENTIFIED WITH mysql_native_password BY 'password';"
|
||||
sudo mysql -uroot -proot -e "GRANT ALL PRIVILEGES ON *.* TO 'sqlgen';"
|
||||
sudo mysql -uroot -proot -e "SET GLOBAL time_zone = '+0:00';"
|
||||
- name: Run tests
|
||||
run: |
|
||||
ctest --test-dir build --output-on-failure
|
||||
|
||||
14
.github/workflows/macos-cxx20-conan.yaml
vendored
14
.github/workflows/macos-cxx20-conan.yaml
vendored
@@ -9,8 +9,14 @@ jobs:
|
||||
matrix:
|
||||
include:
|
||||
- os: "macos-latest"
|
||||
link: "static"
|
||||
- os: "macos-13"
|
||||
name: "${{ github.job }} (${{ matrix.os }})"
|
||||
link: "static"
|
||||
- os: "macos-latest"
|
||||
link: "shared"
|
||||
- os: "macos-13"
|
||||
link: "shared"
|
||||
name: "${{ github.job }} (${{ matrix.os }}-${{ matrix.link }})"
|
||||
runs-on: ${{ matrix.os }}
|
||||
steps:
|
||||
- name: Checkout
|
||||
@@ -30,4 +36,8 @@ jobs:
|
||||
CXX: clang++
|
||||
run: |
|
||||
$CXX --version
|
||||
conan build . --build=missing -s compiler.cppstd=gnu20
|
||||
if [[ "${{ matrix.link }}" == "static" ]]; then
|
||||
conan build . --build=missing -s compiler.cppstd=gnu20
|
||||
else
|
||||
conan build . --build=missing -s compiler.cppstd=gnu20 -o sqlgen/*:with_mysql=True -o */*:shared=True
|
||||
fi
|
||||
|
||||
21
.github/workflows/macos-cxx20-vcpkg.yaml
vendored
21
.github/workflows/macos-cxx20-vcpkg.yaml
vendored
@@ -15,10 +15,14 @@ jobs:
|
||||
db: postgres
|
||||
- os: "macos-latest"
|
||||
db: sqlite
|
||||
- os: "macos-latest"
|
||||
db: mysql
|
||||
- os: "macos-13"
|
||||
db: postgres
|
||||
- os: "macos-13"
|
||||
db: sqlite
|
||||
- os: "macos-13"
|
||||
db: mysql
|
||||
name: "${{ github.job }} (${{ matrix.os }}-${{ matrix.db }})"
|
||||
runs-on: ${{ matrix.os }}
|
||||
steps:
|
||||
@@ -70,6 +74,23 @@ jobs:
|
||||
$CXX --version
|
||||
cmake -S . -B build -G Ninja -DCMAKE_CXX_STANDARD=20 -DSQLGEN_BUILD_TESTS=ON -DSQLGEN_POSTGRES=OFF
|
||||
cmake --build build -j 4
|
||||
- name: Compile
|
||||
if: matrix.db == 'mysql'
|
||||
env:
|
||||
CC: clang
|
||||
CXX: clang++
|
||||
run: |
|
||||
if [[ "${{ matrix.os == 'macos-latest' }}" == "true" ]]; then
|
||||
export VCPKG_FORCE_SYSTEM_BINARIES=arm
|
||||
export CMAKE_GENERATOR=Ninja
|
||||
fi
|
||||
$CXX --version
|
||||
if [[ "${{ matrix.os == 'macos-latest' }}" == "true" ]]; then
|
||||
cmake -S . -B build -G Ninja -DCMAKE_CXX_STANDARD=20 -DSQLGEN_BUILD_TESTS=ON -DSQLGEN_MYSQL=ON -DSQLGEN_POSTGRES=OFF -DSQLGEN_SQLITE3=OFF -DBUILD_SHARED_LIBS=ON -DVCPKG_TARGET_TRIPLET=arm64-osx-dynamic -DSQLGEN_BUILD_DRY_TESTS_ONLY=ON
|
||||
else
|
||||
cmake -S . -B build -G Ninja -DCMAKE_CXX_STANDARD=20 -DSQLGEN_BUILD_TESTS=ON -DSQLGEN_MYSQL=ON -DSQLGEN_POSTGRES=OFF -DSQLGEN_SQLITE3=OFF -DBUILD_SHARED_LIBS=ON -DVCPKG_TARGET_TRIPLET=x64-osx-dynamic -DSQLGEN_BUILD_DRY_TESTS_ONLY=ON
|
||||
fi
|
||||
cmake --build build -j 4
|
||||
- name: Run tests
|
||||
run: |
|
||||
ctest --test-dir build --output-on-failure
|
||||
|
||||
6
.github/workflows/windows-cxx20-vcpkg.yaml
vendored
6
.github/workflows/windows-cxx20-vcpkg.yaml
vendored
@@ -13,6 +13,7 @@ jobs:
|
||||
include:
|
||||
- db: postgres
|
||||
- db: sqlite
|
||||
- db: mysql
|
||||
name: "(windows-${{ matrix.db }})"
|
||||
runs-on: windows-latest
|
||||
steps:
|
||||
@@ -39,6 +40,11 @@ jobs:
|
||||
run: |
|
||||
cmake -S . -B build -G Ninja -DCMAKE_CXX_STANDARD=20 -DSQLGEN_BUILD_TESTS=ON -DSQLGEN_POSTGRES=OFF
|
||||
cmake --build build --config Release -j4
|
||||
- name: Compile
|
||||
if: matrix.db == 'mysql'
|
||||
run: |
|
||||
cmake -S . -B build -G Ninja -DCMAKE_CXX_STANDARD=20 -DSQLGEN_BUILD_TESTS=ON -DSQLGEN_MYSQL=ON -DSQLGEN_POSTGRES=OFF -DSQLGEN_SQLITE3=OFF -DSQLGEN_BUILD_DRY_TESTS_ONLY=ON
|
||||
cmake --build build --config Release -j4
|
||||
- name: Run tests
|
||||
run: |
|
||||
ctest --test-dir build --output-on-failure
|
||||
|
||||
Reference in New Issue
Block a user