-
Notifications
You must be signed in to change notification settings - Fork 72
52 lines (49 loc) · 1.8 KB
/
cross.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
name: docker cross build
on: [push, pull_request]
# Notes:
#
# - There is harmless warning:
#
# "[Warning] The requested image's platform (linux/arm64/v8) does not
# match the detected host platform (linux/amd64) and no specific
# platform was requested"
#
# It's hard to remove, perhaps, because we using 'build' and not 'buildx',
# which requires more setup.
#
# - git clean is not necessarily on GA, but added so it's easier to copy-paste
# Dockerfile for manual runs.
jobs:
cross:
runs-on: ubuntu-22.04
strategy:
fail-fast: false
matrix:
include:
- image: arm64v8/ubuntu:jammy
platform: linux/arm64
packages: libelf-dev linux-headers-generic
- image: arm32v7/alt:latest
platform: linux/arm/v7
packages: elfutils kernel-headers-modules-std-def
- image: i386/ubuntu:bionic
platform: linux/386
packages: libelf-dev linux-headers-generic
steps:
- uses: docker/setup-qemu-action@v2
- uses: actions/checkout@v3
- name: Create Dockerfile
run: |
cat <<EOF >Dockerfile
FROM ${{ matrix.image }}
RUN apt-get -y update && \
apt-get install -y git file gcc make ${{ matrix.packages }}
WORKDIR /src
COPY . .
RUN git clean -dxfq
RUN gcc -v; cat /etc/os-release
RUN make -j\$(nproc) KERNELRELEASE=\$(cd /lib/modules; ls)
RUN file lkrg.ko
EOF
- run: docker build --platform=${{ matrix.platform }} .
# vim: sw=4