Bump magnus again #936
Workflow file for this run
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
--- | |
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: | |
- uses: actions/checkout@v3 | |
- name: Remove Gemfile.lock | |
run: rm Gemfile.lock | |
- name: Figure out nightly version | |
run: | | |
version="$(grep -oE 'NIGHTLY_VERSION = "[^"]+' rakelib/doc.rake | cut -d'"' -f2)" | |
echo "NIGHTLY_VERSION=$version" >> $GITHUB_ENV | |
- 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 |