Skip to content

Bump syn from 2.0.72 to 2.0.77 #815

Bump syn from 2.0.72 to 2.0.77

Bump syn from 2.0.72 to 2.0.77 #815

Workflow file for this run

---
name: Integration
on:
push:
branches:
- main
pull_request: {}
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
test:
name: ${{ matrix.repo.slug }} (ruby=${{ matrix.ruby }}, os=${{ matrix.os }})
strategy:
fail-fast: false
matrix:
repo:
- name: "oxidize-rb/oxi-test"
slug: oxi-test
ref: ead2c358a6cde270863e686c7302fb56a333febc
run: bundle exec rake compile && bundle exec ruby -rminitest/autorun -Itest test/oxi/test_test.rb && cargo test
- name: "matsadler/magnus"
slug: magnus-0.5
ref: "0.5.5"
run: cargo test
- name: "matsadler/magnus"
slug: magnus-head
ref: "52a0817d4327cf78f91958f6b84f66946251fc9c"
run: cargo test
os: ["ubuntu-latest", "windows-latest", "macos-latest"]
rust: ["stable"]
ruby: ["3.0", "3.2", "3.3"]
runs-on: ${{ matrix.os }}
steps:
- name: Log matrix
shell: bash
env:
INPUTS: ${{ toJSON(matrix) }}
run: |
echo "$INPUTS" | jq
- uses: actions/checkout@v4
with:
repository: ${{ matrix.repo.name }}
ref: ${{ matrix.repo.ref }}
path: repo
- uses: actions/checkout@v4
with:
path: rb-sys
- uses: oxidize-rb/actions/setup-ruby-and-rust@v1
id: setup
with:
cache-version: v2
ruby-version: ${{ matrix.ruby }}
rustup-toolchain: ${{ matrix.rust }}
- name: ✏️ Replace rb-sys
shell: bash
run: |
cd ./repo
mkdir -p .cargo
echo >> .cargo/config.toml
echo "[patch.crates-io]" >> .cargo/config.toml
echo "rb-sys = { path = \"../rb-sys/crates/rb-sys\" }" >> .cargo/config.toml
cargo update -p rb-sys
echo "RUBYOPT=-I${{ github.workspace }}/rb-sys/gem/lib" >> $GITHUB_ENV
ruby -e "File.write('Gemfile', File.read('Gemfile').gsub(/gem .rb_sys.*$/, 'gem \"rb_sys\", path: \"../rb-sys/gem\"'))" || true
bundle install -j3 --retry 3 || true
- name: 🧪 Run tests for ${{ matrix.repo.slug }}
shell: bash
run: |
cd ./repo
${{ matrix.repo.run }}
dockerfile:
name: Bundle install in Dockerfile
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
repository: ${{ matrix.repo.name }}
ref: ${{ matrix.repo.ref }}
path: repo
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Generate Dockerfile
run: |
echo 'FROM ruby:3.3' > Dockerfile.issue
echo 'FROM ruby:3.3' > Dockerfile.issue
echo 'WORKDIR /app' >> Dockerfile.issue
echo 'RUN apt-get update -qq && \' >> Dockerfile.issue
echo ' apt-get install -y libclang-dev' >> Dockerfile.issue
echo 'COPY Gemfile.issue /app/Gemfile' >> Dockerfile.issue
echo "ADD ./repo/ /rb_sys" >> Dockerfile.issue
echo 'ENV RUBYOPT=-I/rb_sys/gem/lib' >> Dockerfile.issue
echo 'RUN bundle install --verbose --retry=3' >> Dockerfile.issue
cat Dockerfile.issue
- name: Generate Gemfile
run: |
echo 'source "https://rubygems.org"' > Gemfile.issue
echo "gem('rb_sys', path: '/rb_sys/gem')" >> Gemfile.issue
echo "gem('oxi-test', git: 'https://github.com/oxidize-rb/oxi-test', branch: :main)" >> Gemfile.issue
cat Gemfile.issue
- name: Build and push Docker image
uses: docker/build-push-action@v6
with:
context: .
file: ./Dockerfile.issue
push: false