Skip to content

Commit

Permalink
ci: add dummy-mysql for OR dependency
Browse files Browse the repository at this point in the history
  • Loading branch information
kou committed Jan 8, 2025
1 parent ee7c2f9 commit 7feed4d
Show file tree
Hide file tree
Showing 3 changed files with 59 additions and 1 deletion.
2 changes: 1 addition & 1 deletion compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ services:
volumes:
- .:/host:delegated
command:
/host/dockerfiles/run-test.sh dummy-cairo
/host/dockerfiles/run-test.sh dummy-cairo dummy-mysql

conda:
build:
Expand Down
34 changes: 34 additions & 0 deletions test/fixture/dummy-mysql/dummy-mysql.gemspec
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# -*- ruby -*-
#
# Copyright (C) 2025 Ruby-GNOME Project Team
#
# This library is free software: you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.

Gem::Specification.new do |spec|
spec.name = "dummy-mysql"
spec.version = "1.0.0"
spec.authors = ["Sutou Kouhei"]
spec.email = ["[email protected]"]
spec.licenses = ["LGPL-3.0-or-later"]
spec.summary = "Dummy gem that uses MySQL"
spec.description = "This is for testing rubygems-requirements-system"
spec.extensions = ["ext/dummy-mysql/extconf.rb"]
spec.files = ["ext/dummy-mysql/extconf.rb"]

spec.add_runtime_dependency("rubygems-requirements-system")

spec.requirements << "system: mysqlclient|libmariadb: arch_linux: mariadb-libs"
spec.requirements << "system: mysqlclient|libmariadb: debian: libmysqlclient-dev"
spec.requirements << "system: mysqlclient|libmariadb: debian: libmariadb-dev"
end
24 changes: 24 additions & 0 deletions test/fixture/dummy-mysql/ext/dummy-mysql/extconf.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# Copyright (C) 2025 Ruby-GNOME Project Team
#
# This library is free software: you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.

require "mkmf"

require "pkg-config"

if PKGConfig.have_package("mysqlclient") or PKGConfig.have_package("libmariadb")
create_makefile("dummy_mysql")
else
exit(false)
end

0 comments on commit 7feed4d

Please sign in to comment.