forked from checkra1n/PongoOS
-
Notifications
You must be signed in to change notification settings - Fork 23
88 lines (73 loc) · 2.61 KB
/
ci.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
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
name: Build KPF & Pongo
on:
# Trigger on all pushes and pull requests
push:
pull_request:
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
jobs:
build:
runs-on: macos-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Update repository
run: |
git submodule update --init --recursive
git fetch --all
git reset --hard origin/$(git branch --show-current)
git submodule update --recursive --remote
- name: Compile KPF and Pongo
run: |
make
- name: Prepare upload directory
run: |
mkdir upload
mv build/Pongo.bin upload/
mv build/checkra1n-kpf-pongo upload/
- name: Get branch name
id: branch-name
uses: tj-actions/branch-names@v7
- name: Upload artifact
uses: wangyucode/[email protected]
with:
host: ${{ secrets.NICKCHAN_FTP_HOST }}
port: ${{ secrets.NICKCHAN_FTP_PORT }}
username: palera1n
password: ${{ secrets.NICKCHAN_FTP_PASS }}
forceUpload: true
dryRun: false
localDir: 'upload'
remoteDir: "/palera1n/artifacts/kpf/${{ steps.branch-name.outputs.ref_branch || github.ref }}"
test:
runs-on: ubuntu-22.04
container:
image: debian:stable
volumes:
- /:/mnt
options: --privileged
steps:
- name: Install packages
run: |
dpkg --add-architecture arm64
apt-get update
apt-get -y --allow-downgrades dist-upgrade
apt-get install -y build-essential git libc6:arm64 libbsd0:arm64 libbsd-dev:arm64 gcc-aarch64-linux-gnu libc6-arm64-cross libc6-dev-arm64-cross qemu-user qemu-user-binfmt clang lld curl zstd
- name: Checkout repository
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Compile KPF test
run:
make -C checkra1n/kpf-test KPF_CFLAGS="-target aarch64-linux-gnu -L/usr/aarch64-linux-gnu/lib -I/usr/aarch64-linux-gnu/include -L/usr/lib/gcc-cross/aarch64-linux-gnu/*" kpf-test.linux
- name: Free up space
run:
rm -rf /mnt/usr/share/dotnet /mnt/usr/local/lib/android /mnt/opt/ghc /mnt/opt/hostedtoolcache/CodeQL
- name: Get kernels
run: |
curl -Lu ${{ secrets.ACTIONS_RESOURCES_LOGIN }} https://static.palera.in/action-resources/kc.tar.zst | zstd -cdT0 | tar -x
- name: Test KPF
run: |
qemu-aarch64 ./checkra1n/kpf-test/kpf-test.linux -n kernel2;