|
4 | 4 | build: |
5 | 5 | name: >- |
6 | 6 | ${{ matrix.os }} ruby ${{ matrix.ruby }} ${{ matrix.db }} |
7 | | - # Run all the tests on the new environment as much as possible. |
8 | | - # https://docs.github.com/en/free-pro-team@latest/actions/reference/specifications-for-github-hosted-runners |
9 | 7 | runs-on: ${{ matrix.os }} |
10 | 8 | continue-on-error: ${{ matrix.allow-failure || false }} |
11 | 9 | strategy: |
12 | 10 | matrix: |
13 | | - os: |
14 | | - # Use ubuntu-18.04 instead of ubuntu-20.04 temporarily, due to a failing test on mysql 8.0. |
15 | | - # https://github.com/brianmario/mysql2/issues/1165 |
16 | | - # - ubuntu-20.04 # focal |
17 | | - - ubuntu-18.04 # bionic |
18 | | - ruby: |
19 | | - - '3.1' |
20 | | - - '3.0' |
21 | | - - '2.7' |
22 | | - - '2.6' |
23 | | - - '2.5' |
24 | | - - '2.4' |
25 | | - - '2.3' |
26 | | - - '2.2' |
27 | | - - '2.1' |
28 | | - db: [''] |
29 | 11 | include: |
30 | | - # Comment out due to ci/setup.sh stucking. |
31 | | - # - {os: ubuntu-18.04, ruby: 2.4, db: mariadb10.1} |
32 | | - # Allow failure due to the issue #965, #1165. |
33 | | - - {os: ubuntu-20.04, ruby: '2.4', db: mariadb10.3, allow-failure: true} |
34 | | - - {os: ubuntu-18.04, ruby: '2.4', db: mysql57} |
35 | | - # Allow failure due to the issue #1165. |
36 | | - - {os: ubuntu-20.04, ruby: '2.4', db: mysql80, allow-failure: true} |
37 | | - - {os: ubuntu-18.04, ruby: 'head', db: '', allow-failure: true} |
38 | | - # db: A DB's brew package name in macOS case. |
39 | | - # Set a name "db: 'name@X.Y'" when using an old version. |
40 | | - # MariaDB lastet version |
41 | | - # Allow failure due to the following test failures that rarely happens. |
| 12 | + # Ruby 3.x on Ubuntu 24.04 LTS |
| 13 | + - {os: ubuntu-24.04, ruby: 'head', db: mysql84} |
| 14 | + - {os: ubuntu-24.04, ruby: '3.4', db: mysql84} |
| 15 | + |
| 16 | + # Ruby 3.x on Ubuntu 22.04 LTS |
| 17 | + - {os: ubuntu-22.04, ruby: '3.4', db: mysql80} |
| 18 | + - {os: ubuntu-22.04, ruby: '3.3', db: mysql80} |
| 19 | + - {os: ubuntu-22.04, ruby: '3.2', db: mysql80} |
| 20 | + - {os: ubuntu-22.04, ruby: '3.1', db: mysql80} |
| 21 | + - {os: ubuntu-22.04, ruby: '3.0', db: mysql80} |
| 22 | + |
| 23 | + # Ruby 2.x on Ubuntu 20.04 LTS |
| 24 | + - {os: ubuntu-20.04, ruby: '2.7', db: mysql80} |
| 25 | + - {os: ubuntu-20.04, ruby: '2.6', db: mysql80} |
| 26 | + - {os: ubuntu-20.04, ruby: '2.5', db: mysql80} |
| 27 | + - {os: ubuntu-20.04, ruby: '2.4', db: mysql80} |
| 28 | + - {os: ubuntu-20.04, ruby: '2.3', db: mysql80} |
| 29 | + - {os: ubuntu-20.04, ruby: '2.2', db: mysql80} |
| 30 | + - {os: ubuntu-20.04, ruby: '2.1', db: mysql80} |
| 31 | + - {os: ubuntu-20.04, ruby: '2.0', db: mysql80} |
| 32 | + |
| 33 | + # MySQL 5.7 packages stopped after Ubuntu 18.04 Bionic |
| 34 | + # - {os: ubuntu-18.04, ruby: '2.7', db: mysql57} |
| 35 | + |
| 36 | + # MariaDB LTS versions |
| 37 | + # db: on Linux, ci/setup.sh installs the specified packages |
| 38 | + # db: on MacOS, installs a Homebrew package use "name@X.Y" to specify a version |
| 39 | + |
| 40 | + - {os: ubuntu-24.04, ruby: '3.4', db: mariadb11.4} |
| 41 | + - {os: ubuntu-22.04, ruby: '3.0', db: mariadb10.11} |
| 42 | + - {os: ubuntu-22.04, ruby: '2.7', db: mariadb10.11} |
| 43 | + - {os: ubuntu-22.04, ruby: '3.0', db: mariadb10.6} |
| 44 | + - {os: ubuntu-20.04, ruby: '2.7', db: mariadb10.6} |
| 45 | + |
| 46 | + # TODO - Windows CI |
| 47 | + # - {os: windows-2022, ruby: '3.2', db: mysql80} |
| 48 | + # - {os: windows-2022, ruby: '2.7', db: mysql80} |
| 49 | + |
| 50 | + # Allow failure due to this issue: |
42 | 51 | # https://github.com/brianmario/mysql2/issues/1194 |
43 | | - - {os: macos-latest, ruby: '2.4', db: mariadb, allow-failure: true} |
44 | | - # MySQL latest version |
45 | | - # Allow failure due to the issue #1165. |
46 | | - - {os: macos-latest, ruby: '2.4', db: mysql, allow-failure: true} |
| 52 | + - {os: macos-latest, ruby: '3.4', db: mariadb@11.4, ssl: openssl@3, allow-failure: true} |
| 53 | + - {os: macos-latest, ruby: '3.4', db: mysql@8.4, ssl: openssl@3, allow-failure: true} |
| 54 | + - {os: macos-latest, ruby: '2.6', db: mysql@8.0, ssl: openssl@1.1, allow-failure: true} |
| 55 | + |
47 | 56 | # On the fail-fast: true, it cancels all in-progress jobs |
48 | | - # if any matrix job fails unlike Travis fast_finish. |
| 57 | + # if any matrix job fails, which we don't want. |
49 | 58 | fail-fast: false |
50 | 59 | env: |
51 | 60 | BUNDLE_WITHOUT: development |
| 61 | + # reduce MacOS CI time, don't need to clean a runtime that isn't saved |
| 62 | + HOMEBREW_NO_INSTALL_CLEANUP: 1 |
| 63 | + HOMEBREW_NO_INSTALLED_DEPENDENTS_CHECK: 1 |
52 | 64 | steps: |
53 | 65 | - uses: actions/checkout@v3 |
54 | | - - name: Install openssl |
55 | | - if: matrix.os == 'macos-latest' |
56 | | - run: | |
57 | | - brew update |
58 | | - brew install openssl |
59 | | - # https://github.com/ruby/setup-ruby |
60 | 66 | - uses: ruby/setup-ruby@v1 |
61 | 67 | with: |
62 | 68 | ruby-version: ${{ matrix.ruby }} |
63 | 69 | bundler-cache: true # runs 'bundle install' and caches installed gems automatically |
64 | | - - if: matrix.db != '' |
65 | | - run: echo 'DB=${{ matrix.db }}' >> $GITHUB_ENV |
66 | | - - run: sudo echo "127.0.0.1 mysql2gem.example.com" | sudo tee -a /etc/hosts |
| 70 | + - if: runner.os == 'Linux' || runner.os == 'macOS' |
| 71 | + run: sudo echo "127.0.0.1 mysql2gem.example.com" | sudo tee -a /etc/hosts |
| 72 | + - if: runner.os == 'Windows' |
| 73 | + run: echo "127.0.0.1 mysql2gem.example.com" | tee -a C:/Windows/System32/drivers/etc/hosts |
| 74 | + - run: echo 'DB=${{ matrix.db }}' >> $GITHUB_ENV |
67 | 75 | - run: bash ci/setup.sh |
68 | | - - run: bundle exec rake spec |
| 76 | + # Set the verbose option in the Makefile to print compiling command lines. |
| 77 | + - run: echo "MAKEFLAGS=V=1" >> $GITHUB_ENV |
| 78 | + - if: matrix.ssl |
| 79 | + run: echo "rake_spec_opts=--with-openssl-dir=$(brew --prefix ${{ matrix.ssl }})" >> $GITHUB_ENV |
| 80 | + - run: bundle exec rake spec -- $rake_spec_opts |
0 commit comments