Skip to content

Commit e1ed036

Browse files
committed
Initial implementation
0 parents  commit e1ed036

41 files changed

Lines changed: 3624 additions & 0 deletions

Some content is hidden

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

.github/workflows/build-gems.yml

Lines changed: 109 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,109 @@
1+
name: Build Gems
2+
3+
on:
4+
workflow_dispatch:
5+
release:
6+
types: [published]
7+
8+
concurrency:
9+
group: ${{ github.workflow }}-${{ github.ref }}
10+
cancel-in-progress: true
11+
12+
permissions:
13+
contents: read
14+
15+
jobs:
16+
build:
17+
name: Build ${{ matrix.target }} gem
18+
strategy:
19+
fail-fast: false
20+
matrix:
21+
target:
22+
- default
23+
- aarch64-linux-gnu
24+
- aarch64-linux-musl
25+
- arm-linux-gnu
26+
- arm-linux-musl
27+
- arm64-darwin
28+
- x86-linux-gnu
29+
- x86-linux-musl
30+
- x86_64-darwin
31+
- x86_64-linux-gnu
32+
- x86_64-linux-musl
33+
34+
runs-on: ubuntu-latest
35+
timeout-minutes: 20
36+
37+
steps:
38+
- uses: actions/checkout@v4
39+
40+
- name: Setup Ruby
41+
uses: ruby/setup-ruby@v1
42+
with:
43+
bundler-cache: true
44+
45+
- name: Build gem
46+
run: |
47+
if [ "${{ matrix.target }}" = "default" ]; then
48+
bundle exec rake build
49+
else
50+
bundle exec rake gem:${{ matrix.target }}
51+
fi
52+
53+
- name: Upload gem artifacts
54+
if: github.event_name == 'release'
55+
uses: actions/upload-artifact@v4
56+
with:
57+
name: gem-${{ matrix.target }}
58+
path: pkg/*.gem
59+
if-no-files-found: error
60+
retention-days: 7
61+
62+
push:
63+
name: Push gems with trusted publishing
64+
if: github.event_name == 'release' && github.repository_owner == 'marcoroth'
65+
needs: build
66+
timeout-minutes: 30
67+
runs-on: ubuntu-latest
68+
permissions:
69+
contents: write
70+
id-token: write
71+
72+
steps:
73+
- uses: actions/checkout@v4
74+
with:
75+
fetch-depth: 0
76+
77+
- name: Vendor release-gem patch
78+
uses: actions/checkout@v4
79+
with:
80+
repository: rubygems/release-gem
81+
ref: 1c162a739e8b4cb21a676e97b087e8268d8fc40b # v1.1.2
82+
path: .github/_release-gem
83+
84+
- name: Setup Ruby
85+
uses: ruby/setup-ruby@v1
86+
with:
87+
bundler-cache: true
88+
89+
- name: Download gem artifacts
90+
uses: actions/download-artifact@v4
91+
with:
92+
pattern: gem-*
93+
path: pkg/
94+
merge-multiple: true
95+
96+
- name: Configure trusted publishing credentials
97+
uses: rubygems/configure-rubygems-credentials@v1.0.0
98+
99+
- name: Push gem with Sigstore attestation
100+
env:
101+
RUBYOPT: "-r${{ github.workspace }}/.github/_release-gem/rubygems-attestation-patch.rb"
102+
run: |
103+
cd pkg
104+
for gem_file in *.gem; do
105+
if [ -f "$gem_file" ]; then
106+
echo "Pushing $gem_file"
107+
gem push "$gem_file"
108+
fi
109+
done

.github/workflows/build.yml

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
name: Ruby
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
8+
pull_request:
9+
10+
jobs:
11+
build:
12+
runs-on: ubuntu-latest
13+
name: Ruby ${{ matrix.ruby }}
14+
strategy:
15+
matrix:
16+
ruby:
17+
- '3.2'
18+
- '3.3'
19+
- '3.4'
20+
- '4.0'
21+
22+
steps:
23+
- name: Checkout
24+
uses: actions/checkout@v4
25+
26+
- name: Set up Ruby ${{ matrix.ruby }}
27+
uses: ruby/setup-ruby@v1
28+
with:
29+
ruby-version: ${{ matrix.ruby }}
30+
bundler-cache: true
31+
32+
- name: Set up Go
33+
uses: actions/setup-go@v5
34+
with:
35+
go-version-file: go/go.mod
36+
cache-dependency-path: go/go.sum
37+
38+
- name: Build Go Library
39+
run: bundle exec rake go:build
40+
41+
- name: Compile Native Extension
42+
run: bundle exec rake compile
43+
44+
- name: Run tests
45+
run: bundle exec rake test
46+
47+
# - name: Run steep check
48+
# run: bundle exec steep check
49+
50+
- name: Run rubocop
51+
run: bundle exec rubocop

.gitignore

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
/.bundle/
2+
/.yardoc
3+
/_yardoc/
4+
/coverage/
5+
/doc/
6+
/pkg/
7+
/spec/reports/
8+
/tmp/
9+
/vendor/bundle/
10+
11+
# C extension build artifacts
12+
*.o
13+
*.so
14+
*.bundle
15+
*.bundle.dSYM
16+
*.dll
17+
Makefile
18+
mkmf.log
19+
20+
# Go build artifacts
21+
go/build/
22+
go/lipgloss.h
23+
24+
# IDE
25+
.idea/
26+
*.swp
27+
*.swo
28+
.vscode/
29+
30+
# OS
31+
.DS_Store
32+
Thumbs.db
33+
34+
# Gem
35+
*.gem

.rubocop.yml

Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
AllCops:
2+
TargetRubyVersion: 3.2
3+
SuggestExtensions: false
4+
NewCops: enable
5+
6+
Style/StringLiterals:
7+
EnforcedStyle: double_quotes
8+
9+
Style/StringLiteralsInInterpolation:
10+
EnforcedStyle: double_quotes
11+
12+
Style/TrailingCommaInHashLiteral:
13+
EnforcedStyleForMultiline: comma
14+
15+
Style/TrailingCommaInArrayLiteral:
16+
EnforcedStyleForMultiline: comma
17+
18+
Style/SymbolArray:
19+
EnforcedStyle: brackets
20+
21+
Style/WordArray:
22+
EnforcedStyle: brackets
23+
24+
Style/Documentation:
25+
Enabled: false
26+
27+
Style/ArgumentsForwarding:
28+
Enabled: false
29+
30+
Style/AccessorGrouping:
31+
Enabled: false
32+
33+
Layout/LeadingCommentSpace:
34+
AllowRBSInlineAnnotation: true
35+
36+
Metrics/AbcSize:
37+
Enabled: false
38+
39+
Metrics/MethodLength:
40+
Enabled: false
41+
42+
Metrics/CyclomaticComplexity:
43+
Enabled: false
44+
45+
Metrics/PerceivedComplexity:
46+
Enabled: false
47+
48+
Metrics/ParameterLists:
49+
Enabled: false
50+
51+
Naming/MethodParameterName:
52+
Enabled: false
53+
54+
Layout/LineLength:
55+
Enabled: false
56+
57+
Metrics/ClassLength:
58+
Enabled: false
59+
60+
Metrics/BlockLength:
61+
Enabled: false
62+
63+
Metrics/BlockNesting:
64+
Enabled: false
65+
66+
Lint/EmptyClass:
67+
Enabled: false
68+
69+
Style/GlobalVars:
70+
Exclude:
71+
- ext/bubblezone/extconf.rb
72+
73+
Security/Eval:
74+
Exclude:
75+
- Rakefile

.ruby-version

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
4.0.0

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
## [Unreleased]
2+
3+
## [0.1.0] - 2025-12-25
4+
5+
- Initial release

0 commit comments

Comments
 (0)