GithubHelp home page GithubHelp logo

seanwallawalla-forks / setup-beam Goto Github PK

View Code? Open in Web Editor NEW

This project forked from erlef/setup-beam

1.0 2.0 0.0 761 KB

Set up your GitHub Actions workflow with OTP and Elixir

License: Other

JavaScript 77.75% Shell 4.36% Elixir 4.21% Erlang 5.50% PowerShell 8.18%

setup-beam's Introduction

setup-beam GitHub Actions GitHub Actions GitHub Actions

This action sets up an Erlang/OTP environment for use in a GitHub Actions workflow by:

  • installing Erlang/OTP
  • optionally, installing Elixir
  • optionally, installing Gleam
  • optionally, installing rebar3
  • optionally, installing hex

Note Currently, this action only supports Actions' ubuntu- and windows- runtimes.

Usage

See action.yml for the action's specification.

Note: The Erlang/OTP release version specification is relatively complex. For best results, we recommend specifying exact versions, and setting option version-type to strict. However, values like 22.x, or even >22, are also accepted, and we attempt to resolve them according to semantic versioning rules. This implicitly means version-type is loose, which is also the default value for this option.

Additionally, it is recommended that one specifies versions using YAML strings, as these examples do, so that numbers like 23.0 don't end up being parsed as 23, which is not equivalent.

For pre-release versions, such as v1.11.0-rc.0, use the full version specifier (v1.11.0-rc.0) and set option version-type to strict. Pre-release versions are opt-in, so 1.11.x will not match a pre-release.

Compatibility between Operating System and Erlang/OTP

This list presents the known working version combos between the target operating system and Erlang/OTP.

Operating system Erlang/OTP Status
ubuntu-16.04 17 - 24
ubuntu-18.04 17 - 24
ubuntu-20.04 20 - 24
windows-2016 21* - 24
windows-2019 21* - 24

Note *: prior to 23, Windows builds are only available for minor versions, e.g. 21.0, 21.3, 22.0, etc.

Self-hosted runners

Self-hosted runners need to set env. variable ImageOS to one of the following, since the action uses that to download assets:

ImageOS Operating system
ubuntu16 ubuntu-16.04
ubuntu18 ubuntu-18.04
ubuntu20 ubuntu-20.04
win16 windows-2016
win19 windows-2019

as per the following example:

...

jobs:
  test:
    runs-on: self-hosted
    env:
      ImageOS: ubuntu20 # equivalent to runs-on ubuntu-20.04
    steps:
      - uses: actions/checkout@v2
      - uses: erlef/setup-beam@v1
        ...

Example (Erlang/OTP + Elixir, on Ubuntu)

# create this in .github/workflows/ci.yml
on: push

jobs:
  test:
    runs-on: ubuntu-latest
    name: OTP ${{matrix.otp}} / Elixir ${{matrix.elixir}}
    strategy:
      matrix:
        otp: ['20.3', '21.3', '22.2']
        elixir: ['1.8.2', '1.9.4']
    steps:
      - uses: actions/checkout@v2
      - uses: erlef/setup-beam@v1
        with:
          otp-version: ${{matrix.otp}}
          elixir-version: ${{matrix.elixir}}
      - run: mix deps.get
      - run: mix test

Example (Erlang/OTP + rebar3, on Ubuntu)

# create this in .github/workflows/ci.yml
on: push

jobs:
  test:
    runs-on: ubuntu-latest
    name: Erlang/OTP ${{matrix.otp}} / rebar3 ${{matrix.rebar3}}
    strategy:
      matrix:
        otp: ['20.3', '21.3', '22.2']
        rebar3: ['3.14.1', '3.14.3']
    steps:
      - uses: actions/checkout@v2
      - uses: erlef/setup-beam@v1
        with:
          otp-version: ${{matrix.otp}}
          rebar3-version: ${{matrix.rebar3}}
      - run: rebar3 ct

Example (Erlang/OTP + rebar3, on Windows)

# create this in .github/workflows/ci.yml
on: push

jobs:
  test:
    runs-on: windows-2019
    steps:
      - uses: actions/checkout@v2
      - uses: erlef/setup-beam@v1
        with:
          otp-version: '24'
          rebar3-version: '3.16.1'
      - run: rebar3 ct

Example (Gleam + rebar3, on Ubuntu)

# create this in .github/workflows/ci.yml
on: push

jobs:
  test:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v2
      - uses: erlef/setup-beam@v1
        with:
          otp-version: '24'
          gleam-version: '0.16'
          rebar3-version: '3.16'
      - run: rebar3 ct

Elixir Problem Matchers

The Elixir Problem Matchers in this repository are adapted from here. See MATCHER_NOTICE for license details.

Action versioning

setup-beam has three version paths, described below, for example version 1.8.0:

  • @v1: the latest in the 1.y.z series (this tag is movable),
  • @v1.8: the latest in the 1.8.z series (this tag is movable),
  • @v1.8.0: release 1.8.0 (this tag is not movable).

To prevent issues in CI (unless you're OK with potential incompatibility between versions - we make real a effort to not introduce those without bumping major) we suggest you to use @vx.y.z, whenever possible.

License

The scripts and documentation in this project are released under the MIT license.

Contributing

Check out this doc.

Current Status

This action is in active development.

setup-beam's People

Contributors

jclem avatar paulo-ferraz-oliveira avatar ericmj avatar starbelly avatar deniskulicek avatar wojtekmach avatar btkostner avatar doughsay avatar ethomson avatar mijailr avatar thboop avatar myobie avatar nathany avatar

Stargazers

Sean P. Myrick V19.1.7.2 avatar

Watchers

 avatar Sean P. Myrick V19.1.7.2 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.