-
Notifications
You must be signed in to change notification settings - Fork 0
45 lines (39 loc) · 1.48 KB
/
get_syscall.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
# gets linux syscall.h values on each target,
# creates rust files with constants
# and uploads them as artifacts.
name: get syscall.h values as rust constants
on:
workflow_dispatch:
jobs:
syscalls:
name: "get syscall.h values for ${{ matrix.config.target }}"
runs-on: ubuntu-latest
permissions:
contents: read
checks: write
strategy:
fail-fast: false
matrix:
config:
- {target: x86_64-unknown-linux-gnu, docker_image: amd64/ubuntu}
- {target: i686-unknown-linux-gnu, docker_image: i386/ubuntu}
- {target: aarch64-unknown-linux-gnu, docker_image: arm64v8/ubuntu}
- {target: armv7-unknown-linux-gnueabihf, docker_image: arm32v7/ubuntu}
- {target: riscv64gc-unknown-linux-gnu, docker_image: riscv64/ubuntu}
steps:
- name: "checkout repo"
uses: actions/checkout@v4
- name: "Set up QEMU"
uses: docker/setup-qemu-action@v3
- name: "get syscall.h values"
run: |
docker run --rm -v $PWD:/workdir -w /workdir ${{ matrix.config.docker_image }} /bin/bash -c "
apt-get update && apt-get install -y apt-utils && apt-get install -y gcc && \
./utils/get_syscall.sh ${{ matrix.config.target }}
"
- name: "Upload syscall files"
uses: actions/upload-artifact@v4
with:
name: "exported_syscall_rust_consts"
path: syscall_${{ matrix.config.target }}.rs
if-no-files-found: error