fix: concurrent mysql catalog loading access (1.4) #232
Workflow file for this run
This file contains hidden or 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: MySQL Tests | |
| on: [push, pull_request,repository_dispatch, merge_group] | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }}-${{ github.head_ref || '' }}-${{ github.base_ref || '' }}-${{ github.ref != 'refs/heads/main' || github.sha }} | |
| cancel-in-progress: true | |
| defaults: | |
| run: | |
| shell: bash | |
| jobs: | |
| format-check: | |
| name: Format Check | |
| runs-on: ubuntu-22.04 | |
| env: | |
| CC: gcc-10 | |
| CXX: g++-10 | |
| GEN: ninja | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| submodules: 'true' | |
| - name: Install | |
| shell: bash | |
| run: | | |
| sudo apt-get update -y -q -o=Dpkg::Use-Pty=0 | |
| sudo apt-get install -y -q -o=Dpkg::Use-Pty=0 \ | |
| ninja-build \ | |
| clang-format-11 | |
| sudo pip3 install \ | |
| cmake-format \ | |
| 'black==24.*' \ | |
| cxxheaderparser \ | |
| pcpp \ | |
| clang_format==11.0.1 | |
| - name: List Installed Packages | |
| shell: bash | |
| run: pip3 freeze | |
| - name: Format Check | |
| shell: bash | |
| run: | | |
| clang-format --version | |
| clang-format --dump-config | |
| black --version | |
| make format-check | |
| macos: | |
| name: MacOS (aarch64) | |
| runs-on: macos-latest | |
| needs: format-check | |
| env: | |
| GEN: ninja | |
| CC: 'ccache clang' | |
| CXX: 'ccache clang++' | |
| CCACHE_DIR: ${{ github.workspace }}/ccache | |
| OSX_BUILD_ARCH: arm64 | |
| VCPKG_TARGET_TRIPLET: arm64-osx-release | |
| VCPKG_HOST_TRIPLET: arm64-osx-release | |
| VCPKG_TOOLCHAIN_PATH: ${{ github.workspace }}/vcpkg/scripts/buildsystems/vcpkg.cmake | |
| ORACLE_MYSQL_SERVER: 1 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| submodules: 'true' | |
| - name: Install | |
| run: | | |
| brew install -q \ | |
| autoconf \ | |
| autoconf-archive \ | |
| automake \ | |
| ccache \ | |
| mysql | |
| brew services start mysql | |
| - name: Cache Key | |
| id: cache_key | |
| working-directory: ./duckdb | |
| run: | | |
| DUCKDB_VERSION=$(git rev-parse --short HEAD) | |
| KEY="${{ runner.os }}-${{ runner.arch }}-$DUCKDB_VERSION" | |
| echo "value=${KEY}" >> "${GITHUB_OUTPUT}" | |
| - name: Restore Cache | |
| uses: actions/cache/restore@v4 | |
| with: | |
| path: ${{ github.workspace }}/ccache | |
| key: ${{ steps.cache_key.outputs.value }} | |
| - uses: actions/setup-python@v2 | |
| with: | |
| python-version: '3.14' | |
| - name: Setup vcpkg | |
| uses: lukka/[email protected] | |
| with: | |
| vcpkgGitCommitId: ce613c41372b23b1f51333815feb3edd87ef8a8b | |
| - name: Setup MySQL | |
| run: | | |
| mysql -u root < test/test_data.sql | |
| mysql -u root -e "SELECT 42" | |
| - name: Build extension | |
| shell: bash | |
| run: | | |
| make release | |
| - name: Test Extension | |
| shell: bash | |
| env: | |
| MYSQL_TEST_DATABASE_AVAILABLE: 1 | |
| run: | | |
| make test | |
| - name: Log Errors | |
| if: failure() | |
| shell: bash | |
| run: | | |
| cat /Users/runner/work/duckdb-mysql/duckdb-mysql/vcpkg/buildtrees/openssl/*.log | |
| cat /Users/runner/work/duckdb-mysql/duckdb-mysql/vcpkg/buildtrees/libmysql/*.log | |
| cat /Users/runner/work/duckdb-mysql/duckdb-mysql/build/release/*.log | |
| - name: Save Cache | |
| uses: actions/cache/save@v4 | |
| with: | |
| path: ${{ github.workspace }}/ccache | |
| key: ${{ steps.cache_key.outputs.value }} | |
| linux: | |
| name: Linux (amd64) | |
| runs-on: ubuntu-latest | |
| needs: format-check | |
| env: | |
| GEN: ninja | |
| CC: 'ccache gcc' | |
| CXX: 'ccache g++' | |
| CCACHE_DIR: ${{ github.workspace }}/ccache | |
| VCPKG_TARGET_TRIPLET: x64-linux-release | |
| VCPKG_HOST_TRIPLET: x64-linux-release | |
| VCPKG_TOOLCHAIN_PATH: ${{ github.workspace }}/vcpkg/scripts/buildsystems/vcpkg.cmake | |
| MYSQL_PWD: root | |
| MYSQL_TEST_DATABASE_AVAILABLE: 1 | |
| MARIADB_SERVER: 1 | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| submodules: 'true' | |
| - name: Install required ubuntu packages | |
| run: | | |
| sudo apt-get update -y -q -o=Dpkg::Use-Pty=0 | |
| sudo apt-get install -y -q -o=Dpkg::Use-Pty=0 \ | |
| build-essential \ | |
| ccache \ | |
| cmake \ | |
| mariadb-server \ | |
| ninja-build \ | |
| pkg-config \ | |
| zip | |
| - name: Cache Key | |
| id: cache_key | |
| working-directory: ./duckdb | |
| run: | | |
| DUCKDB_VERSION=$(git rev-parse --short HEAD) | |
| KEY="${{ runner.os }}-${{ runner.arch }}-$DUCKDB_VERSION" | |
| echo "value=${KEY}" >> "${GITHUB_OUTPUT}" | |
| - name: Restore Cache | |
| uses: actions/cache/restore@v4 | |
| with: | |
| path: ${{ github.workspace }}/ccache | |
| key: ${{ steps.cache_key.outputs.value }} | |
| - name: Setup MariaDB | |
| run: | | |
| sudo mariadb -e "select @@version" | |
| sudo mariadb -e "ALTER USER root@localhost IDENTIFIED BY 'root'" | |
| echo "[client]" >> ~/.my.cnf | |
| echo "default-character-set = utf8mb4" >> ~/.my.cnf | |
| mysql -u root < test/test_data.sql | |
| mysql -u root -e "SELECT 42" | |
| - name: Setup vcpkg | |
| uses: lukka/[email protected] | |
| with: | |
| vcpkgGitCommitId: ce613c41372b23b1f51333815feb3edd87ef8a8b | |
| - name: Build extension | |
| run: | | |
| make release | |
| - name: Test extension | |
| run: | | |
| make test | |
| - name: Save Cache | |
| uses: actions/cache/save@v4 | |
| with: | |
| path: ${{ github.workspace }}/ccache | |
| key: ${{ steps.cache_key.outputs.value }} |