Skip to content
Open
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
2 changes: 1 addition & 1 deletion .ruby-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
3.2.2
3.3.0
18 changes: 18 additions & 0 deletions .semaphore/ensure-bundle.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Ensure that the bundle is installed and cached
#

bundle config set --local deployment true
bundle config set --local path vendor/bundle
gem update --no-doc bundler

gemfile_checksum=$(checksum Gemfile.lock)
cache_key="${SEMAPHORE_AGENT_MACHINE_OS_IMAGE}-${RUBY_VERSION}-${gemfile_checksum}"

if cache has_key "${cache_key}"; then
echo "Bundle for ${RUBY_VERSION} and Gemfile.lock found in cache"
cache restore "${cache_key}"
else
echo "Caching Bundle for ${RUBY_VERSION} and Gemfile.lock"
bundle install
cache store "${cache_key}" vendor/bundle
fi
14 changes: 14 additions & 0 deletions .semaphore/ensure-ruby-version.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# Ensure the correct Ruby version is installed and cached
#
cache_key="${SEMAPHORE_AGENT_MACHINE_OS_IMAGE}-${RUBY_VERSION}"

if cache has_key "${cache_key}"; then
echo "Ruby ${RUBY_VERSION} found in cache"
cache restore "${cache_key}"
sem-version ruby "${RUBY_VERSION}" -f
else
echo "Installing Ruby $RUBY_VERSION"
sem-version ruby "${RUBY_VERSION}" -f
cache store "${cache_key}" "${HOME}/.rbenv/versions/${RUBY_VERSION}"
fi

41 changes: 21 additions & 20 deletions .semaphore/semaphore.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,14 @@
version: v1.0
name: libsql-ruby
name: libsql
agent:
machine:
type: e1-standard-2
os_image: ubuntu2004

auto_cancel:
running:
when: "branch != 'main'"

blocks:
- name: Run Linux Tests
dependencies: []
Expand All @@ -24,13 +29,11 @@ blocks:
values:
- 3.0.6
- 3.1.4
- 3.2.2
- 3.2.3
- 3.3.0
commands:
- sem-version ruby ${RUBY_VERSION} -f
- bundle config set --local deployment true
- bundle config set --local path vendor/bundle
- gem update --no-doc bundler
- bundle install
- source .semaphore/ensure-ruby-version.sh
- source .semaphore/ensure-bundle.sh
- mkdir -p tmp/test-results/
- export TEST_RESULTS_FILE=tmp/test-results/${RUBY_VERSION}.xml
- bundle exec rake test
Expand All @@ -41,7 +44,7 @@ blocks:
agent:
machine:
type: a1-standard-4
os_image: macos-xcode13
os_image: macos-xcode14
prologue:
commands:
- checkout
Expand All @@ -53,13 +56,11 @@ blocks:
values:
- 3.0.6
- 3.1.4
- 3.2.2
- 3.2.3
- 3.3.0
commands:
- sem-version ruby ${RUBY_VERSION} -f
- bundle config set --local deployment true
- bundle config set --local path vendor/bundle
- gem update --no-doc bundler
- bundle install
- source .semaphore/ensure-ruby-version.sh
- source .semaphore/ensure-bundle.sh
- mkdir -p tmp/test-results/
- export TEST_RESULTS_FILE=tmp/test-results/${RUBY_VERSION}.xml
- bundle exec rake test
Expand All @@ -70,14 +71,14 @@ blocks:
task:
env_vars:
- name: RUBY_CC_VERSION
value: 3.0.0:3.1.0:3.2.0
value: 3.0.0:3.1.0:3.2.0:3.3.0
agent:
machine:
type: e1-standard-2
os_image: ubuntu2004
containers:
- name: rake-compiler-dock
image: "ghcr.io/rake-compiler/rake-compiler-dock-image:1.3.0-mri-x86-mingw32"
image: "ghcr.io/rake-compiler/rake-compiler-dock-image:1.4.0-mri-x86-mingw32"
jobs:
- name: build x86-mingw32 gem
commands:
Expand All @@ -93,14 +94,14 @@ blocks:
task:
env_vars:
- name: RUBY_CC_VERSION
value: 3.0.0
value: 3.0.0:3.1.0:3.2.0:3.3.0
agent:
machine:
type: e1-standard-2
os_image: ubuntu2004
containers:
- name: rake-compiler-dock
image: "ghcr.io/rake-compiler/rake-compiler-dock-image:1.3.0-mri-x64-mingw32"
image: "ghcr.io/rake-compiler/rake-compiler-dock-image:1.4.0-mri-x64-mingw32"
jobs:
- name: build x64-mingw32
commands:
Expand All @@ -116,14 +117,14 @@ blocks:
task:
env_vars:
- name: RUBY_CC_VERSION
value: 3.0.0:3.1.0:3.2.0
value: 3.0.0:3.1.0:3.2.0:3.3.0
agent:
machine:
type: e1-standard-2
os_image: ubuntu2004
containers:
- name: rake-compiler-dock
image: "ghcr.io/rake-compiler/rake-compiler-dock-image:1.3.0-mri-x64-mingw-ucrt"
image: "ghcr.io/rake-compiler/rake-compiler-dock-image:1.4.0-mri-x64-mingw-ucrt"
jobs:
- name: build x64-mingw-ucrt
commands:
Expand Down
2 changes: 1 addition & 1 deletion Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ GEM
simplecov_json_formatter (~> 0.1)
simplecov-html (0.12.3)
simplecov_json_formatter (0.1.4)
stringio (3.0.6)
stringio (3.1.0)

PLATFORMS
arm64-darwin-21
Expand Down
3 changes: 3 additions & 0 deletions HISTORY.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
# Libsql Changelog
## Version 0.2.0 - 2024-03-XX
* Update to libsql 0.2.3 (from libsql-server-v0.24.2)
* Update CI tooling

## Version 0.1.0 - 2023-05-03
* Use the the [amalgalite](https://github.com/copiousfreetime/amalgalite) codebase to bootstrap libsql.
Expand Down
8 changes: 8 additions & 0 deletions Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,14 @@ This.ruby_gemspec do |spec|
spec.license = "BSD-3-Clause"
end

This.cross_platforms = %w[
x86-mingw32
x64-mingw-ucrt
x64-mingw32
]


load 'tasks/default.rake'
load 'tasks/extension.rake'
load 'tasks/custom.rake'
load 'tasks/semaphore.rake'
Loading