Publish 0.3.6 #1228
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-latest"] | |
otp: ["24.2", "25.0"] | |
elixir: ["1.13.0", "1.16.2"] | |
steps: | |
- uses: actions/checkout@v3 | |
name: Check-out beaver | |
- 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: goto-bus-stop/setup-zig@v2 | |
with: | |
version: 0.13.0 | |
- 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: | | |
python3 -m pip install mlir -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 | |
run: | | |
MIX_ENV=test mix compile.elixir_make | |
- name: Run smoke tests | |
run: | | |
mix test --force --only smoke | |
- name: Run tests | |
run: | | |
mix test --exclude vulkan --exclude todo | |
- uses: actions/upload-artifact@v3 | |
if: failure() | |
with: | |
name: beaver-tmp-${{ github.run_number }}-${{ github.run_attempt }} | |
path: ./tmp/**/*.zig |