Giter VIP home page Giter VIP logo

cross-gem-action's Introduction

Cross Gem Action

MIT licensed Join the discussion Continuous integration

This action makes it easy to compile and package native Rubygems that are written in Rust. Under the hood, it uses a customized version rake-compiler-dock to compile a gem, and is meant to be used in tandem with rb-sys.

Table of Contents

Example workflow

# Adjust this based on your release workflow
on:
  workflow_dispatch:

jobs:
  native_gem:
    name: Compile native gem
    runs-on: ubuntu-latest
    strategy:
      matrix:
        platform:
          - x86_64-linux
          - aarch64-linux
          - arm-linux
          - x86_64-darwin
          - arm64-darwin
          - x64-mingw32
          - x64-mingw-ucrt
    steps:
      - uses: actions/checkout@v2

      - uses: ruby/setup-ruby@v1
        with:
          ruby-version: '3.1'
          bundler-cache: true

      - uses: oxidize-rb/cross-gem-action@main
        with:
          platform: ${{ matrix.platform }}
          version: '0.9.27' # optional
          setup: | # optional
            echo "Do something custom before compiling..."
          env: | # optional
            RUBY_CC_VERSION=3.1.0:3.0.0:2.7.0
            SOME_OTHER_ENV=some_value

      - uses: actions/download-artifact@v3
        with:
          name: cross-gem
          path: pkg/

      - name: Display structure of built gems
        run: ls -R
        working-directory: pkg/

Inputs

Name Required Description Type Default
platform Target Ruby platform string
directory Directory of the Rakefile string
env Extra env to set in the container string
setup Custom setup script for the container string
version Version tag for the docker image to use string latest rb-sys version

License

This Action is distributed under the terms of the MIT license, see LICENSE for details.

cross-gem-action's People

Contributors

dependabot[bot] avatar ianks avatar

Stargazers

 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.