Skip to content

Commit b2dbf8c

Browse files
committed
Migrate to GitHub Actions
1 parent 07e8293 commit b2dbf8c

File tree

2 files changed

+68
-43
lines changed

2 files changed

+68
-43
lines changed
Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
paths:
8+
- 'src/drivers/**'
9+
- '.github/workflows/**'
10+
pull_request:
11+
types: [opened, synchronize]
12+
paths:
13+
- 'src/drivers/**'
14+
- '.github/workflows/**'
15+
16+
env:
17+
WORKSPACE: /home/runner
18+
19+
jobs:
20+
build:
21+
strategy:
22+
matrix:
23+
env:
24+
- { RPI_LINUX_VER: rpi-4.1.y, CONFIG_FILE: config-4.1.21-v7+, RPI_LINUX_COMMIT_HASH: ff45bc0 }
25+
- { RPI_LINUX_VER: rpi-4.4.y, CONFIG_FILE: config-4.4.38-v7+, RPI_LINUX_COMMIT_HASH: c95b7f1 }
26+
- { RPI_LINUX_VER: rpi-4.14.y, CONFIG_FILE: config-4.14.34-v7+, RPI_LINUX_COMMIT_HASH: f70eae4 }
27+
runs-on: ubuntu-latest
28+
steps:
29+
- uses: actions/checkout@v2
30+
31+
- name: Cache
32+
uses: actions/cache@v1
33+
with:
34+
path: ${HOME}/repo/raspberrypi
35+
key: ${{ runner.os }}-raspberrypi-cross-build-${{ matrix.env }}
36+
restore-keys: |
37+
${{ runner.os }}-raspberrypi-cross-build-
38+
39+
- name: Install cross-build settings
40+
id: cross-build
41+
run: |
42+
echo "::set-output name=driver-src-dir::$(echo ${GITHUB_WORKSPACE}/src/drivers)"
43+
echo "::set-output name=repository-dir::$(echo ${GITHUB_WORKSPACE})"
44+
mkdir -p ${HOME}/repo/raspberrypi
45+
if [ -e ${HOME}/repo/raspberrypi/tools ]; then (cd ${HOME}/repo/raspberrypi/tools && git pull); else (cd ${HOME}/repo/raspberrypi && git clone --depth 1 https://github.com/raspberrypi/tools.git); fi
46+
47+
- name: Install kernel headers
48+
env:
49+
REPOSITORY_DIR: ${{ steps.cross-build.outputs.repository-dir }}
50+
DRIVER_SRC_DIR: ${{ steps.cross-build.outputs.driver-src-dir }}
51+
RPI_LINUX_VER: ${{ matrix.env.RPI_LINUX_VER }}
52+
CONFIG_FILE: ${{ matrix.env.CONFIG_FILE }}
53+
RPI_LINUX_COMMIT_HASH: ${{ matrix.env.RPI_LINUX_COMMIT_HASH }}
54+
run: |
55+
if [ -e ${HOME}/repo/raspberrypi/linux ]; then (cd ${HOME}/repo/raspberrypi/linux && git fetch origin && git checkout ${RPI_LINUX_VER} && git pull); else (cd ${HOME}/repo/raspberrypi && git clone -b ${RPI_LINUX_VER} https://github.com/raspberrypi/linux.git); fi
56+
cd ${HOME}/repo/raspberrypi/linux && make clean && git reset --hard HEAD && git checkout $RPI_LINUX_COMMIT_HASH
57+
cp "${REPOSITORY_DIR}/.test/${CONFIG_FILE}" ${HOME}/repo/raspberrypi/linux/.config
58+
make CROSS_COMPILE=$HOME/repo/raspberrypi/tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian-x64/bin/arm-linux-gnueabihf- ARCH=arm oldconfig
59+
make CROSS_COMPILE=$HOME/repo/raspberrypi/tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian-x64/bin/arm-linux-gnueabihf- ARCH=arm -j 8
60+
61+
- name: Build kernel module
62+
env:
63+
REPOSITORY_DIR: ${{ steps.cross-build.outputs.repository-dir }}
64+
DRIVER_SRC_DIR: ${{ steps.cross-build.outputs.driver-src-dir }}
65+
run: |
66+
cd $DRIVER_SRC_DIR
67+
make -f $REPOSITORY_DIR/.test/Makefile.crosscompile
68+
make -f $REPOSITORY_DIR/.test/Makefile.crosscompile clean

.travis.yml

Lines changed: 0 additions & 43 deletions
This file was deleted.

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy