Skip to content

Commit

Permalink
Use Homebrew to install LLVM/MLIR 18 (#37)
Browse files Browse the repository at this point in the history
* Fix

* Use Homebrew
  • Loading branch information
raviqqe authored Apr 23, 2024
1 parent 0239d8e commit 1bf6488
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 22 deletions.
27 changes: 5 additions & 22 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,43 +6,26 @@ on:
pull_request:
jobs:
test:
env:
MLIR_SYS_180_PREFIX: /usr/lib/llvm-18/
strategy:
fail-fast: false
matrix:
os:
- ubuntu-latest
# TODO Enable tests on macOS.
# - macos-12
- macos-14
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- uses: Swatinem/rust-cache@v2
- name: add llvm deb repository
uses: myci-actions/add-deb-repo@11
with:
repo: deb http://apt.llvm.org/jammy/ llvm-toolchain-jammy-18 main
repo-name: llvm-repo
keys-asc: https://apt.llvm.org/llvm-snapshot.gpg.key
- name: Install LLVM
run: sudo apt-get install llvm-18 llvm-18-dev llvm-18-runtime clang-18 clang-tools-18 lld-18 libpolly-18-dev libmlir-18-dev mlir-18-tools
- uses: Homebrew/actions/setup-homebrew@master
- run: tools/setup.sh
- run: cargo test
lint:
runs-on: ubuntu-latest
env:
MLIR_SYS_180_PREFIX: /usr/lib/llvm-18/
steps:
- uses: actions/checkout@v4
- uses: Swatinem/rust-cache@v2
- name: add llvm deb repository
uses: myci-actions/add-deb-repo@11
with:
repo: deb http://apt.llvm.org/jammy/ llvm-toolchain-jammy-18 main
repo-name: llvm-repo
keys-asc: https://apt.llvm.org/llvm-snapshot.gpg.key
- name: Install LLVM
run: sudo apt-get install llvm-18 llvm-18-dev llvm-18-runtime clang-18 clang-tools-18 lld-18 libpolly-18-dev libmlir-18-dev mlir-18-tools
- uses: Homebrew/actions/setup-homebrew@master
- run: tools/setup.sh
- run: cargo clippy -- -D warnings
format:
runs-on: ubuntu-latest
Expand Down
10 changes: 10 additions & 0 deletions tools/setup.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#!/bin/sh

set -e

llvm_version=17

brew update
brew install llvm@$llvm_version

echo MLIR_SYS_${llvm_version}0_PREFIX=$(brew --prefix llvm@$llvm_version) >>$GITHUB_ENV

0 comments on commit 1bf6488

Please sign in to comment.