ARM builder image #1397
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Elixir CI | |
on: | |
pull_request: | |
paths-ignore: | |
- "*.md" | |
- "**/*.md" | |
- "LICENSE*" | |
workflow_dispatch: | |
inputs: | |
mlir_wheel_version: | |
description: "mlir wheel version to install" | |
required: false | |
workflow_call: | |
inputs: | |
mlir_wheel_version: | |
description: "mlir wheel version to install" | |
type: string | |
required: false | |
permissions: | |
contents: read | |
concurrency: | |
group: build-and-test-${{ github.ref }}-${{ inputs.mlir_wheel_version }} | |
cancel-in-progress: true | |
jobs: | |
build: | |
name: otp${{matrix.otp}}-ex${{matrix.elixir}} / ${{matrix.runs-on}} | |
runs-on: ${{matrix.runs-on}} | |
strategy: | |
fail-fast: false | |
matrix: | |
runs-on: ["ubuntu-22.04"] | |
otp: ["24.2", "25.0"] | |
elixir: ["1.13.0", "1.16.2", "1.17.2"] | |
exclude: | |
- otp: "24.2" | |
elixir: "1.17.2" | |
include: | |
- runs-on: "ubuntu-22.04" | |
otp: "27.0.1" | |
elixir: "1.17.2" | |
steps: | |
- uses: actions/checkout@v3 | |
name: Check-out beaver | |
- uses: actions/checkout@v3 | |
name: Check-out kinda | |
with: | |
repository: beaver-lodge/kinda | |
path: kinda | |
- run: mv kinda .. | |
- uses: actions/checkout@v3 | |
name: Check-out Kinda | |
if: contains(github.event.pull_request.labels.*.name, 'checkout_kinda') | |
with: | |
repository: beaver-lodge/kinda | |
path: kinda_local | |
ref: remove-meta | |
- run: echo "BEAVER_KINDA_PATH=${PWD}/kinda_local" >> $GITHUB_ENV | |
if: contains(github.event.pull_request.labels.*.name, 'checkout_kinda') | |
- uses: erlef/setup-beam@v1 | |
with: | |
otp-version: ${{matrix.otp}} | |
elixir-version: ${{matrix.elixir}} | |
- name: Set up Zig | |
uses: mlugg/setup-zig@v1 | |
with: | |
version: 0.13.0 | |
- uses: Jimver/cuda-toolkit@master | |
id: cuda-toolkit | |
with: | |
use-github-cache: false | |
log-file-suffix: '${{matrix.runs-on}}-otp${{matrix.otp}}-ex${{matrix.elixir}}.txt' | |
sub-packages: '["nvcc"]' | |
method: network | |
- name: Check formatting of Zig | |
run: | | |
zig fmt --check native/src native/build.zig | |
- uses: actions/setup-python@v4 | |
with: | |
python-version: "3.11" | |
- name: Restore dependencies cache | |
uses: actions/cache@v3 | |
with: | |
path: deps | |
key: ${{ runner.os }}-mix-${{ hashFiles('**/mix.lock') }} | |
restore-keys: ${{ runner.os }}-mix- | |
- name: Install dependencies | |
run: mix deps.get | |
- uses: seanmiddleditch/gha-setup-ninja@master | |
- name: Install MLIR (specified version), via ${{ github.event_name }} | |
if: github.event_name == 'workflow_dispatch' && inputs.mlir_wheel_version != 'latest' | |
run: | | |
python3 -m pip install mlir=="${{ inputs.mlir_wheel_version }}" -f https://makslevental.github.io/wheels -U | |
echo "LLVM_CONFIG_PATH=$(python3 -c 'import mlir;print(mlir.__path__[0])')/bin/llvm-config" >> "$GITHUB_ENV" | |
- name: Install MLIR (latest), via ${{ github.event_name }} | |
if: inputs.mlir_wheel_version == 'latest' || (github.event_name == 'pull_request' && contains(github.event.pull_request.labels.*.name, 'use-latest-mlir')) | |
run: | | |
latest_version=$(curl -Ls https://makslevental.github.io/wheels | grep -oh '[0-9.]*+cuda.[a-z0-9]*' | tail -n 1) | |
python3 -m pip install "mlir==${latest_version}" -f https://makslevental.github.io/wheels -U | |
echo "LLVM_CONFIG_PATH=$(python3 -c 'import mlir;print(mlir.__path__[0])')/bin/llvm-config" >> "$GITHUB_ENV" | |
- name: Install MLIR (fixed version), via ${{ github.event_name }} | |
if: github.event_name == 'pull_request' && !contains(github.event.pull_request.labels.*.name, 'use-latest-mlir') | |
run: | | |
python3 -m pip install -r dev-requirements.txt | |
echo "LLVM_CONFIG_PATH=$(python3 -c 'import mlir;print(mlir.__path__[0])')/bin/llvm-config" >> "$GITHUB_ENV" | |
- name: Build native library | |
env: | |
MIX_ENV: test | |
run: | | |
mix compile.elixir_make | |
- name: Run smoke tests | |
run: | | |
mix test --force --only smoke | |
- name: Check formatting of Elixir | |
if: matrix.elixir != '1.13.0' | |
env: | |
MIX_ENV: test | |
run: | | |
mix format --check-formatted | |
- name: Run tests | |
run: | | |
mix test --exclude vulkan --exclude todo | |
- name: Run dev build | |
run: | | |
mix | |
mix credo | |
mix elixir_make.checksum --only-local --ignore-unavailable --print | |
mix hex.build | |
- name: Run overhead profiling | |
if: matrix.otp == '27.0.1' | |
run: | | |
mix profile.tprof --no-compile profile/enif_add_overhead.exs |