From 88a74abf3388aba4bc6b0954108a3d49b8e60266 Mon Sep 17 00:00:00 2001 From: Hans-Erik Floryd Date: Wed, 17 Feb 2021 11:31:06 +0100 Subject: [PATCH] Migrate to Github Actions --- .github/workflows/build.yml | 31 +++++++++++++++++++++++++++++++ .travis.yml | 19 ------------------- README.md | 2 +- 3 files changed, 32 insertions(+), 20 deletions(-) create mode 100644 .github/workflows/build.yml delete mode 100644 .travis.yml diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000..9014885 --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,31 @@ +name: build +on: [push, pull_request] +env: + BUILD_TYPE: Release +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + with: + submodules: true + + - name: Install dependencies + run: sudo apt-get install doxygen + + - name: Configure + shell: bash + run: | + cmake -E make_directory ${{github.workspace}}/build + cmake -B ${{github.workspace}}/build -S ${{github.workspace}} \ + -DCMAKE_BUILD_TYPE=$BUILD_TYPE + + - name: Build + shell: bash + run: | + cmake --build ${{github.workspace}}/build --target all docs install -j4 + + - name: Test + shell: bash + run: | + cmake --build ${{github.workspace}}/build --target check diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 0141b7a..0000000 --- a/.travis.yml +++ /dev/null @@ -1,19 +0,0 @@ -language: c - -dist: bionic - -addons: - apt: - packages: - - doxygen - -# Add latest cmake -before_install: - - wget -O - https://apt.kitware.com/keys/kitware-archive-latest.asc 2>/dev/null | sudo apt-key add - - - sudo apt-add-repository -y 'deb https://apt.kitware.com/ubuntu/ bionic main' - - sudo apt-get -q update - - sudo apt-get -y install cmake - -script: - - scan-build /usr/bin/cmake -B build -S . -DCMAKE_BUILD_TYPE=Debug - - scan-build /usr/bin/cmake --build build --target all check docs install -j diff --git a/README.md b/README.md index abe7168..8866ed5 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ c-open: CANopen stack ===================== -[![Build Status](https://travis-ci.org/rtlabs-com/c-open.svg?branch=master)](https://travis-ci.org/rtlabs-com/c-open) +[![Build Status](https://github.com/rtlabs-com/c-open/workflows/build/badge.svg?branch=master)](https://github.com/rtlabs-com/c-open/actions?workflow=build) This repository contains a CANopen stack for both master and slaves. The stack implements most of CiA 301 and 305 (LSS). The stack