Skip to content

Commit

Permalink
adjust compatibility workflow config
Browse files Browse the repository at this point in the history
  • Loading branch information
zhangyangyu committed Jun 17, 2024
1 parent 01ad709 commit faae201
Showing 1 changed file with 44 additions and 42 deletions.
86 changes: 44 additions & 42 deletions .github/workflows/compatibility-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ on:

jobs:
setup:
runs-on: ubuntu-22.04
runs-on: ubuntu-24.04
timeout-minutes: 10
steps:
- name: Checkout
Expand Down Expand Up @@ -70,11 +70,11 @@ jobs:
needs: setup
strategy:
matrix:
os: [ ubuntu-22.04, windows-2022, macos-12 ]
os: [ ubuntu-24.04, windows-2022, macos-14 ]
include:
- os: ubuntu-22.04
- os: ubuntu-24.04
cert: /etc/ssl/certs/ca-certificates.crt
- os: macos-12
- os: macos-14
cert: /etc/ssl/cert.pem
- os: windows-2022
cert: ./example_code/x1.pem
Expand All @@ -92,7 +92,7 @@ jobs:

no_tls:
needs: setup
runs-on: ubuntu-22.04
runs-on: ubuntu-24.04
timeout-minutes: 10
strategy:
matrix:
Expand All @@ -109,7 +109,7 @@ jobs:

invalid_tls_version:
needs: setup
runs-on: ubuntu-22.04
runs-on: ubuntu-24.04
timeout-minutes: 10
strategy:
matrix:
Expand All @@ -130,7 +130,7 @@ jobs:
valid_tls_version:
needs: setup
runs-on: ubuntu-22.04
runs-on: ubuntu-24.04
timeout-minutes: 10
strategy:
matrix:
Expand All @@ -152,11 +152,11 @@ jobs:
needs: setup
strategy:
matrix:
os: [ ubuntu-22.04, windows-2022, macos-12 ]
os: [ ubuntu-24.04, windows-2022, macos-14 ]
include:
- os: ubuntu-22.04
- os: ubuntu-24.04
cert: /etc/ssl/certs/ca-certificates.crt
- os: macos-12
- os: macos-14
cert: /etc/ssl/cert.pem
- os: windows-2022
cert: ./example_code/x1.pem
Expand All @@ -180,7 +180,7 @@ jobs:
needs: setup
strategy:
matrix:
os: [ ubuntu-22.04, windows-2022, macos-12 ]
os: [ ubuntu-24.04, windows-2022, macos-14 ]
runs-on: ${{ matrix.os }}
timeout-minutes: 10
steps:
Expand All @@ -207,7 +207,7 @@ jobs:
# https://jira.mariadb.org/browse/CONJ-1023
java_jdbc_mariadb_CONJ-1023:
needs: setup
runs-on: ubuntu-22.04
runs-on: ubuntu-24.04
timeout-minutes: 10
steps:
- uses: actions/checkout@v4
Expand All @@ -225,11 +225,11 @@ jobs:
needs: setup
strategy:
matrix:
os: [ ubuntu-22.04, windows-2022, macos-12 ]
os: [ ubuntu-24.04, windows-2022, macos-14 ]
include:
- os: ubuntu-22.04
- os: ubuntu-24.04
cert: /etc/ssl/certs/ca-certificates.crt
- os: macos-12
- os: macos-14
cert: /etc/ssl/cert.pem
- os: windows-2022
cert: ../x1.pem
Expand All @@ -241,7 +241,7 @@ jobs:
with:
python-version: '3.10'
- name: Install mysql in macos
if: ${{ matrix.os == 'macos-12' }}
if: ${{ matrix.os == 'macos-14' }}
run: |
# https://github.com/Homebrew/homebrew-core/issues/130258
ln -sv $(brew --prefix zlib)/lib/libz.dylib $(brew --prefix)/lib/libzlib.dylib
Expand All @@ -257,11 +257,11 @@ jobs:
needs: setup
strategy:
matrix:
os: [ ubuntu-22.04, windows-2022, macos-12 ]
os: [ ubuntu-24.04, windows-2022, macos-14 ]
include:
- os: ubuntu-22.04
- os: ubuntu-24.04
cert: /etc/ssl/certs/ca-certificates.crt
- os: macos-12
- os: macos-14
cert: /etc/ssl/cert.pem
- os: windows-2022
cert: ../x1.pem
Expand All @@ -282,11 +282,11 @@ jobs:
needs: setup
strategy:
matrix:
os: [ ubuntu-22.04, windows-2022, macos-12 ]
os: [ ubuntu-24.04, windows-2022, macos-14 ]
include:
- os: ubuntu-22.04
- os: ubuntu-24.04
cert: /etc/ssl/certs/ca-certificates.crt
- os: macos-12
- os: macos-14
cert: /etc/ssl/cert.pem
- os: windows-2022
cert: ../x1.pem
Expand All @@ -307,11 +307,11 @@ jobs:
needs: setup
strategy:
matrix:
os: [ ubuntu-22.04, windows-2022, macos-12 ]
os: [ ubuntu-24.04, windows-2022, macos-14 ]
include:
- os: ubuntu-22.04
- os: ubuntu-24.04
cert: /etc/ssl/certs/ca-certificates.crt
- os: macos-12
- os: macos-14
cert: /etc/ssl/cert.pem
- os: windows-2022
cert: ../x1.pem
Expand All @@ -323,7 +323,7 @@ jobs:
with:
python-version: '3.10'
- name: Install mysql in macos
if: ${{ matrix.os == 'macos-12' }}
if: ${{ matrix.os == 'macos-14' }}
run: |
# https://github.com/Homebrew/homebrew-core/issues/130258
ln -sv $(brew --prefix zlib)/lib/libz.dylib $(brew --prefix)/lib/libzlib.dylib
Expand All @@ -339,14 +339,15 @@ jobs:
needs: setup
strategy:
matrix:
os: [ ubuntu-22.04, windows-2022, macos-12 ]
os: [ ubuntu-24.04, windows-2022, macos-14 ]
runs-on: ${{ matrix.os }}
timeout-minutes: 10
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version-file: 'example_code/go/go.mod'
cache-dependency-path: 'example_code/go/go.sum'
- name: Run test on ${{ matrix.os }}
run: |
cd example_code/go
Expand All @@ -357,14 +358,15 @@ jobs:
needs: setup
strategy:
matrix:
os: [ ubuntu-22.04, windows-2022, macos-12 ]
os: [ ubuntu-24.04, windows-2022, macos-14 ]
runs-on: ${{ matrix.os }}
timeout-minutes: 10
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version-file: 'example_code/gorm/go.mod'
cache-dependency-path: 'example_code/gorm/go.sum'
- name: Run test on ${{ matrix.os }}
run: |
cd example_code/gorm
Expand All @@ -375,7 +377,7 @@ jobs:
needs: setup
strategy:
matrix:
os: [ ubuntu-22.04, windows-2022, macos-12 ]
os: [ ubuntu-24.04, windows-2022, macos-14 ]
runs-on: ${{ matrix.os }}
timeout-minutes: 10
steps:
Expand All @@ -393,7 +395,7 @@ jobs:
needs: setup
strategy:
matrix:
os: [ ubuntu-22.04, windows-2022, macos-12 ]
os: [ ubuntu-24.04, windows-2022, macos-14 ]
runs-on: ${{ matrix.os }}
timeout-minutes: 10
steps:
Expand All @@ -412,7 +414,7 @@ jobs:
needs: setup
strategy:
matrix:
os: [ windows-2022, macos-12 ] # skip ubuntu-22.04 as it get stuck for unknown reasons
os: [ windows-2022, macos-14 ] # skip ubuntu-24.04 as it get stuck for unknown reasons
runs-on: ${{ matrix.os }}
timeout-minutes: 15
steps:
Expand All @@ -427,7 +429,7 @@ jobs:
needs: setup
strategy:
matrix:
os: [ ubuntu-22.04, macos-12 ] # install mysql2 in windows is a little difficult, dismiss it for now
os: [ ubuntu-24.04, macos-14 ] # install mysql2 in windows is a little difficult, dismiss it for now
runs-on: ${{ matrix.os }}
timeout-minutes: 10
steps:
Expand All @@ -437,15 +439,15 @@ jobs:
ruby-version: '3.0' # Not needed with a .ruby-version file
bundler-cache: true # runs 'bundle install' and caches installed gems automatically
- name: Install mysql on macos
if: ${{ matrix.os == 'macos-12' }}
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-22.04' }}
if: ${{ matrix.os == 'ubuntu-24.04' }}
run: |
cd example_code/ruby
gem install mysql2
Expand All @@ -455,11 +457,11 @@ jobs:
needs: setup
strategy:
matrix:
os: [ ubuntu-22.04, windows-2022, macos-12 ]
os: [ ubuntu-24.04, windows-2022, macos-14 ]
include:
- os: ubuntu-22.04
- os: ubuntu-24.04
cert: /etc/ssl/certs/ca-certificates.crt
- os: macos-12
- os: macos-14
cert: /etc/ssl/cert.pem
- os: windows-2022
cert: ../x1.pem
Expand All @@ -480,26 +482,26 @@ jobs:
needs: setup
strategy:
matrix:
os: [ ubuntu-22.04, macos-12 ]
os: [ ubuntu-24.04, macos-14 ]
include:
- os: ubuntu-22.04
- os: ubuntu-24.04
cert: /etc/ssl/certs/ca-certificates.crt
- os: macos-12
- os: macos-14
cert: /etc/ssl/cert.pem
runs-on: ${{ matrix.os }}
timeout-minutes: 10
steps:
- uses: actions/checkout@v4
- uses: rlalik/setup-cpp-compiler@v1.2
- name: Run test on macos
if: ${{ matrix.os == 'macos-12' }}
if: ${{ matrix.os == 'macos-14' }}
run: |
brew install mysql
cd example_code/cpp
g++ ConnectTest.cpp -o test -I/usr/local/include/mysql -lmysqlclient
./test ${{needs.setup.outputs.TIDB_CLOUD_HOST}} ${{needs.setup.outputs.TIDB_CLOUD_USER}} ${{ secrets.TIDB_CLOUD_PASSWORD }} ${{matrix.cert}}
- name: Run test on ubuntu
if: ${{ matrix.os == 'ubuntu-22.04' }}
if: ${{ matrix.os == 'ubuntu-24.04' }}
run: |
sudo apt install -y libmysqlclient-dev
cd example_code/cpp
Expand Down

0 comments on commit faae201

Please sign in to comment.