Skip to content
Draft
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
30 changes: 4 additions & 26 deletions .github/workflows/release_ruby_gem.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ jobs:
- uses: oxidize-rb/actions/setup-ruby-and-rust@main
with:
rubygems: latest
ruby-version: "3.1"
ruby-version: "4.0"
bundler-cache: false
cargo-cache: false
cargo-vendor: false
Expand Down Expand Up @@ -57,7 +57,7 @@ jobs:

- uses: ruby/setup-ruby@v1
with:
ruby-version: "3.1"
ruby-version: "4.0"
bundler-cache: true
working-directory: rspec-trunk-flaky-tests

Expand Down Expand Up @@ -86,7 +86,7 @@ jobs:
with:
platform: ${{ matrix.platform }}
working-directory: rspec-trunk-flaky-tests
ruby-versions: 3.0,3.1,3.2,3.3,3.4
ruby-versions: 3.0,3.1,3.2,3.3,3.4,4.0

- uses: actions/upload-artifact@v4
with:
Expand All @@ -101,7 +101,7 @@ jobs:
needs: [ci-data, cross-gem]
strategy:
matrix:
ruby-version: ["3.0", "3.1", "3.2", "3.3", "3.4"]
ruby-version: ["3.0", "3.1", "3.2", "3.3", "3.4", "4.0"]
platform:
- name: x86_64-linux
os: ubuntu-latest
Expand All @@ -120,25 +120,3 @@ jobs:
trunk-token: ${{ secrets.TRUNK_STAGING_ORG_API_TOKEN }}
platform: ${{ matrix.platform.name }}
artifact-pattern: cross-gem-${{ matrix.platform.name }}

publish_ruby_gem:
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removed this so I could test the release without actually releasing the gem.

runs-on: ubuntu-latest
needs: test-ruby-gem
steps:
- uses: actions/checkout@v4

- uses: rubygems/configure-rubygems-credentials@main
with:
role-to-assume: ${{ secrets.RUBY_GEMS_OIDC }}
- uses: actions/download-artifact@v4
with:
pattern: cross-gem-*
path: rspec-trunk-flaky-tests/pkg/
merge-multiple: true
- working-directory: rspec-trunk-flaky-tests
run: |
set -euxo pipefail
find pkg
for i in $(ls pkg/*.gem); do
gem push $i
done
12 changes: 6 additions & 6 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion context/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ thiserror = "1.0.63"
tsify-next = { version = "0.5.4", optional = true }
uuid = { version = "1.10.0", features = ["v5"] }
wasm-bindgen = { version = "0.2.95", optional = true }
magnus = { version = "0.7.1", optional = true, default-features = false }
magnus = { version = "0.8.2", optional = true, default-features = false }
proto = { path = "../proto" }
prost-wkt-types = { version = "0.5.1", features = ["vendored-protox"] }
tracing = "0.1.41"
Expand Down
26 changes: 16 additions & 10 deletions rspec-trunk-flaky-tests/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion rspec-trunk-flaky-tests/Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ source 'https://rubygems.org'
gemspec

gem 'rake'
gem 'rake-compiler', '1.2.0'
gem 'rake-compiler'
27 changes: 15 additions & 12 deletions rspec-trunk-flaky-tests/Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2,42 +2,45 @@ PATH
remote: .
specs:
rspec_trunk_flaky_tests (0.0.0)
rb_sys (= 0.9.103)
rb_sys (= 0.9.123)
rspec-core (> 3.3)

GEM
remote: https://rubygems.org/
specs:
diff-lcs (1.5.1)
rake (13.2.1)
rake-compiler (1.2.0)
diff-lcs (1.6.2)
rake (13.3.1)
rake-compiler (1.3.1)
rake
rb_sys (0.9.103)
rspec (3.13.0)
rake-compiler-dock (1.10.0)
rb_sys (0.9.123)
rake-compiler-dock (= 1.10.0)
rspec (3.13.2)
rspec-core (~> 3.13.0)
rspec-expectations (~> 3.13.0)
rspec-mocks (~> 3.13.0)
rspec-core (3.13.2)
rspec-core (3.13.6)
rspec-support (~> 3.13.0)
rspec-expectations (3.13.3)
rspec-expectations (3.13.5)
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.13.0)
rspec-mocks (3.13.2)
rspec-mocks (3.13.7)
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.13.0)
rspec-support (3.13.2)
rspec-support (3.13.6)

PLATFORMS
arm64-darwin
arm64-linux
ruby
x86_64-darwin
x86_64-linux

DEPENDENCIES
rake
rake-compiler (= 1.2.0)
rake-compiler
rspec
rspec_trunk_flaky_tests!

BUNDLED WITH
2.5.23
4.0.3
6 changes: 6 additions & 0 deletions rspec-trunk-flaky-tests/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -230,6 +230,12 @@ The extension uses the `dev` profile by default when running tests. To use a dif
RB_SYS_CARGO_PROFILE=release bundle exec rake test
```

To compile the gem locally you can run using rb-sys-dock. This does require that docker is installed and running.

```bash
rb-sys-dock --platform arm64-darwin --build --directory rspec-trunk-flaky-tests
```

### Release

The gem is released using the GitHub Actions workflow at [`.github/workflows/release_ruby_gem.yml`](../.github/workflows/release_ruby_gem.yml).
Expand Down
4 changes: 2 additions & 2 deletions rspec-trunk-flaky-tests/Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@ desc 'Build native extension for a provided platform'
task :native, [:platform] do |_t, platform:|
Dir.chdir '..' do
if platform == 'x86_64-linux'
sh 'bundle', 'exec', 'rb-sys-dock', '--platform', platform, '--build', '--directory', 'rspec-trunk-flaky-tests', '--ruby-versions', '3.0,3.1,3.2,3.3,3.4', '--', 'sudo yum install -y perl-IPC-Cmd'
sh 'bundle', 'exec', 'rb-sys-dock', '--platform', platform, '--build', '--directory', 'rspec-trunk-flaky-tests', '--ruby-versions', '3.0,3.1,3.2,3.3,3.4,4.0', '--', 'sudo yum install -y perl-IPC-Cmd'
else
sh 'bundle', 'exec', 'rb-sys-dock', '--platform', platform, '--build', '--directory', 'rspec-trunk-flaky-tests', '--ruby-versions', '3.0,3.1,3.2,3.3,3.4'
sh 'bundle', 'exec', 'rb-sys-dock', '--platform', platform, '--build', '--directory', 'rspec-trunk-flaky-tests', '--ruby-versions', '3.0,3.1,3.2,3.3,3.4,4.0'
end
end
end
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ crate-type = ["cdylib"]
[dependencies]
anyhow = "1.0.93"
context = { path = "../../../context", features = ["git-access", "ruby"] }
magnus = { version = "0.7" }
magnus = { version = "0.8.2" }
test_report = { path = "../../../test_report", features = ["ruby"] }
rb-sys = { version = "=0.9.103", features = [
rb-sys = { version = "=0.9.123", features = [
"link-ruby",
"bindgen-rbimpls",
"bindgen-deprecated-types",
Expand All @@ -21,7 +21,7 @@ sentry = { version = "=0.36.0", features = ["debug-images"] }
sentry-log = "=0.36.0"

[dev-dependencies.magnus]
version = "0.7.1"
version = "0.8.2"
features = ["rb-sys", "embed"]

[build-dependencies]
Expand Down
2 changes: 1 addition & 1 deletion rspec-trunk-flaky-tests/rspec_trunk_flaky_tests.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ Gem::Specification.new do |s|
s.email = '[email protected]'
s.files = Dir['lib/**/*.rb', 'ext/**/*.{rs,rb}', '**/Cargo.*']
s.add_runtime_dependency('rspec-core', '>3.3')
s.add_dependency('rb_sys', '=0.9.103')
s.add_dependency('rb_sys', '=0.9.123')
s.add_development_dependency('rspec')
s.homepage = 'https://docs.trunk.io/flaky-tests/get-started/frameworks/rspec'
s.license = 'MIT'
Expand Down
2 changes: 1 addition & 1 deletion test_report/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ wasm-bindgen = { version = "0.2.95", optional = true }
third-party = { path = "../third-party" }
log = "0.4.14"
env_logger = { version = "0.11.0", default-features = false }
magnus = { version = "0.7.1", optional = true, default-features = false }
magnus = { version = "0.8.2", optional = true, default-features = false }
proto = { path = "../proto" }
trunk-analytics-cli = { path = "../cli" }
prost-wkt-types = { version = "0.5.1", features = ["vendored-protox"] }
Expand Down
Loading