Skip to content

Commit

Permalink
[1.0.0] Update packages and versions (#11)
Browse files Browse the repository at this point in the history
* update versions

* rewrite ci

* add teh matrix target

* try cargo test

* fix typo

* fix typo

* update packages so that it compiles on windows

* Update CHANGELOG.md

Co-authored-by: Samat Iskaziyev <[email protected]>

* clarify better ruby versions

* fix versions

* fix rubocop

---------

Co-authored-by: Samat Iskaziyev <[email protected]>
  • Loading branch information
unsign3d and sam4t authored Feb 27, 2025
1 parent fd9bd79 commit 4a79f9b
Show file tree
Hide file tree
Showing 10 changed files with 704 additions and 445 deletions.
File renamed without changes.
54 changes: 22 additions & 32 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,16 +26,12 @@ jobs:
runs-on: ${{ matrix.os }}

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- uses: ruby/setup-ruby@v1
- name: Set up Rust
id: toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true
target: ${{ matrix.target }}
components: rustfmt, clippy
- name: Update Rust
run: rustup update
- name: Add matrix target
run: rustup target add ${{matrix.target}}

# Target older versions of OSX (as old as we reasonably can) to ensure we
# can run across a wide variety of systems.
Expand All @@ -62,7 +58,7 @@ jobs:
target
key: ${{ runner.os }}-${{matrix.target}}-cargo-${{ steps.toolchain.outputs.rustc_hash}}-${{ hashFiles('**/Cargo.lock') }}

- uses: actions/cache@v3
- uses: actions/cache@v4
with:
path: vendor/bundle
key: ${{ runner.os }}-${{matrix.target}}-gems-${{ hashFiles('**/Gemfile.lock')}}-${{ hashFiles('**/.tool-versions') }}
Expand All @@ -80,28 +76,21 @@ jobs:
ls -l ext/
- name: Rust test
uses: actions-rs/cargo@v1
with:
command: test
run: cargo test

- name: Clippy
uses: actions-rs/cargo@v1
with:
command: clippy
run: cargo clippy

- name: Rust styling check
uses: actions-rs/cargo@v1
with:
command: fmt
args: --all -- --check
run: cargo fmt --all -- --check

- name: Ruby styling check
run: bundle exec rubocop --display-cop-names

- name: Tests
run: bundle exec rspec

- uses: actions/upload-artifact@v2
- uses: actions/upload-artifact@v4
with:
name: rusty_json_schema-${{matrix.target}}
path: ext/*.default
Expand All @@ -112,11 +101,11 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Set up Ruby
uses: ruby/setup-ruby@v1

- uses: actions/download-artifact@v2
- uses: actions/download-artifact@v4

- name: Unpack prebuild libraries
run: |
Expand All @@ -128,7 +117,7 @@ jobs:
- name: Build gem
run: gem build *.gemspec

- uses: actions/upload-artifact@v2
- uses: actions/upload-artifact@v4
with:
name: rusty_json_schema.gem
path: '*.gem'
Expand All @@ -143,20 +132,21 @@ jobs:
- windows-latest
- macos-latest
ruby:
- 2.6
- 2.7
- 3.0
- 3.1
- 3.2
- 3.3
- 3.4

runs-on: ${{ matrix.os }}

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby }}

- uses: actions/download-artifact@v2
- uses: actions/download-artifact@v4
with:
name: rusty_json_schema.gem

Expand All @@ -179,10 +169,10 @@ jobs:
needs: [wait-before-release]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- uses: actions/setup-ruby@v1
- uses: actions/download-artifact@v2

- uses: actions/download-artifact@v4

- name: remove old builds
run: |
Expand Down
2 changes: 1 addition & 1 deletion .rubocop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ require:
- rubocop-rspec

AllCops:
TargetRubyVersion: 2.6
TargetRubyVersion: 3.1
NewCops: enable
SuggestExtensions: false
Exclude:
Expand Down
4 changes: 2 additions & 2 deletions .tool-versions
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
ruby 2.6.0
rust 1.59.0
ruby 3.1.5
rust 1.85.0
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,13 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

## [1.0.0]
### Removed
- Support for old versions of Ruby (2.6, 2.7, 3.0)

### Added
- Support for newer versions of Ruby (3.1 to 3.4)

## [0.16.0]
### Changed
- Added support for linux aarch64
Expand Down
Loading

0 comments on commit 4a79f9b

Please sign in to comment.