kopia lustrzana https://github.com/RobertGawron/IonizationChamber
Merge pull request #237 from RobertGawron/feature/travis_to_github_actions_transition
Feature/travis to GitHub actions transitionpull/238/head
commit
a40321e89b
|
@ -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
|
|
@ -0,0 +1,43 @@
|
|||
name: Static Code Analysis
|
||||
|
||||
on: [push]
|
||||
|
||||
jobs:
|
||||
build_and_test:
|
||||
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
|
||||
- uses: actions/checkout@v1
|
||||
- name: install cppcheck and run tests
|
||||
run: |
|
||||
sudo apt-get install -y cppcheck
|
||||
cd ./ContinousIntegration
|
||||
chmod +x ./run_c_static_code_analysis.sh
|
||||
ls run_c_static_code_analysis.sh
|
||||
./run_c_static_code_analysis.sh
|
||||
|
||||
- uses: actions/checkout@v1
|
||||
- name: install flake8 and run tests
|
||||
if: always()
|
||||
run: |
|
||||
sudo pip install flake8 flake8-html
|
||||
cd ./ContinousIntegration
|
||||
chmod +x ./run_python_static_code_analysis.sh
|
||||
ls
|
||||
./run_python_static_code_analysis.sh
|
||||
|
||||
- name: Archive Python results
|
||||
uses: actions/upload-artifact@v2
|
||||
if: always()
|
||||
with:
|
||||
name: Report for Python sources
|
||||
path: ./ContinousIntegration/python_lint_repport/
|
||||
|
||||
- name: Archive C results
|
||||
uses: actions/upload-artifact@v2
|
||||
if: always()
|
||||
with:
|
||||
name: Report for C sources
|
||||
path: ./ContinousIntegration/C_Lint_*.txt
|
48
.travis.yml
48
.travis.yml
|
@ -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
|
||||
|
|
@ -0,0 +1,3 @@
|
|||
# Continous Integration
|
||||
|
||||
This folder contains scripts run by GitHub continuous integration module. These scripts should be also run locally before pull request.
|
|
@ -0,0 +1,13 @@
|
|||
cppcheck --enable=all --inline-suppr --force --quiet --error-exitcode=1 ../Software/Firmware/Inc/* ../Software/Firmware/Src/* 2>C_Lint_ReportFull.txt
|
||||
|
||||
# look for errors in gm_files (those are aplicatin files where we are interested in errors)
|
||||
# store them to separate log ans show them on stdout
|
||||
grep -F '[../Software/NUCLEO-F091RC/Src/gm_' C_Lint_ReportFull.txt > C_Lint_ReportApplicationOnly.txt
|
||||
cat C_Lint_ReportApplicationOnly.txt
|
||||
|
||||
# set exit code to ok if no errors were found in aplication files
|
||||
if [ $(cat C_Lint_ReportApplicationOnly.txt | wc -l) -eq 0 ]; then
|
||||
true
|
||||
else
|
||||
false
|
||||
fi
|
|
@ -0,0 +1 @@
|
|||
flake8 --format=html --htmldir=python_lint_repport ../Software/DataAcquisition/
|
|
@ -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
|
||||
|
||||
|
|
Ładowanie…
Reference in New Issue