Skip to content

chore: removes dead code #212

chore: removes dead code

chore: removes dead code #212

Workflow file for this run

name: CMake
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
env:
BUILD_TYPE: Release
CPM_SOURCE_CACHE: ${{ github.workspace }}/cpm_modules
CCACHE_BASEDIR: ${{ github.workspace }}
CCACHE_DIR: ${{ github.workspace }}/.ccache
CCACHE_COMPRESS: true
CCACHE_COMPRESSLEVEL: 6
CCACHE_MAXSIZE: 400M
jobs:
build:
strategy:
matrix:
os: ["windows-latest", "ubuntu-latest", "macos-latest"]
qt_version: ["5.15.2", "6.7.2"]
exclude:
- os: "macos-latest"
qt_version: "5.15.2" # only available for x86, macos compiles on arm
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- name: Cache
uses: actions/cache@v3
with:
path: |
${{ github.workspace }}/.ccache
${{ github.workspace }}/cpm_modules
key: ${{ runner.os }}-${{ matrix.os }}-${{ matrix.qt_version }}-${{ hashFiles('**/CMakeLists.txt') }}
restore-keys: |
${{ runner.os }}-${{ matrix.os }}-${{ matrix.qt_version }}
- name: Install Qt
uses: jurplel/install-qt-action@v3
with:
version: ${{matrix.qt_version}}
target: 'desktop'
cache: true
- name: Setup Cpp
uses: aminya/setup-cpp@v1
with:
vcvarsall: ${{ contains(matrix.os, 'windows' )}}
ninja: true
ccache: true
- name: Configure CMake
run: cmake -B ${{github.workspace}}/build
-G Ninja
-DCMAKE_C_COMPILER_LAUNCHER=ccache
-DCMAKE_CXX_COMPILER_LAUNCHER=ccache
-DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}}
-DCMAKE_INSTALL_PREFIX=${{github.workspace}}/install
-DQTDUCKDB_BUILD_EXAMPLES=ON
-DQTDUCKDB_BUILD_TESTS=ON
-DQTDUCKDB_WARNING_AS_ERRORS=ON
-DBUILD_UNITTESTS=OFF
-DBUILD=TESTING=OFF
-DBUILD_SHELL=OFF
-DBUILD_EXTENSIONS="autocomplete"
- name: Build Tests
run: cmake
--build ${{github.workspace}}/build
--config ${{env.BUILD_TYPE}}
-j ${{steps.cpus.outputs.count}}
- name: Test
working-directory: ${{github.workspace}}/build
run: ctest -C ${{env.BUILD_TYPE}} --output-on-failure
# Create package as artifact
- name: Pack
if: matrix.os == 'windows-latest'
shell: cmd
run: |
cmake --build ${{github.workspace}}/build -t install --config ${{env.BUILD_TYPE}}
cmake --build ${{github.workspace}}/build -t bundle --config ${{env.BUILD_TYPE}}
- name: Upload artifacts
if: matrix.os == 'windows-latest'
uses: actions/upload-artifact@v4
with:
name: Windows-QtDuckDBDriver-DLL-qt${{matrix.qt_version}}
path: ${{github.workspace}}/build/QtDuckDBDriver/QtDuckDBDriver-*
compression-level: 0
- name: ccache stats
run: ccache -s
- name: Release
uses: softprops/action-gh-release@v2
if: startsWith(github.ref, 'refs/tags/')