github actions test

This commit is contained in:
Markus
2021-01-05 18:11:48 +01:00
committed by GitHub
parent ebb87cdc8a
commit 6bee53a8bd

50
.github/workflows/main.yml vendored Normal file
View File

@ -0,0 +1,50 @@
# This is a basic workflow to help you get started with Actions
name: CI
# Controls when the action will run.
on:
# Triggers the workflow on push or pull request events but only for the master branch
push:
branches: [ master ]
pull_request:
branches: [ master ]
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# This workflow contains a single job called "build"
build:
# The type of runner that the job will run on
runs-on: ubuntu-latest
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v2
- name: build examples
run: |
/sbin/start-stop-daemon --start --quiet --pidfile /tmp/custom_xvfb_1.pid --make-pidfile --background --exec /usr/bin/Xvfb -- :1 -ac -screen 0 1280x1024x16
export DISPLAY=:1.0
sleep 3
wget http://downloads.arduino.cc/arduino-$IDE_VERSION-linux64.tar.xz
tar xf arduino-$IDE_VERSION-linux64.tar.xz
mv arduino-$IDE_VERSION $HOME/arduino_ide
export PATH="$HOME/arduino_ide:$PATH"
which arduino
mkdir -p $HOME/Arduino/libraries
wget https://github.com/bblanchon/ArduinoJson/archive/6.x.zip
unzip 6.x.zip
mv ArduinoJson-6.x $HOME/Arduino/libraries/ArduinoJson
cp -r $GITHUB_WORKSPACE $HOME/Arduino/libraries/arduinoWebSockets
source $GITHUB_WORKSPACE/travis/common.sh
get_core $CPU
cd $GITHUB_WORKSPACE
arduino --board $BOARD --save-prefs
arduino --get-pref sketchbook.path
arduino --pref update.check=false
build_sketches arduino $HOME/Arduino/libraries/arduinoWebSockets/examples/$CPU $CPU