Skip to content

feat: EMLX compiled mode #61

feat: EMLX compiled mode

feat: EMLX compiled mode #61

Workflow file for this run

name: Test
on:
push:
branches:
- main
pull_request:
jobs:
macos:
name: macOS (${{ matrix.job.elixir }}, ${{ matrix.job.otp }})
runs-on: macos-14
strategy:
fail-fast: false
matrix:
job:
- { otp: "25.3.2.15", elixir: "1.15.4" }
- { otp: "25.3.2.15", elixir: "1.16.2", lint: true }
- { otp: "25.3.2.15", elixir: "1.16.2", build: true }
env:
MIX_ENV: test
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Elixir and Erlang
id: setup
run: |
curl -fsSO https://elixir-lang.org/install.sh
sh install.sh elixir@${{ matrix.job.elixir }} otp@${{ matrix.job.otp }}
OTP_VERSION="${{ matrix.job.otp }}"
OTP_MAJOR="${OTP_VERSION%%.*}"
export OTP_PATH=$HOME/.elixir-install/installs/otp/${OTP_VERSION}/bin
export ELIXIR_PATH=$HOME/.elixir-install/installs/elixir/${{ matrix.job.elixir }}-otp-${OTP_MAJOR}/bin
echo "path=${OTP_PATH}:${ELIXIR_PATH}" >> $GITHUB_OUTPUT
echo "${OTP_PATH}" >> $GITHUB_PATH
echo "${ELIXIR_PATH}" >> $GITHUB_PATH
- name: Setup Mix
run: |
mix local.hex --force
mix local.rebar --force
- name: Retrieve dependencies cache
env:
cache-name: cache-mix-deps
uses: actions/cache@v4
id: mix-cache # id to use in retrieve action
with:
path: ${{ github.workspace }}/deps
key: ${{ runner.os }}-Elixir-v${{ matrix.job.elixir }}-OTP-${{ matrix.job.otp }}-${{ hashFiles(format('{0}/mix.lock', github.workspace)) }}-v1
- name: Install dependencies
if: ${{ steps.mix-cache.outputs.cache-hit != 'true' }}
run: |
export PATH="${{ steps.setup.outputs.path }}:${PATH}"
mix deps.get
- name: Compile and check warnings
run: |
export PATH="${{ steps.setup.outputs.path }}:${PATH}"
if [ ${{ matrix.job.build }} = "true" ]; then
export LIBMLX_BUILD=true
fi
mix compile --warnings-as-errors
- name: Check formatting
if: ${{ matrix.job.lint }}
run: |
export PATH="${{ steps.setup.outputs.path }}:${PATH}"
if [ ${{ matrix.job.build }} = "true" ]; then
export LIBMLX_BUILD=true
fi
mix format --check-formatted
- name: Run epmd for distributed tests
run: |
export PATH="${{ steps.setup.outputs.path }}:${PATH}"
epmd -daemon
- name: Run tests
run: |
export PATH="${{ steps.setup.outputs.path }}:${PATH}"
if [ ${{ matrix.job.build }} = "true" ]; then
export LIBMLX_BUILD=true
fi
mix test --warnings-as-errors