From 71fb36979cc82f8c9f42110cae7243b9f48c20f9 Mon Sep 17 00:00:00 2001 From: Robert Gawron Date: Fri, 23 Oct 2020 18:08:16 +0200 Subject: [PATCH] ci support for building firmware --- .github/workflows/build-firmware.yml | 27 ++++++++++++++++ .travis.yml | 48 ---------------------------- README.md | 4 +-- 3 files changed, 28 insertions(+), 51 deletions(-) create mode 100644 .github/workflows/build-firmware.yml delete mode 100644 .travis.yml diff --git a/.github/workflows/build-firmware.yml b/.github/workflows/build-firmware.yml new file mode 100644 index 0000000..22ff63a --- /dev/null +++ b/.github/workflows/build-firmware.yml @@ -0,0 +1,27 @@ +name: Build Firmware + +on: [push] + +jobs: + build_and_test: + + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v1 + - name: Build and run tests + run: | + sudo apt-get install -y sdcc cmake + cd ./Software/Firmware + sdcc --version + mkdir build_directory + cd build_directory + cmake -DCMAKE_SYSTEM_NAME=Generic -DCMAKE_C_COMPILER=sdcc .. + make VERBOSE=1 + + - name: Archive firmware binary + uses: actions/upload-artifact@v2 + if: always() + with: + name: Firmware binary + path: ./Software/Firmware/build_directory/IonizationChamber.ihx diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 49ac51a..0000000 --- a/.travis.yml +++ /dev/null @@ -1,48 +0,0 @@ -matrix: - include: - # Check if firmware compiles - - language: minimal - dist: xenial - sudo: true - before_install: - - sudo apt-get install -y sdcc cmake - - cd ./Software/Firmware - script: - - sdcc --version - - mkdir build_directory - - cd build_directory - - cmake -DCMAKE_SYSTEM_NAME=Generic -DCMAKE_C_COMPILER=sdcc .. - - make VERBOSE=1 - - # Check if latex files are correct - - language: minimal - dist: xenial - sudo: true - before_install: - - sudo apt-get install -y texlive-latex-base texlive-latex-extra texlive-extra-utils poppler-utils - - cd ./Documentation/Diagrams - script: - - chmod +x ./creatediagrams.sh - - ./creatediagrams.sh - - # Use cppcheck to check statically C code - - language: minimal - dist: xenial - sudo: true - before_install: - - sudo apt-get install -y cppcheck - - cd ./Software/Firmware - script: - - cppcheck --enable=all --inline-suppr --force --quiet --error-exitcode=1 Src/* Inc/* - - # Use pyflakes to check statically Python code - - language: python - dist: xenial - sudo: true - before_install: - - sudo apt-get install -y python3-pip - - pip3 install pyflakes - - cd ./Software/DataAcquisition - script: - - pyflakes *.py - diff --git a/README.md b/README.md index 2aa1ce0..c4cb939 100755 --- a/README.md +++ b/README.md @@ -1,8 +1,6 @@ # Ionization Chamber (a device to measure radioactivity level) -[![Build Status](https://travis-ci.com/RobertGawron/IonizationChamber.svg?branch=master)](https://travis-ci.com/RobertGawron/IonizationChamber) - ---- +[![Build Firmware](https://github.com/RobertGawron/IonizationChamber/workflows/Build%20Firmware/badge.svg)](https://github.com/RobertGawron/IonizationChamber/actions?query=workflow%3A%22Build+Firmware%22) [![Static Code Analysis](https://github.com/RobertGawron/IonizationChamber/workflows/Static%20Code%20Analysis/badge.svg)](https://github.com/RobertGawron/IonizationChamber/actions?query=workflow%3A%22Static+Code+Analysis%22) ## Principle of operation