Skip to content

Commit 65598fd

Browse files
committed
Update CI build.yaml
1 parent cb388d7 commit 65598fd

File tree

1 file changed

+37
-12
lines changed

1 file changed

+37
-12
lines changed

.github/workflows/build.yaml

Lines changed: 37 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,49 @@
1-
name: Build ARM user
1+
name: Build target user
22

33
on: [pull_request, workflow_dispatch]
44

55
jobs:
66
build:
77
runs-on: ubuntu-latest
88
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
1014
- 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
1125
run: |
12-
apt --no-install-recommends -y build-dep qemu
13-
apt install autoconf libtool protobuf-c-compiler
1426
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
1932
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
2449

0 commit comments

Comments
 (0)