From b2dbf8c460ecafdb9e5198d99f03ea63f4d56186 Mon Sep 17 00:00:00 2001 From: Daisuke Sato Date: Mon, 13 Apr 2020 17:05:07 +0900 Subject: [PATCH 1/8] Migrate to GitHub Actions --- .github/workflows/driver-cross-build.yml | 68 ++++++++++++++++++++++++ .travis.yml | 43 --------------- 2 files changed, 68 insertions(+), 43 deletions(-) create mode 100644 .github/workflows/driver-cross-build.yml delete mode 100644 .travis.yml diff --git a/.github/workflows/driver-cross-build.yml b/.github/workflows/driver-cross-build.yml new file mode 100644 index 0000000..bd18d9e --- /dev/null +++ b/.github/workflows/driver-cross-build.yml @@ -0,0 +1,68 @@ +name: CI + +on: + push: + branches: + - master + paths: + - 'src/drivers/**' + - '.github/workflows/**' + pull_request: + types: [opened, synchronize] + paths: + - 'src/drivers/**' + - '.github/workflows/**' + +env: + WORKSPACE: /home/runner + +jobs: + build: + strategy: + matrix: + env: + - { RPI_LINUX_VER: rpi-4.1.y, CONFIG_FILE: config-4.1.21-v7+, RPI_LINUX_COMMIT_HASH: ff45bc0 } + - { RPI_LINUX_VER: rpi-4.4.y, CONFIG_FILE: config-4.4.38-v7+, RPI_LINUX_COMMIT_HASH: c95b7f1 } + - { RPI_LINUX_VER: rpi-4.14.y, CONFIG_FILE: config-4.14.34-v7+, RPI_LINUX_COMMIT_HASH: f70eae4 } + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + + - name: Cache + uses: actions/cache@v1 + with: + path: ${HOME}/repo/raspberrypi + key: ${{ runner.os }}-raspberrypi-cross-build-${{ matrix.env }} + restore-keys: | + ${{ runner.os }}-raspberrypi-cross-build- + + - name: Install cross-build settings + id: cross-build + run: | + echo "::set-output name=driver-src-dir::$(echo ${GITHUB_WORKSPACE}/src/drivers)" + echo "::set-output name=repository-dir::$(echo ${GITHUB_WORKSPACE})" + mkdir -p ${HOME}/repo/raspberrypi + 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 + + - name: Install kernel headers + env: + REPOSITORY_DIR: ${{ steps.cross-build.outputs.repository-dir }} + DRIVER_SRC_DIR: ${{ steps.cross-build.outputs.driver-src-dir }} + RPI_LINUX_VER: ${{ matrix.env.RPI_LINUX_VER }} + CONFIG_FILE: ${{ matrix.env.CONFIG_FILE }} + RPI_LINUX_COMMIT_HASH: ${{ matrix.env.RPI_LINUX_COMMIT_HASH }} + run: | + 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 + cd ${HOME}/repo/raspberrypi/linux && make clean && git reset --hard HEAD && git checkout $RPI_LINUX_COMMIT_HASH + cp "${REPOSITORY_DIR}/.test/${CONFIG_FILE}" ${HOME}/repo/raspberrypi/linux/.config + make CROSS_COMPILE=$HOME/repo/raspberrypi/tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian-x64/bin/arm-linux-gnueabihf- ARCH=arm oldconfig + make CROSS_COMPILE=$HOME/repo/raspberrypi/tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian-x64/bin/arm-linux-gnueabihf- ARCH=arm -j 8 + + - name: Build kernel module + env: + REPOSITORY_DIR: ${{ steps.cross-build.outputs.repository-dir }} + DRIVER_SRC_DIR: ${{ steps.cross-build.outputs.driver-src-dir }} + run: | + cd $DRIVER_SRC_DIR + make -f $REPOSITORY_DIR/.test/Makefile.crosscompile + make -f $REPOSITORY_DIR/.test/Makefile.crosscompile clean diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 31e7fd4..0000000 --- a/.travis.yml +++ /dev/null @@ -1,43 +0,0 @@ -os: linux -group: stable -sudo: false -dist: xenial -language: generic - -addons: - apt: - packages: - - build-essential - - bc - -env: - global: - - HOME=/home/travis - matrix: - - RPI_LINUX_VER=rpi-4.1.y CONFIG_FILE=config-4.1.21-v7+ RPI_LINUX_COMMIT_HASH=ff45bc0 - - RPI_LINUX_VER=rpi-4.4.y CONFIG_FILE=config-4.4.38-v7+ RPI_LINUX_COMMIT_HASH=c95b7f1 - - RPI_LINUX_VER=rpi-4.14.y CONFIG_FILE=config-4.14.34-v7+ RPI_LINUX_COMMIT_HASH=f70eae4 - -cache: - apt: true - directories: - - $HOME/repo/raspberrypi - -install: - - export DRIVER_SRC_DIR=$(pwd)/src/drivers && echo $DRIVER_SRC_DIR - - export REPOSITORY_DIR=$(pwd) && echo $REPOSITORY_DIR - - mkdir -p $HOME/repo/raspberrypi - - 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 - -before_script: - - 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 - - cd $HOME/repo/raspberrypi/linux && make clean && git reset --hard HEAD && git checkout $RPI_LINUX_COMMIT_HASH - - cp "$REPOSITORY_DIR/.test/$CONFIG_FILE" $HOME/repo/raspberrypi/linux/.config - - make CROSS_COMPILE=$HOME/repo/raspberrypi/tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian-x64/bin/arm-linux-gnueabihf- ARCH=arm oldconfig - - make CROSS_COMPILE=$HOME/repo/raspberrypi/tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian-x64/bin/arm-linux-gnueabihf- ARCH=arm -j 8 - -script: - - cd $DRIVER_SRC_DIR - - make -f $REPOSITORY_DIR/.test/Makefile.crosscompile - - make -f $REPOSITORY_DIR/.test/Makefile.crosscompile clean - From b097d47961b1d2640dd44a56f08582b073549d74 Mon Sep 17 00:00:00 2001 From: Daisuke Sato Date: Mon, 13 Apr 2020 17:14:46 +0900 Subject: [PATCH 2/8] Update cache restore keys to avoid conflict --- .github/workflows/driver-cross-build.yml | 25 ++++++++++++++---------- 1 file changed, 15 insertions(+), 10 deletions(-) diff --git a/.github/workflows/driver-cross-build.yml b/.github/workflows/driver-cross-build.yml index bd18d9e..25fed57 100644 --- a/.github/workflows/driver-cross-build.yml +++ b/.github/workflows/driver-cross-build.yml @@ -31,10 +31,8 @@ jobs: - name: Cache uses: actions/cache@v1 with: - path: ${HOME}/repo/raspberrypi - key: ${{ runner.os }}-raspberrypi-cross-build-${{ matrix.env }} - restore-keys: | - ${{ runner.os }}-raspberrypi-cross-build- + path: ~/repo/raspberrypi + key: ${{ runner.os }}-raspberrypi-cross-build-${{ matrix.env.RPI_LINUX_COMMIT_HASH }} - name: Install cross-build settings id: cross-build @@ -53,16 +51,23 @@ jobs: RPI_LINUX_COMMIT_HASH: ${{ matrix.env.RPI_LINUX_COMMIT_HASH }} run: | 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 - cd ${HOME}/repo/raspberrypi/linux && make clean && git reset --hard HEAD && git checkout $RPI_LINUX_COMMIT_HASH + cd ${HOME}/repo/raspberrypi/linux && make clean && git reset --hard HEAD && git checkout ${RPI_LINUX_COMMIT_HASH} cp "${REPOSITORY_DIR}/.test/${CONFIG_FILE}" ${HOME}/repo/raspberrypi/linux/.config - make CROSS_COMPILE=$HOME/repo/raspberrypi/tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian-x64/bin/arm-linux-gnueabihf- ARCH=arm oldconfig - make CROSS_COMPILE=$HOME/repo/raspberrypi/tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian-x64/bin/arm-linux-gnueabihf- ARCH=arm -j 8 + make CROSS_COMPILE=${HOME}/repo/raspberrypi/tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian-x64/bin/arm-linux-gnueabihf- ARCH=arm oldconfig + make CROSS_COMPILE=${HOME}/repo/raspberrypi/tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian-x64/bin/arm-linux-gnueabihf- ARCH=arm -j 8 - name: Build kernel module env: REPOSITORY_DIR: ${{ steps.cross-build.outputs.repository-dir }} DRIVER_SRC_DIR: ${{ steps.cross-build.outputs.driver-src-dir }} run: | - cd $DRIVER_SRC_DIR - make -f $REPOSITORY_DIR/.test/Makefile.crosscompile - make -f $REPOSITORY_DIR/.test/Makefile.crosscompile clean + cd ${DRIVER_SRC_DIR} + make -f ${REPOSITORY_DIR}/.test/Makefile.crosscompile + + - name: Clean up kernel module + env: + REPOSITORY_DIR: ${{ steps.cross-build.outputs.repository-dir }} + DRIVER_SRC_DIR: ${{ steps.cross-build.outputs.driver-src-dir }} + run: | + cd ${DRIVER_SRC_DIR} + make -f ${REPOSITORY_DIR}/.test/Makefile.crosscompile clean \ No newline at end of file From 1f51fdf20295a818a3ae37a01532a3d14d59d639 Mon Sep 17 00:00:00 2001 From: Daisuke Sato Date: Mon, 13 Apr 2020 19:12:33 +0900 Subject: [PATCH 3/8] Test cache --- .github/workflows/driver-cross-build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/driver-cross-build.yml b/.github/workflows/driver-cross-build.yml index 25fed57..f7c1cc0 100644 --- a/.github/workflows/driver-cross-build.yml +++ b/.github/workflows/driver-cross-build.yml @@ -70,4 +70,4 @@ jobs: DRIVER_SRC_DIR: ${{ steps.cross-build.outputs.driver-src-dir }} run: | cd ${DRIVER_SRC_DIR} - make -f ${REPOSITORY_DIR}/.test/Makefile.crosscompile clean \ No newline at end of file + make -f ${REPOSITORY_DIR}/.test/Makefile.crosscompile clean From 12c120cc8c03213182896f7c32d075ac2596485d Mon Sep 17 00:00:00 2001 From: Daisuke Sato Date: Tue, 14 Apr 2020 10:21:35 +0900 Subject: [PATCH 4/8] Purge cache --- .github/workflows/driver-cross-build.yml | 6 ------ 1 file changed, 6 deletions(-) diff --git a/.github/workflows/driver-cross-build.yml b/.github/workflows/driver-cross-build.yml index f7c1cc0..81ef76c 100644 --- a/.github/workflows/driver-cross-build.yml +++ b/.github/workflows/driver-cross-build.yml @@ -28,12 +28,6 @@ jobs: steps: - uses: actions/checkout@v2 - - name: Cache - uses: actions/cache@v1 - with: - path: ~/repo/raspberrypi - key: ${{ runner.os }}-raspberrypi-cross-build-${{ matrix.env.RPI_LINUX_COMMIT_HASH }} - - name: Install cross-build settings id: cross-build run: | From 91824bc7dd7b1c3e43249c436ef2efe7973a36b2 Mon Sep 17 00:00:00 2001 From: Daisuke Sato Date: Tue, 14 Apr 2020 10:22:08 +0900 Subject: [PATCH 5/8] Add debug output --- .github/workflows/driver-cross-build.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/driver-cross-build.yml b/.github/workflows/driver-cross-build.yml index 81ef76c..a5812e5 100644 --- a/.github/workflows/driver-cross-build.yml +++ b/.github/workflows/driver-cross-build.yml @@ -57,6 +57,7 @@ jobs: run: | cd ${DRIVER_SRC_DIR} make -f ${REPOSITORY_DIR}/.test/Makefile.crosscompile + lsmod rtmouse.ko - name: Clean up kernel module env: From 198d33508cf204efc5dc03b52acfa3d47c77c955 Mon Sep 17 00:00:00 2001 From: Daisuke Sato Date: Tue, 14 Apr 2020 10:27:16 +0900 Subject: [PATCH 6/8] Update README.md --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 25b8fba..d954f55 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # RaspberryPiMouse -[![Build Status](https://travis-ci.org/rt-net/RaspberryPiMouse.svg?branch=master)](https://travis-ci.org/rt-net/RaspberryPiMouse) +![CI](https://github.com/rt-net/RaspberryPiMouse/workflows/CI/badge.svg?branch=master) This repository has the source code and kernel objects for the Raspberry Pi Mouse. @@ -84,4 +84,4 @@ This repository contains the code of the repository shown below. * [mcp3204.c in Raspberry Piで学ぶARMデバイスドライバープログラミング](http://www.socym.co.jp/support/s-940#ttlDownload) * GPL v2 License * [RPi-Distro/raspi-gpio](https://github.com/RPi-Distro/raspi-gpio) - * The 3-Clause BSD License \ No newline at end of file + * The 3-Clause BSD License From 0b791f6f43997c158f044cd1e963cb3cb0f516ea Mon Sep 17 00:00:00 2001 From: Daisuke Sato Date: Tue, 14 Apr 2020 11:12:24 +0900 Subject: [PATCH 7/8] Update debug output --- .github/workflows/driver-cross-build.yml | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/.github/workflows/driver-cross-build.yml b/.github/workflows/driver-cross-build.yml index a5812e5..3fc612f 100644 --- a/.github/workflows/driver-cross-build.yml +++ b/.github/workflows/driver-cross-build.yml @@ -57,7 +57,16 @@ jobs: run: | cd ${DRIVER_SRC_DIR} make -f ${REPOSITORY_DIR}/.test/Makefile.crosscompile - lsmod rtmouse.ko + + - name: Output kernel module info + env: + REPOSITORY_DIR: ${{ steps.cross-build.outputs.repository-dir }} + DRIVER_SRC_DIR: ${{ steps.cross-build.outputs.driver-src-dir }} + run: | + uname -a + echo ${{ matrix.env.RPI_LINUX_VER }} ${{ matrix.env.CONFIG_FILE }} ${{ matrix.env.RPI_LINUX_COMMIT_HASH }} + cd ${DRIVER_SRC_DIR} + modinfo rtmouse.ko - name: Clean up kernel module env: From f2d21386547cf0f0d35ae058ea507c76dd51b220 Mon Sep 17 00:00:00 2001 From: Daisuke Sato Date: Wed, 15 Apr 2020 19:15:00 +0900 Subject: [PATCH 8/8] ci: refactor --- .github/workflows/driver-cross-build.yml | 29 +++++------------------- 1 file changed, 6 insertions(+), 23 deletions(-) diff --git a/.github/workflows/driver-cross-build.yml b/.github/workflows/driver-cross-build.yml index 3fc612f..438325a 100644 --- a/.github/workflows/driver-cross-build.yml +++ b/.github/workflows/driver-cross-build.yml @@ -13,9 +13,6 @@ on: - 'src/drivers/**' - '.github/workflows/**' -env: - WORKSPACE: /home/runner - jobs: build: strategy: @@ -29,49 +26,35 @@ jobs: - uses: actions/checkout@v2 - name: Install cross-build settings - id: cross-build run: | - echo "::set-output name=driver-src-dir::$(echo ${GITHUB_WORKSPACE}/src/drivers)" - echo "::set-output name=repository-dir::$(echo ${GITHUB_WORKSPACE})" mkdir -p ${HOME}/repo/raspberrypi 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 - name: Install kernel headers env: - REPOSITORY_DIR: ${{ steps.cross-build.outputs.repository-dir }} - DRIVER_SRC_DIR: ${{ steps.cross-build.outputs.driver-src-dir }} RPI_LINUX_VER: ${{ matrix.env.RPI_LINUX_VER }} CONFIG_FILE: ${{ matrix.env.CONFIG_FILE }} RPI_LINUX_COMMIT_HASH: ${{ matrix.env.RPI_LINUX_COMMIT_HASH }} run: | 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 cd ${HOME}/repo/raspberrypi/linux && make clean && git reset --hard HEAD && git checkout ${RPI_LINUX_COMMIT_HASH} - cp "${REPOSITORY_DIR}/.test/${CONFIG_FILE}" ${HOME}/repo/raspberrypi/linux/.config + cp "${GITHUB_WORKSPACE}/.test/${CONFIG_FILE}" ${HOME}/repo/raspberrypi/linux/.config make CROSS_COMPILE=${HOME}/repo/raspberrypi/tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian-x64/bin/arm-linux-gnueabihf- ARCH=arm oldconfig make CROSS_COMPILE=${HOME}/repo/raspberrypi/tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian-x64/bin/arm-linux-gnueabihf- ARCH=arm -j 8 - name: Build kernel module - env: - REPOSITORY_DIR: ${{ steps.cross-build.outputs.repository-dir }} - DRIVER_SRC_DIR: ${{ steps.cross-build.outputs.driver-src-dir }} run: | - cd ${DRIVER_SRC_DIR} - make -f ${REPOSITORY_DIR}/.test/Makefile.crosscompile + cd ${GITHUB_WORKSPACE}/src/drivers + make -f ${GITHUB_WORKSPACE}/.test/Makefile.crosscompile - name: Output kernel module info - env: - REPOSITORY_DIR: ${{ steps.cross-build.outputs.repository-dir }} - DRIVER_SRC_DIR: ${{ steps.cross-build.outputs.driver-src-dir }} run: | uname -a echo ${{ matrix.env.RPI_LINUX_VER }} ${{ matrix.env.CONFIG_FILE }} ${{ matrix.env.RPI_LINUX_COMMIT_HASH }} - cd ${DRIVER_SRC_DIR} + cd ${GITHUB_WORKSPACE}/src/drivers modinfo rtmouse.ko - name: Clean up kernel module - env: - REPOSITORY_DIR: ${{ steps.cross-build.outputs.repository-dir }} - DRIVER_SRC_DIR: ${{ steps.cross-build.outputs.driver-src-dir }} run: | - cd ${DRIVER_SRC_DIR} - make -f ${REPOSITORY_DIR}/.test/Makefile.crosscompile clean + cd ${GITHUB_WORKSPACE}/src/drivers + make -f ${GITHUB_WORKSPACE}/.test/Makefile.crosscompile clean 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