Skip to content

Commit 0bb9aeb

Browse files
authoredJul 23, 2024··
Merge branch 'master' into apply-manlon-patches
2 parents 68092a2 + b2b6d7b commit 0bb9aeb

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

53 files changed

+2082
-541
lines changed
 

‎.dockerignore

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
*.bundle
2+
Gemfile.lock
3+
spec/configuration.yml
4+
spec/my.cnf
5+
tmp
6+
vendor

‎.github/workflows/build.yml

+71
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
name: Build
2+
on: [push, pull_request]
3+
jobs:
4+
build:
5+
name: >-
6+
${{ matrix.os }} ruby ${{ matrix.ruby }} ${{ matrix.db }}
7+
runs-on: ${{ matrix.os }}
8+
continue-on-error: ${{ matrix.allow-failure || false }}
9+
strategy:
10+
matrix:
11+
include:
12+
# Ruby 3.x on Ubuntu 22.04 LTS (latest at this time)
13+
- {os: ubuntu-22.04, ruby: 'head', db: mysql80}
14+
- {os: ubuntu-22.04, ruby: '3.3', db: mysql80}
15+
- {os: ubuntu-22.04, ruby: '3.2', db: mysql80}
16+
- {os: ubuntu-22.04, ruby: '3.1', db: mysql80}
17+
- {os: ubuntu-22.04, ruby: '3.0', db: mysql80}
18+
19+
# Ruby 2.x on Ubuntu 20.04 LTS
20+
- {os: ubuntu-20.04, ruby: '2.7', db: mysql80}
21+
- {os: ubuntu-20.04, ruby: '2.6', db: mysql80}
22+
- {os: ubuntu-20.04, ruby: '2.5', db: mysql80}
23+
- {os: ubuntu-20.04, ruby: '2.4', db: mysql80}
24+
- {os: ubuntu-20.04, ruby: '2.3', db: mysql80}
25+
- {os: ubuntu-20.04, ruby: '2.2', db: mysql80}
26+
- {os: ubuntu-20.04, ruby: '2.1', db: mysql80}
27+
- {os: ubuntu-20.04, ruby: '2.0', db: mysql80}
28+
29+
# db: on Linux, ci/setup.sh installs the specified packages
30+
# db: on MacOS, installs a Homebrew package use "name@X.Y" to specify a version
31+
32+
- {os: ubuntu-22.04, ruby: '3.0', db: mariadb10.11}
33+
- {os: ubuntu-22.04, ruby: '2.7', db: mariadb10.11}
34+
- {os: ubuntu-22.04, ruby: '3.0', db: mariadb10.6}
35+
- {os: ubuntu-20.04, ruby: '2.7', db: mariadb10.6}
36+
- {os: ubuntu-20.04, ruby: '2.7', db: mysql80}
37+
- {os: ubuntu-18.04, ruby: '2.7', db: mysql57}
38+
39+
# TODO - Windows CI
40+
# - {os: windows-2022, ruby: '3.2', db: mysql80}
41+
# - {os: windows-2022, ruby: '2.7', db: mysql80}
42+
43+
# Allow failure due to this issue:
44+
# https://github.com/brianmario/mysql2/issues/1194
45+
- {os: macos-latest, ruby: '2.6', db: mariadb, ssl: openssl@1.1, allow-failure: true}
46+
- {os: macos-latest, ruby: '2.6', db: mysql, ssl: openssl@1.1, allow-failure: true}
47+
# On the fail-fast: true, it cancels all in-progress jobs
48+
# if any matrix job fails, which we don't want.
49+
fail-fast: false
50+
env:
51+
BUNDLE_WITHOUT: development
52+
# reduce MacOS CI time, don't need to clean a runtime that isn't saved
53+
HOMEBREW_NO_INSTALL_CLEANUP: 1
54+
HOMEBREW_NO_INSTALLED_DEPENDENTS_CHECK: 1
55+
steps:
56+
- uses: actions/checkout@v3
57+
- uses: ruby/setup-ruby@v1
58+
with:
59+
ruby-version: ${{ matrix.ruby }}
60+
bundler-cache: true # runs 'bundle install' and caches installed gems automatically
61+
- if: runner.os == 'Linux' || runner.os == 'macOS'
62+
run: sudo echo "127.0.0.1 mysql2gem.example.com" | sudo tee -a /etc/hosts
63+
- if: runner.os == 'Windows'
64+
run: echo "127.0.0.1 mysql2gem.example.com" | tee -a C:/Windows/System32/drivers/etc/hosts
65+
- run: echo 'DB=${{ matrix.db }}' >> $GITHUB_ENV
66+
- run: bash ci/setup.sh
67+
# Set the verbose option in the Makefile to print compiling command lines.
68+
- run: echo "MAKEFLAGS=V=1" >> $GITHUB_ENV
69+
- if: matrix.ssl
70+
run: echo "rake_spec_opts=--with-openssl-dir=$(brew --prefix ${{ matrix.ssl }})" >> $GITHUB_ENV
71+
- run: bundle exec rake spec -- $rake_spec_opts

0 commit comments

Comments
 (0)
Please sign in to comment.