mirror of https://github.com/Desuuuu/klipper.git
github: Run continuous integration tests using "github actions"
Use "github actions" instead of "travis ci" for the automatic build regression tests. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
This commit is contained in:
parent
21ba8a9d7a
commit
7ad36a2164
|
@ -0,0 +1,30 @@
|
||||||
|
# Perform continuous integration tests on updates and pull requests
|
||||||
|
name: Build test
|
||||||
|
on: [push, pull_request]
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build:
|
||||||
|
runs-on: ubuntu-18.04
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v2
|
||||||
|
|
||||||
|
- name: Install system dependencies
|
||||||
|
run: sudo apt-get install gcc-avr avr-libc pv libmpfr-dev libgmp-dev libmpc-dev texinfo libncurses5-dev bison flex python-virtualenv virtualenv python-dev libffi-dev build-essential
|
||||||
|
|
||||||
|
- name: Setup cache
|
||||||
|
uses: actions/cache@v2
|
||||||
|
with:
|
||||||
|
path: travis_cache
|
||||||
|
key: ${{ runner.os }}-build-${{ hashFiles('scripts/travis-install.sh') }}
|
||||||
|
|
||||||
|
- name: Prepare tests
|
||||||
|
run: ./scripts/travis-install.sh
|
||||||
|
|
||||||
|
- name: Test
|
||||||
|
run: ./scripts/travis-build.sh 2>&1
|
||||||
|
|
||||||
|
- name: Upload micro-controller data dictionaries
|
||||||
|
uses: actions/upload-artifact@v2
|
||||||
|
with:
|
||||||
|
name: data-dict
|
||||||
|
path: travis_build/dict
|
27
.travis.yml
27
.travis.yml
|
@ -1,27 +0,0 @@
|
||||||
# This is a travis-ci.org continuous integration configuration file.
|
|
||||||
language: c
|
|
||||||
dist: bionic
|
|
||||||
|
|
||||||
addons:
|
|
||||||
apt:
|
|
||||||
packages:
|
|
||||||
# AVR GCC packages
|
|
||||||
- gcc-avr
|
|
||||||
- avr-libc
|
|
||||||
# PRU GCC build packages
|
|
||||||
- pv
|
|
||||||
- libmpfr-dev
|
|
||||||
- libgmp-dev
|
|
||||||
- libmpc-dev
|
|
||||||
- texinfo
|
|
||||||
- libncurses5-dev
|
|
||||||
- bison
|
|
||||||
- flex
|
|
||||||
|
|
||||||
cache:
|
|
||||||
directories:
|
|
||||||
- travis_cache
|
|
||||||
|
|
||||||
install: ./scripts/travis-install.sh
|
|
||||||
|
|
||||||
script: ./scripts/travis-build.sh
|
|
|
@ -178,8 +178,9 @@ and effect scenarios.
|
||||||
Running the regression tests
|
Running the regression tests
|
||||||
============================
|
============================
|
||||||
|
|
||||||
The main Klipper GitHub repository uses TravisCI to run a series of
|
The main Klipper GitHub repository uses "github actions" to run a
|
||||||
regression tests. It can be useful to run some of these tests locally.
|
series of regression tests. It can be useful to run some of these
|
||||||
|
tests locally.
|
||||||
|
|
||||||
The source code "whitespace check" can be run with:
|
The source code "whitespace check" can be run with:
|
||||||
```
|
```
|
||||||
|
|
|
@ -18,8 +18,7 @@ PYTHON=${BUILD_DIR}/python-env/bin/python
|
||||||
|
|
||||||
start_test()
|
start_test()
|
||||||
{
|
{
|
||||||
echo "travis_fold:start:$1"
|
echo "::group::=============== $1 $2"
|
||||||
echo "=============== $2"
|
|
||||||
set -x
|
set -x
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -27,7 +26,7 @@ finish_test()
|
||||||
{
|
{
|
||||||
set +x
|
set +x
|
||||||
echo "=============== Finished $2"
|
echo "=============== Finished $2"
|
||||||
echo "travis_fold:end:$1"
|
echo "::endgroup::"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -64,9 +63,6 @@ done
|
||||||
# Verify klippy host software
|
# Verify klippy host software
|
||||||
######################################################################
|
######################################################################
|
||||||
|
|
||||||
HOSTDIR=${BUILD_DIR}/hosttest
|
|
||||||
mkdir -p ${HOSTDIR}
|
|
||||||
|
|
||||||
start_test klippy "Test invoke klippy"
|
start_test klippy "Test invoke klippy"
|
||||||
$PYTHON scripts/test_klippy.py -d ${DICTDIR} test/klippy/*.test
|
$PYTHON scripts/test_klippy.py -d ${DICTDIR} test/klippy/*.test
|
||||||
finish_test klippy "Test invoke klippy"
|
finish_test klippy "Test invoke klippy"
|
||||||
|
|
|
@ -43,7 +43,9 @@ PRU_DIR=${BUILD_DIR}/pru-gcc
|
||||||
|
|
||||||
if [ ! -f ${PRU_FILE} ]; then
|
if [ ! -f ${PRU_FILE} ]; then
|
||||||
cd ${BUILD_DIR}
|
cd ${BUILD_DIR}
|
||||||
git clone https://github.com/dinuxbg/gnupru -b 2018.03-beta-rc3
|
git config --global user.email "you@example.com"
|
||||||
|
git config --global user.name "Your Name"
|
||||||
|
git clone https://github.com/dinuxbg/gnupru -b 2018.03-beta-rc3 --depth 1
|
||||||
cd gnupru
|
cd gnupru
|
||||||
export PREFIX=${PRU_DIR}
|
export PREFIX=${PRU_DIR}
|
||||||
./download-and-patch.sh 2>&1 | pv -nli 30 > ${BUILD_DIR}/gnupru-build.log
|
./download-and-patch.sh 2>&1 | pv -nli 30 > ${BUILD_DIR}/gnupru-build.log
|
||||||
|
|
Loading…
Reference in New Issue