-
Notifications
You must be signed in to change notification settings - Fork 38
72 lines (63 loc) · 2.06 KB
/
ci-qemu.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
name: ci-qemu
on:
push:
branches: [master]
paths:
- '.github/workflows/ci-qemu.yml'
- '*.h'
- '*.c'
pull_request:
branches: [master]
paths:
- '.github/workflows/ci-qemu.yml'
- '*.h'
- '*.c'
concurrency:
group: ci-qemu-${{ github.ref }}
cancel-in-progress: true
permissions:
contents: read
jobs:
ubuntu:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: cross-toolchain
run: |
sudo apt-get update
sudo apt-get install qemu-user-static \
gcc-arm-linux-gnueabi \
gcc-aarch64-linux-gnu \
gcc-mipsel-linux-gnu \
gcc-mips64el-linux-gnuabi64 \
gcc-powerpc-linux-gnu \
gcc-powerpc64le-linux-gnu \
gcc-riscv64-linux-gnu
- name: build-test-arm
run: |
arm-linux-gnueabi-gcc -march=armv7-a main.c -o ruapu-arm
qemu-arm-static -L /usr/arm-linux-gnueabi ./ruapu-arm
- name: build-test-aarch64
run: |
aarch64-linux-gnu-gcc -march=armv8-a main.c -o ruapu-aarch64
qemu-aarch64-static -L /usr/aarch64-linux-gnu ./ruapu-aarch64
- name: build-test-mipsel
run: |
mipsel-linux-gnu-gcc -march=mips32 main.c -o ruapu-mipsel
qemu-mipsel-static -L /usr/mipsel-linux-gnu ./ruapu-mipsel
- name: build-test-mips64el
run: |
mips64el-linux-gnuabi64-gcc -march=mips64 main.c -o ruapu-mips64el
qemu-mips64el-static -L /usr/mips64el-linux-gnuabi64 ./ruapu-mips64el
- name: build-test-powerpc
run: |
powerpc-linux-gnu-gcc -mcpu=powerpc main.c -o ruapu-powerpc
qemu-ppc-static -L /usr/powerpc-linux-gnu ./ruapu-powerpc
- name: build-test-powerpc64le
run: |
powerpc64le-linux-gnu-gcc -mcpu=powerpc64le main.c -o ruapu-powerpc64le
qemu-ppc64le-static -L /usr/powerpc64le-linux-gnu ./ruapu-powerpc64le
- name: build-test-riscv64
run: |
riscv64-linux-gnu-gcc -march=rv64gc main.c -o ruapu-riscv64
qemu-riscv64-static -L /usr/riscv64-linux-gnu ./ruapu-riscv64