Skip to content

Commit

Permalink
rewrite ci
Browse files Browse the repository at this point in the history
  • Loading branch information
unsign3d committed Feb 26, 2025
1 parent 82ef673 commit f93c591
Showing 1 changed file with 15 additions and 28 deletions.
43 changes: 15 additions & 28 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,16 +26,10 @@ 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

# 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 +56,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 +74,21 @@ jobs:
ls -l ext/
- name: Rust test
uses: actions-rs/cargo@v1
with:
command: test
run: cargo test --target ${{matrix.target}}

- 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: cargp 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 +99,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 +115,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 @@ -150,13 +137,13 @@ jobs:
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 +166,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

0 comments on commit f93c591

Please sign in to comment.