-
Notifications
You must be signed in to change notification settings - Fork 6
65 lines (53 loc) · 1.89 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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
name: Build
on: [push, pull_request, workflow_dispatch]
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
# TODO: x86_64
arch: [arm64]
kernel: [{ack: 0, version: 5.15.153}, {ack: 1, version: android14-5.15-lts}]
env:
ACK: ${{ matrix.kernel.ack }}
ARCH: ${{ matrix.arch }}
ARTIFACTS_URL: https://github.com/gsingh93/linux-exploit-dev-env/releases/download/2024.04.07-ebc24a8
HEADERS_URL: https://github.com/gsingh93/linux-exploit-dev-env/releases/download/linux-headers-2024.04.07-ebc24a8
steps:
- name: Clone Linux Exploit Dev Environment
uses: actions/checkout@v4
with:
repository: gsingh93/linux-exploit-dev-env
- name: Clone build rules for art-kt
uses: actions/checkout@v4
with:
repository: gsingh93/linux-exploit-dev-env-art-kt
submodules: true
path: external/art-kt
- name: Download kernel artifacts
shell: bash
run: |
set -x
if [ $ACK -eq 0 ]; then
KERNEL_TYPE=linux
else
KERNEL_TYPE=ack
fi
if [ $ARCH == x86_64 ]; then
KERNEL_IMAGE_NAME=bzImage
elif [ $ARCH == arm64 ]; then
KERNEL_IMAGE_NAME=Image
fi
SUFFIX=${KERNEL_TYPE}-${{ matrix.kernel.version }}-${ARCH}
wget --no-verbose ${ARTIFACTS_URL}/vmlinux-${SUFFIX}
wget --no-verbose ${ARTIFACTS_URL}/${KERNEL_IMAGE_NAME}-${SUFFIX}
wget --no-verbose ${ARTIFACTS_URL}/alpine-${ARCH}.img
wget --no-verbose ${HEADERS_URL}/linux-headers-${SUFFIX}.deb
dpkg-deb -R linux-headers-${SUFFIX}.deb linux-headers
- run: ls -lR
- name: Build art-kt
shell: bash
run: |
set -x
make $PWD/toolchain/clang
LINUX_OUT=$PWD/linux-headers/usr/src/linux-headers-* make art-kt