-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Had to re-create the repo and squash all commits because CI setup was **messy** (junk PRs, commits, etc). Also it was a nice opportunity to remove some embarassing history, LMAO. It's all good now.
- Loading branch information
0 parents
commit 0320b41
Showing
43 changed files
with
2,978 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
name: Build | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
pull_request: | ||
branches: | ||
- main | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
|
||
strategy: | ||
matrix: | ||
ruby: ['2.6', '3.1'] | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: ruby/setup-ruby@v1 | ||
with: | ||
ruby-version: ${{ matrix.ruby }} | ||
bundler-cache: true | ||
- uses: actions-rs/toolchain@v1 | ||
with: | ||
toolchain: stable | ||
- name: Install dependencies | ||
run: bundle install | ||
- name: Cache crate | ||
uses: actions/cache@v2 | ||
with: | ||
path: | | ||
~/.cargo/registry | ||
~/.cargo/git | ||
target | ||
key: cargo-${{ hashFiles('**/Cargo.lock') }}-ruby-${{ matrix.ruby }} | ||
- name: Build crate | ||
run: bundle exec rake build | ||
- name: Lint source code with with RuboCop | ||
run: bundle exec rake rubocop | ||
- name: Verify static types with Steep | ||
run: bundle exec rake steep | ||
- name: Transpile source source with RubyNext | ||
run: bundle exec rake nextify | ||
- name: Run specs with RSpec | ||
run: bundle exec rake spec |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,117 @@ | ||
name: Release | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
|
||
jobs: | ||
check: | ||
runs-on: ubuntu-latest | ||
|
||
permissions: | ||
contents: write | ||
pull-requests: write | ||
|
||
steps: | ||
- uses: GoogleCloudPlatform/release-please-action@v3 | ||
id: release | ||
with: | ||
release-type: ruby | ||
package-name: tantiny | ||
bump-minor-pre-major: true | ||
bump-patch-for-minor-pre-major: true | ||
extra-files: | | ||
lib/tantiny/version.rb | ||
Cargo.toml | ||
outputs: | ||
tag_name: ${{ steps.release.outputs.tag_name }} | ||
release_created: ${{ steps.release.outputs.release_created }} | ||
|
||
publish: | ||
needs: check | ||
|
||
if: ${{ needs.check.outputs.release_created }} | ||
|
||
runs-on: ubuntu-latest | ||
|
||
permissions: | ||
contents: write | ||
pull-requests: write | ||
|
||
steps: | ||
- uses: GoogleCloudPlatform/release-please-action@v3 | ||
id: release | ||
with: | ||
release-type: ruby | ||
package-name: tantiny | ||
bump-minor-pre-major: true | ||
bump-patch-for-minor-pre-major: true | ||
version-file: "lib/tantiny/version.rb" | ||
- uses: actions/checkout@v2 | ||
- uses: ruby/setup-ruby@v1 | ||
with: | ||
ruby-version: 3.1 | ||
bundler-cache: true | ||
- name: Install dependencies | ||
run: bundle install | ||
- name: Transpile source source with RubyNext | ||
run: bundle exec rake nextify | ||
- name: Publish to RubyGems | ||
run: | | ||
mkdir -p $HOME/.gem | ||
touch $HOME/.gem/credentials | ||
chmod 0600 $HOME/.gem/credentials | ||
printf -- "---\n:rubygems_api_key: ${GEM_HOST_API_KEY}\n" > $HOME/.gem/credentials | ||
gem build *.gemspec | ||
gem push *.gem | ||
env: | ||
GEM_HOST_API_KEY: "${{ secrets.RUBYGEMS_AUTH_TOKEN }}" | ||
|
||
compile: | ||
needs: check | ||
|
||
if: ${{ needs.check.outputs.release_created }} | ||
|
||
runs-on: ${{ matrix.os }} | ||
|
||
strategy: | ||
matrix: | ||
ruby: ['2.6', '2.7', '3.0', '3.1'] | ||
os: ['ubuntu-latest', 'macos-latest'] | ||
|
||
permissions: | ||
contents: write | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: ruby/setup-ruby@v1 | ||
with: | ||
ruby-version: ${{ matrix.ruby }} | ||
bundler-cache: true | ||
- uses: actions-rs/toolchain@v1 | ||
with: | ||
toolchain: stable | ||
- name: Install dependencies | ||
run: bundle install | ||
- name: Cache crate | ||
uses: actions/cache@v2 | ||
with: | ||
path: | | ||
~/.cargo/registry | ||
~/.cargo/git | ||
target | ||
key: cargo-${{ hashFiles('**/Cargo.lock') }}-ruby-${{ matrix.ruby }}-os-${{ matrix.os }} | ||
- name: Build crate | ||
run: bundle exec rake build | ||
- name: Create tarball | ||
run: bundle exec rake thermite:tarball | ||
- name: Upload to GitHub Releases | ||
uses: softprops/action-gh-release@v1 | ||
with: | ||
tag_name: ${{ needs.check.outputs.tag_name }} | ||
files: tantiny-*.tar.gz | ||
- name: Try installing without Cargo | ||
run: | | ||
gem uninstall tantiny | ||
CARGO=fake gem install t |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
*.gem | ||
*.rbc | ||
/lib/.rbnext/ | ||
mkmf.log | ||
.byebug_history | ||
.rspec_status | ||
/.config | ||
/coverage/ | ||
/InstalledFiles | ||
/pkg/ | ||
/spec/reports/ | ||
/spec/examples.txt | ||
/test/tmp/ | ||
/test/version_tmp/ | ||
/tmp/ | ||
/lib/tantiny.so | ||
|
||
Gemfile.lock | ||
.ruby-version | ||
.ruby-gemset | ||
.tool-versions | ||
|
||
# Documentation cache and generated files: | ||
/.yardoc/ | ||
/_yardoc/ | ||
/doc/ | ||
/rdoc/ | ||
|
||
# Environment normalization: | ||
/.bundle/ | ||
/vendor/bundle | ||
/lib/bundler/man/ | ||
|
||
# Cargo | ||
/target | ||
Cargo.lock |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
--require spec_helper |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
require: standard | ||
|
||
inherit_gem: | ||
standard: config/base.yml | ||
|
||
AllCops: | ||
Exclude: | ||
- 'bin/*' | ||
- 'vendor/**/*' | ||
- 'Gemfile' | ||
TargetRubyVersion: 3.1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
# Changelog | ||
|
||
## [0.2.0] - 2022-03-07 | ||
|
||
- Dummy release |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
[package] | ||
name = "tantiny" | ||
version = "0.2.0" # {x-release-please-version} | ||
edition = "2021" | ||
authors = ["Alexander Baygeldin"] | ||
repository = "https://github.com/baygeldin/tantiny" | ||
|
||
[lib] | ||
crate-type = ["cdylib"] | ||
|
||
[dependencies] | ||
rutie = "0.8" | ||
tantivy = "0.16" | ||
lazy_static = "1.4" | ||
paste = "1.0" | ||
|
||
[package.metadata.thermite] | ||
github_releases = true | ||
github_release_type = "latest" | ||
git_tag_regex = "^v(\\d+\\.\\d+\\.\\d+)$" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
# frozen_string_literal: true | ||
|
||
source "https://rubygems.org" | ||
|
||
gemspec | ||
|
||
gem "standard", "~> 1.7" | ||
gem "rake", "~> 13.0" | ||
gem "rspec", "~> 3.0" | ||
gem "rubocop", "~> 1.21" | ||
gem "steep", "~> 0.47" | ||
gem "simplecov", "~> 0.21" | ||
gem "pry" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
MIT License | ||
|
||
Copyright (c) 2022 Alexander Baygeldin | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
in the Software without restriction, including without limitation the rights | ||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the Software is | ||
furnished to do so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in all | ||
copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
SOFTWARE. |
Oops, something went wrong.