GithubHelp home page GithubHelp logo

kimburgess / install-crystal Goto Github PK

View Code? Open in Web Editor NEW

This project forked from crystal-lang/install-crystal

0.0 1.0 0.0 7.46 MB

GitHub Action: Install Crystal programming language

Home Page: https://crystal-lang.github.io/install-crystal/configurator.html

License: MIT License

Shell 4.00% JavaScript 95.77% Crystal 0.23%

install-crystal's Introduction

install-crystal

GitHub Action to install Crystal programming language and Shards package manager.

Works on Ubuntu, macOS, Windows.

Quickstart

Configurator: get a pre-made config for your exact use case!

Examples

steps:
  - uses: crystal-lang/install-crystal@v1
  - run: crystal eval "puts 1337"
steps:
  - uses: actions/checkout@v2
  - uses: crystal-lang/install-crystal@v1
    with:
      crystal: 0.35.1
  - run: shards install
  - run: crystal spec
    strategy:
      fail-fast: false
      matrix:
        include:
          - {os: ubuntu-latest, crystal: latest}
          - {os: ubuntu-latest, crystal: nightly}
          - {os: macos-latest}
          - {os: windows-latest}
    runs-on: ${{matrix.os}}
    steps:
      - uses: crystal-lang/install-crystal@v1
        with:
          crystal: ${{matrix.crystal}}
      - uses: actions/checkout@v2
      - run: shards install
      - run: crystal spec
      - run: crystal tool format && git diff --exit-code
        if: matrix.crystal == 'latest'

Find usages in the wild!

Alternatively, you can use the container-based approach as in the starter workflow (without this action), but the advantage here is the unified approach to installation across 3 systems. Using a custom container has disadvantages on its own, too.

Usage

Inputs

    • crystal: 0.35.1 (not supported on Windows)

      Install a particular release of Crystal.

    • crystal: latest (default; not supported on Windows)

      Install the latest released version of Crystal.

    • crystal: nightly (default on Windows)

      Install Crystal from the latest continuous build on crystal.git master.

    • shards: true (default)

      Ensure that some released version of Shards is available. This uses the build that's bundled with Crystal's releases. Other options are slower, as building Shards is a necessary step then.

    • shards: false

      Ensure that shards executable is not available.

    • shards: latest

      Build and install the latest released version of Shards.

    • shards: 0.13.0

      Build and install a particular release of Shards.

    • shards: nightly

      Build and install the latest commit of shards.git master.

  • arch: x86_64, arch: x86 (defaults to current OS arch)

    The architecture of the build of Crystal to download.

  • destination: some/path

    The directory to store Crystal in, after extracting. Will directly affect outputs.path (the default is in a temporary location).

  • token: ${{ github.token }}

    Personal access token (auto-populated).

Outputs

  • crystal (${{ steps.some_step_id.outputs.crystal }})

    The actual version of Crystal (as a ref in crystal-lang/crystal.git) that was installed.

  • shards (${{ steps.some_step_id.outputs.shards }})

    The actual version of Shards (as a ref in crystal-lang/shards.git) that was installed.

  • path (${{ steps.some_step_id.outputs.path }})

    The path where Crystal was extracted to, so you can use '[path]/bin/crystal', '[path]/src' etc.

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.