Add macos-11 release #717
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*" | |
schedule: | |
- cron: "00 05 * * *" | |
workflow_dispatch: | |
inputs: | |
mlir_wheel_version: | |
description: "mlir wheel version to install" | |
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.15.0"] | |
steps: | |
- uses: actions/checkout@v3 | |
- 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.11.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 (${{ inputs.mlir_wheel_version }}), via ${{ github.event_name }} | |
if: github.event_name == 'workflow_dispatch' && inputs.mlir_wheel_version != '' | |
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) | |
if: github.event_name == 'schedule' || (github.event_name == 'workflow_dispatch' && inputs.mlir_wheel_version == '') || (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 | |
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 CMake | |
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 |