-
Notifications
You must be signed in to change notification settings - Fork 456
79 lines (71 loc) · 2.53 KB
/
driver-cross-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
66
67
68
69
70
71
72
73
74
75
76
77
78
name: CI
on:
push:
branches:
- master
paths:
- '.github/workflows/driver-cross-build.yml'
- '.test/bin/**'
- '.test/lint.sh'
- 'src/drivers/**'
pull_request:
types: [opened, synchronize]
paths:
- '.github/workflows/driver-cross-build.yml'
- '.test/bin/**'
- '.test/lint.sh'
- 'src/drivers/**'
jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
with:
python-version: '3.x'
- name: Lint
run: |
./.test/lint.sh
build:
needs: lint
strategy:
fail-fast: false
matrix:
env:
- { RPI_LINUX_VER: rpi-4.1.y, CONFIG_FILE: config-4.1.21-v7+, RPI_LINUX_COMMIT_HASH: ff45bc0, GCC_VER: 4.8 }
- { RPI_LINUX_VER: rpi-4.4.y, CONFIG_FILE: config-4.4.38-v7+, RPI_LINUX_COMMIT_HASH: c95b7f1, GCC_VER: 4.8 }
- { RPI_LINUX_VER: rpi-4.14.y, CONFIG_FILE: config-4.14.34-v7+, RPI_LINUX_COMMIT_HASH: f70eae4, GCC_VER: 4.8 }
- { RPI_LINUX_VER: rpi-5.4.y, CONFIG_FILE: config-5.4.83-v7+, RPI_LINUX_COMMIT_HASH: 76c49e6, GCC_VER: 6.3 }
- { RPI_LINUX_VER: rpi-5.4.y, CONFIG_FILE: config-5.4.83-v7+, RPI_LINUX_COMMIT_HASH: 76c49e6, GCC_VER: 8.3 }
- { RPI_LINUX_VER: rpi-5.10.y, CONFIG_FILE: config-5.10.11-v7+, RPI_LINUX_COMMIT_HASH: 6af8ae3, GCC_VER: 6.3 }
- { RPI_LINUX_VER: rpi-5.10.y, CONFIG_FILE: config-5.10.11-v7+, RPI_LINUX_COMMIT_HASH: 6af8ae3, GCC_VER: 8.3 }
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Install cross-build settings
id: gcc
env:
GCC_VER: ${{ matrix.env.GCC_VER }}
SRC_DIR: ${{ github.workspace }}
run: |
source ./.test/step0.sh
prepare_cross_compiler
echo "::set-output name=path::${CROSS_COMPILE_PATH}"
- name: Install kernel headers
env:
RPI_LINUX_VER: ${{ matrix.env.RPI_LINUX_VER }}
CONFIG_FILE: ${{ matrix.env.CONFIG_FILE }}
RPI_LINUX_COMMIT_HASH: ${{ matrix.env.RPI_LINUX_COMMIT_HASH }}
GCC_VER: ${{ matrix.env.GCC_VER }}
CROSS_COMPILE_PATH: ${{ steps.gcc.outputs.path }}
SRC_DIR: ${{ github.workspace }}
run: |
source ./.test/step1.sh
install_kernel_headers
- name: Build kernel module
env:
CROSS_COMPILE_PATH: ${{ steps.gcc.outputs.path }}
SRC_DIR: ${{ github.workspace }}
run: |
source ./.test/step2.sh
build_kernel_module