Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: fix ruby head and alpine breaks #606

Merged
merged 2 commits into from
Jan 15, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -294,10 +294,10 @@ jobs:
ruby: ${{ fromJSON(needs.ruby_versions.outputs.image_tag) }}
include:
# declare docker image for each platform
- { platform: aarch64-linux-musl, docker_tag: "-alpine", bootstrap: "apk add build-base &&" }
- { platform: arm-linux-musl, docker_tag: "-alpine", bootstrap: "apk add build-base &&" }
- { platform: x86-linux-musl, docker_tag: "-alpine", bootstrap: "apk add build-base &&" }
- { platform: x86_64-linux-musl, docker_tag: "-alpine", bootstrap: "apk add build-base &&" }
- { platform: aarch64-linux-musl, docker_tag: "-alpine", bootstrap: "apk add build-base yaml-dev &&" }
- { platform: arm-linux-musl, docker_tag: "-alpine", bootstrap: "apk add build-base yaml-dev &&" }
- { platform: x86-linux-musl, docker_tag: "-alpine", bootstrap: "apk add build-base yaml-dev &&" }
- { platform: x86_64-linux-musl, docker_tag: "-alpine", bootstrap: "apk add build-base yaml-dev &&" }
# declare docker platform for each platform
- { platform: aarch64-linux-gnu, docker_platform: "--platform=linux/arm64" }
- { platform: aarch64-linux-musl, docker_platform: "--platform=linux/arm64" }
Expand Down Expand Up @@ -371,5 +371,5 @@ jobs:
with:
name: cruby-x86_64-linux-musl-gem
path: gems
- run: apk add build-base
- run: apk add build-base yaml-dev
- run: ./bin/test-gem-install ./gems
12 changes: 5 additions & 7 deletions test/test_integration_pending.rb
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
require "helper"

require "benchmark"

class IntegrationPendingTestCase < SQLite3::TestCase
class ThreadSynchronizer
def initialize
Expand Down Expand Up @@ -103,12 +101,12 @@ def test_busy_timeout
end
synchronizer.wait_for_thread :ready_0

time = Benchmark.measure do
assert_raise(SQLite3::BusyException) do
@db.execute "insert into foo (b) values ( 'from 2' )"
end
start_time = Time.now
assert_raise(SQLite3::BusyException) do
@db.execute "insert into foo (b) values ( 'from 2' )"
end
assert_operator time.real * 1000, :>=, 1000
end_time = Time.now
assert_operator(end_time - start_time, :>=, 1.0)

synchronizer.send_to_thread :end_1
synchronizer.close_main
Expand Down
Loading