-
Notifications
You must be signed in to change notification settings - Fork 6
70 lines (61 loc) · 2.57 KB
/
llvm-quick-fuzz.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
66
67
68
69
70
name: llvm-quick-fuzz
on:
workflow_dispatch:
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [macos-latest]
ghc: ["8.10.2"]
llvm: [ "https://github.com/llvm/llvm-project/releases/download/llvmorg-11.0.0/clang+llvm-11.0.0-x86_64-apple-darwin.tar.xz"
, "https://github.com/llvm/llvm-project/releases/download/llvmorg-10.0.1/clang+llvm-10.0.1-x86_64-apple-darwin.tar.xz"
, "https://github.com/llvm/llvm-project/releases/download/llvmorg-9.0.1/clang+llvm-9.0.1-x86_64-apple-darwin.tar.xz"
, "https://releases.llvm.org/8.0.0/clang+llvm-8.0.0-x86_64-apple-darwin.tar.xz"
]
name: llvm-quick-fuzz - GHC v${{ matrix.ghc }} - ${{ matrix.os }}
steps:
- uses: actions/checkout@v2
with:
submodules: true
- uses: actions/setup-haskell@v1
id: setup-haskell
with:
ghc-version: ${{ matrix.ghc }}
- uses: actions/cache@v2
name: Cache cabal store
with:
path: |
${{ steps.setup-haskell.outputs.cabal-store }}
dist-newstyle
key: cabal-${{ runner.os }}-${{ matrix.ghc }}-${{ hashFiles(format('cabal.GHC-{0}.config', matrix.ghc)) }}-${{ github.sha }}
restore-keys: |
cabal-${{ runner.os }}-${{ matrix.ghc }}-${{ hashFiles(format('cabal.GHC-{0}.config', matrix.ghc)) }}-
- shell: bash
run: brew install csmith creduce
- shell: bash
name: Clone llvm-pretty
run: git clone https://github.com/elliottt/llvm-pretty
- shell: bash
name: Install LLVM
run: |
curl -L ${{ matrix.llvm }} -o llvm.tar.xz
tar xzf llvm.tar.xz
mv clang+llvm-*-x86_64-apple-darwin llvm
echo "$PWD/llvm/bin" >> $GITHUB_PATH
- shell: bash
name: Build
run: cabal build -ffuzz llvm-disasm fuzz-llvm-disasm
- shell: bash
name: Copy binaries
run: |
cp $PWD/llvm/bin/clang $PWD/llvm/bin/clangy
ls -Fl@ $(cabal exec -ffuzz which fuzz-llvm-disasm)
file $(cabal exec -ffuzz which fuzz-llvm-disasm)
xattr -lv $(cabal exec -ffuzz which fuzz-llvm-disasm)
- shell: bash
name: Run fuzzing
run: cabal exec -ffuzz fuzz-llvm-disasm -- -n 5 --junit-xml results.xml -o results --collapse -I /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include --clang-flags="-O -w" --clang-flags="-O -w -g" -c clangy
env:
CSMITH_PATH: "/usr/local/Cellar/csmith/2.3.0/include/csmith-2.3.0"