|
1 |
| -name: Build ARM user |
| 1 | +name: Build target user |
2 | 2 |
|
3 | 3 | on: [pull_request, workflow_dispatch]
|
4 | 4 |
|
5 | 5 | jobs:
|
6 | 6 | build:
|
7 | 7 | runs-on: ubuntu-latest
|
8 | 8 | steps:
|
9 |
| - - uses: actions/checkout@v3 |
| 9 | + - uses: actions/checkout@tracewrap-8.1 |
| 10 | + - name: Copy source.list file to include deb-src |
| 11 | + run: | |
| 12 | + sudo cp /etc/apt/sources.list /etc/apt/sources.list.d/tmp.list |
| 13 | + sudo sed -i "s/# deb-src/deb-src/g" /etc/apt/sources.list.d/tmp.list |
10 | 14 | - name: Install deps
|
| 15 | + sudo apt-get update |
| 16 | + sudo apt-get --no-install-recommends -y build-dep qemu |
| 17 | + sudo apt-get install -y autoconf libtool protobuf-c-compiler |
| 18 | + - name: Install OCaml |
| 19 | + uses: ocaml/setup-ocaml@v2 |
| 20 | + with: |
| 21 | + ocaml-compiler: 4.14.x |
| 22 | + dune-cache: true |
| 23 | + opam-disable-sandboxing: true |
| 24 | + - name: Install piqi |
11 | 25 | run: |
|
12 |
| - apt --no-install-recommends -y build-dep qemu |
13 |
| - apt install autoconf libtool protobuf-c-compiler |
14 | 26 | opam install piqi
|
15 |
| - cs /root |
16 |
| - git clone https://github.com/BinaryAnalysisPlatform/bap-frames.git |
17 |
| - git clone git@github.com:BinaryAnalysisPlatform/qemu.git |
18 |
| - - name: Build for ARM |
| 27 | + - name: Clone qemu and bap-frames |
| 28 | + run: | |
| 29 | + git clone http://github.com/BinaryAnalysisPlatform/bap-frames.git |
| 30 | + git clone http://github.com/BinaryAnalysisPlatform/qemu.git |
| 31 | + - name: Build target |
19 | 32 | run: |
|
20 |
| - cd qemu |
21 |
| - ./configure --prefix=$HOME --with-tracewrap="/root/bap-frames" --target-list=arm-linux-user |
22 |
| - ninja -C build |
23 |
| - ninja -C build install |
| 33 | + branch=$(git rev-parse --abbrev-ref HEAD) |
| 34 | + if [ "$branch" == "tracewrap-8.1" ]; then |
| 35 | + # No build test needed |
| 36 | + exit 0 |
| 37 | + fi |
| 38 | + echo "NOTE:" |
| 39 | + echo "Please update this workflow so it builds the target you are working on." |
| 40 | + echo "See the commented lines for an example." |
| 41 | + exit 1 |
| 42 | + # Don't forget to checkout your tracewrap branch above udner "uses"! |
| 43 | + # |
| 44 | + # Build commands: |
| 45 | + # cd qemu |
| 46 | + # ./configure --prefix=$HOME --with-tracewrap="/root/bap-frames" --target-list=arm-linux-user |
| 47 | + # ninja -C build |
| 48 | + # ninja -C build install |
24 | 49 |
|
0 commit comments