add github actions CI #84

remove travis ci, since Travis-CI is not a good place for opensource
projects anymore.
This commit is contained in:
vondraussen 2022-01-07 13:05:46 +01:00 committed by fenugrec
parent 2df0d420e9
commit 8c5a7d08e5
2 changed files with 33 additions and 29 deletions

33
.github/workflows/ci.yml vendored Normal file
View File

@ -0,0 +1,33 @@
name: CI
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
env:
BUILD_TYPE: Release
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Install toolchain
run: sudo apt-get -y install gcc-arm-none-eabi
- name: Configure CMake
run: cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DCMAKE_TOOLCHAIN_FILE=${{github.workspace}}/cmake/gcc-arm-none-eabi-8-2019-q3-update.cmake
- name: Build
run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}}
- name: Upload a Build Artifact
uses: actions/upload-artifact@v2.3.1
with:
name: firmware
path: ${{github.workspace}}/build/*_fw.bin

View File

@ -1,29 +0,0 @@
dist: bionic
language: generic
install:
- wget https://github.com/Kitware/CMake/releases/download/v3.14.5/cmake-3.14.5-Linux-x86_64.sh
&& chmod +x cmake-3.14.5-Linux-x86_64.sh
- mkdir -p /opt/cmake-3.14.5 && ./cmake-3.14.5-Linux-x86_64.sh --skip-license --prefix=/opt/cmake-3.14.5
- PATH=/opt/cmake-3.14.5/bin:$PATH
- wget https://armkeil.blob.core.windows.net/developer/Files/downloads/gnu-rm/8-2019q3/RC1.1/gcc-arm-none-eabi-8-2019-q3-update-linux.tar.bz2
- tar xf gcc-arm-none-eabi-8-2019-q3-update-linux.tar.bz2 -C /opt
- mkdir build && cd build
- cmake .. -DCMAKE_TOOLCHAIN_FILE=../cmake/gcc-arm-none-eabi-8-2019-q3-update.cmake
- make
before_deploy:
- tar cvzf candleLight_fw_${TRAVIS_TAG}.tar.gz $(ls *_fw*)
deploy:
provider: releases
api_key:
github-token: $GITHUB_TOKEN
edge: true
file:
- candleLight_fw_${TRAVIS_TAG}.tar.gz
skip_cleanup: true
on:
tags: true
repo: candle-usb/candleLight_fw
branch: master