forked from lizhuohua/rust-mir-checker
-
Notifications
You must be signed in to change notification settings - Fork 0
44 lines (35 loc) · 1.2 KB
/
build.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
name: build
on:
push:
branches: "**"
pull_request:
branches: [ master ]
env:
CARGO_TERM_COLOR: always
jobs:
build:
if: "!contains(github.event.head_commit.message, 'skip ci')"
runs-on: ubuntu-latest
steps:
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install libgmp-dev libmpfr-dev libppl-dev libz3-dev
- name: Get sources
uses: actions/checkout@v2
with:
submodules: true
- name: Install Rust components
run: rustup component add rustc-dev llvm-tools-preview
- name: Download LLVM binary
run: |
wget https://github.com/llvm/llvm-project/releases/download/llvmorg-15.0.6/clang+llvm-15.0.6-x86_64-linux-gnu-ubuntu-18.04.tar.xz
tar xvf clang+llvm-15.0.6-x86_64-linux-gnu-ubuntu-18.04.tar.xz
- name: Build
run: |
export LIBCLANG_PATH=$(pwd)/clang+llvm-15.0.6-x86_64-linux-gnu-ubuntu-18.04/lib/libclang.so
export PATH=$(pwd)/clang+llvm-15.0.6-x86_64-linux-gnu-ubuntu-18.04/bin:$PATH
export RUSTFLAGS="-Clink-args=-fuse-ld=lld"
cargo build --verbose
- name: Run tests
run: RUST_TEST_THREADS=1 cargo test --verbose