This repository has been archived by the owner on Jul 22, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 53
65 lines (58 loc) · 1.82 KB
/
native-tests.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
name: Test Cairo Native Integration
on:
merge_group:
push:
branches:
- main
pull_request:
branches:
- '**'
jobs:
fresh_run:
strategy:
fail-fast: false
matrix:
include:
- os: debian-12
deps_suffix: ''
runs-on: ${{ matrix.os }}
env:
MLIR_SYS_170_PREFIX: /usr/lib/llvm-17/
TABLEGEN_170_PREFIX: /usr/lib/llvm-17/
name: "Make deps, build & test on fresh ${{ matrix.os }} system"
steps:
- uses: actions/checkout@v3
- name: Set RUSTUP_HOME and PATH env vars
if: matrix.os == 'debian-12'
run: |
echo "RUSTUP_HOME=/root/.cargo" >> $GITHUB_ENV
echo "PATH=${PATH}:/root/.cargo/bin" >> $GITHUB_ENV
- name: Install rust
uses: dtolnay/rust-toolchain@stable
- name: add llvm deb repository
uses: myci-actions/add-deb-repo@10
with:
repo: deb http://apt.llvm.org/jammy/ llvm-toolchain-jammy-17 main
repo-name: llvm-repo
keys-asc: https://apt.llvm.org/llvm-snapshot.gpg.key
- name: Install LLVM
run: sudo apt-get install -y llvm-17 llvm-17-dev llvm-17-runtime clang-17 clang-tools-17 lld-17 libpolly-17-dev libmlir-17-dev mlir-17-tools
- name: Install pyenv
uses: "gabrielfalcao/pyenv-action@v13"
- name: Run make deps${{ matrix.deps_suffix }}
id: deps
run: make deps${{ matrix.deps_suffix }}
- name: Run make test-cairo-native
id: test-cairo-native
run: |
. starknet-venv/bin/activate; \
make test-cairo-native
- name: Check which step failed
if: failure()
run: |
if [ ${{ steps.deps.outcome }} = failure ]; then
FAILED_TARGET=deps${{ matrix.deps_suffix }}
else
FAILED_TARGET=test
fi
echo "FAILED_TARGET=$FAILED_TARGET" >> $GITHUB_ENV