Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
zhangyangyu committed Jun 17, 2024
1 parent d0c5a04 commit e478a5f
Showing 1 changed file with 26 additions and 1 deletion.
27 changes: 26 additions & 1 deletion .github/workflows/compatibility-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -232,6 +232,14 @@ jobs:
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
- name: Install mysql in macos
if: ${{ matrix.os == 'macos-14' }}
run: |
# https://github.com/Homebrew/homebrew-core/issues/130258
brew install mysql-client
export PKG_CONFIG_PATH="/opt/homebrew/opt/mysql-client/lib/pkgconfig"
export MYSQLCLIENT_LDFLAGS=$(pkg-config --libs mysqlclient)
export MYSQLCLIENT_CFLAGS=$(pkg-config --cflags mysqlclient)
- name: Run test on ${{ matrix.os }}
run: |
pip3 install mysqlclient --break-system-packages
Expand Down Expand Up @@ -301,6 +309,14 @@ jobs:
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
- name: Install mysql in macos
if: ${{ matrix.os == 'macos-14' }}
run: |
# https://github.com/Homebrew/homebrew-core/issues/130258
brew install mysql-client
export PKG_CONFIG_PATH="/opt/homebrew/opt/mysql-client/lib/pkgconfig"
export MYSQLCLIENT_LDFLAGS=$(pkg-config --libs mysqlclient)
export MYSQLCLIENT_CFLAGS=$(pkg-config --cflags mysqlclient)
- name: Run test on ${{ matrix.os }}
run: |
pip3 install mysqlclient --break-system-packages
Expand Down Expand Up @@ -411,7 +427,16 @@ jobs:
with:
ruby-version: '3.0' # Not needed with a .ruby-version file
bundler-cache: true # runs 'bundle install' and caches installed gems automatically
- name: Run test on ${{ matrix.os }}
- name: Install mysql on macos
if: ${{ matrix.os == 'macos-14' }}
run: |
brew install mysql
cd example_code/ruby
# https://github.com/Homebrew/homebrew-core/issues/130258
gem install mysql2 -- --with-mysql-dir=$(brew --prefix mysql)
ruby ConnectTest.rb ${{needs.setup.outputs.TIDB_CLOUD_HOST}} ${{needs.setup.outputs.TIDB_CLOUD_USER}} ${{ secrets.TIDB_CLOUD_PASSWORD }}
- name: Run test on ubuntu
if: ${{ matrix.os == 'ubuntu-24.04' }}
run: |
cd example_code/ruby
gem install mysql2
Expand Down

0 comments on commit e478a5f

Please sign in to comment.