Skip to content

Pin nightly and use the same magnus version #949

Pin nightly and use the same magnus version

Pin nightly and use the same magnus version #949

Workflow file for this run

---
name: CI
on:
workflow_dispatch:
push:
branches: ["**"]
tags-ignore: ["v**"] # Skip CI for releases
pull_request:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
env:
RSPEC_FORMATTER: doc
jobs:
ci-data:
runs-on: ubuntu-latest
outputs:
result: ${{ steps.fetch.outputs.result }}
steps:
- id: fetch
uses: oxidize-rb/actions/fetch-ci-data@v1
ci:
runs-on: ${{ matrix.os }}
needs: ci-data
strategy:
fail-fast: false
matrix:
os: ["ubuntu-latest", "macos-latest", "windows-latest"]
ruby: ${{ fromJSON(needs.ci-data.outputs.result).stable-ruby-versions }}
include:
- os: windows-latest
ruby: mswin
steps:
- uses: actions/checkout@v3
- name: Remove Gemfile.lock
run: rm Gemfile.lock
- uses: oxidize-rb/actions/setup-ruby-and-rust@v1
with:
ruby-version: ${{ matrix.ruby }}
bundler-cache: true
cargo-cache: true
cache-version: v5
- name: Compile rust ext
run: bundle exec rake compile:release
- name: Run ruby tests
run: bundle exec rake spec
- name: Run ruby tests (hard-mode with GC.stress)
run: bundle exec rake spec
env:
GC_STRESS: "true"
- name: Run examples
run: bundle exec rake examples
- name: Run benchmarks
run: bundle exec rake bench:all
- name: Lint ruby
run: bundle exec rake standard
- name: Lint rust
run: cargo clippy -- -D warnings && cargo fmt --check
build_doc:
runs-on: ubuntu-latest
steps:
- name: Derive nightly version
run: |
version="$(cat NIGHTLY_VERSION)"
echo "NIGHTLY_VERSION=$version" >> $GITHUB_ENV
- uses: actions/checkout@v3
- name: Remove Gemfile.lock
run: rm Gemfile.lock
- uses: oxidize-rb/actions/setup-ruby-and-rust@v1
with:
ruby-version: "3.2"
rustup-toolchain: "${{ env.NIGHTLY_VERSION }}"
bundler-cache: true
cargo-cache: true
cache-version: v1
- name: Compile rust ext
run: bundle exec rake compile
- name: Generate doc
run: bundle exec rake doc
- name: Upload generated doc
uses: actions/upload-artifact@v3
with:
name: doc
path: doc
retention-days: 1
- name: Publish doc
if: contains(github.ref, 'refs/tags/v') || github.ref == 'refs/heads/main'
uses: ./.github/actions/publish-doc