Skip to content

Commit

Permalink
Adjust tests for rake-compiler-dock-1.2.0
Browse files Browse the repository at this point in the history
  • Loading branch information
larskanis committed Jan 5, 2022
1 parent 47fee17 commit 84b350c
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 10 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/gem-install.yml
Expand Up @@ -20,7 +20,7 @@ jobs:
name: "cruby-package"
runs-on: ubuntu-latest
container:
image: "larskanis/rake-compiler-dock-mri-x86_64-linux:1.1.0"
image: "larskanis/rake-compiler-dock-mri-x86_64-linux:1.2.0"
steps:
- uses: actions/checkout@v2
with:
Expand Down Expand Up @@ -111,7 +111,7 @@ jobs:
plat: ["x86_64-linux", "x86_64-darwin", "x64-mingw32", "x64-mingw-ucrt"]
runs-on: ubuntu-latest
container:
image: "larskanis/rake-compiler-dock-mri-${{matrix.plat}}:1.1.0"
image: "larskanis/rake-compiler-dock-mri-${{matrix.plat}}:1.2.0"
steps:
- uses: actions/checkout@v2
with:
Expand Down Expand Up @@ -229,7 +229,7 @@ jobs:
name: "jruby-package"
runs-on: ubuntu-latest
container:
image: "larskanis/rake-compiler-dock-jruby:1.1.0"
image: "larskanis/rake-compiler-dock-jruby:1.2.0"
steps:
- uses: actions/checkout@v2
with:
Expand Down
4 changes: 0 additions & 4 deletions scripts/test-gem-build
Expand Up @@ -14,10 +14,6 @@ BUILD_NATIVE_GEM=$2

test -e /etc/os-release && cat /etc/os-release

if [[ "${BUILD_NATIVE_GEM}" != "java" ]] ; then
rvm use 3.0 # because the default ruby is 2.5 as of rake-compiler-dock 1.1.0
fi

set -u

# TODO remove this stanza once https://github.com/rake-compiler/rake-compiler-dock/pull/57 is
Expand Down
10 changes: 7 additions & 3 deletions scripts/test-gem-file-contents
Expand Up @@ -47,7 +47,7 @@ gemspec = Dir.mktmpdir do |dir|
unless system("tar -xf #{gemfile} metadata.gz")
raise "could not unpack gem #{gemfile}"
end
YAML.load(%x(gunzip -c metadata.gz))
YAML.safe_load(%x(gunzip -c metadata.gz), permitted_classes: [Gem::Specification, Gem::Version, Gem::Dependency, Gem::Requirement, Time, Symbol])
end
end

Expand All @@ -67,10 +67,14 @@ Minitest::Reporters.use!([Minitest::Reporters::SpecReporter.new])
puts "Testing '#{gemfile}' (#{gemspec.platform})"
describe File.basename(gemfile) do
let(:cross_rubies_path) { File.join(File.dirname(__FILE__), "..", ".cross_rubies") }

# Ruby versions that should be supported by the native gem depending on the platform
let(:native_ruby_versions) do
File.read(cross_rubies_path).split("\n").map do |line|
line.split(":").first.split(".").take(2).join(".") # ugh
end.uniq.sort
ver, plat = line.split(":")
next if plat != gemspec.platform.to_s
ver.split(".").take(2).join(".") # ugh
end.compact.uniq.sort
end

describe "setup" do
Expand Down

0 comments on commit 84b350c

Please sign in to comment.