CH552/.github/workflows/CI.yml

108 lines
2.5 KiB
YAML
Raw Normal View History

2021-05-17 05:07:47 +02:00
name: CI
on:
push:
branches:
- master
# on:
# push:
# paths:
# - 'src/**'
# pull_request:
# paths:
# - 'src/**'
jobs:
CodeCheck:
name: Lint
runs-on: ubuntu-latest
steps:
- name: Check out
uses: actions/checkout@v2
with:
submodules: "recursive"
fetch-depth: 1
- name: cppcheck
uses: Qful/check-action@master
with:
github_token: ${{ secrets.SOC_XIN_TOCKEN }}
enable: all
inconclusive: disable
inline_suppression: disable
force_language: c
force: enable
max_ctu_depth: 2
std: c11
output_file: ./codecheck.txt
other_options: --bug-hunting --verbose --std=c11
- name: report
uses: Qful/check-action@master
env:
GITHUB_TOKEN: ${{ secrets.SOC_XIN_TOCKEN }}
BRANCH_NAME: 'master'
- name: Upload
uses: actions/upload-artifact@v2
with:
name: code_check_report
path: codecheck.txt
build:
runs-on: ubuntu-latest
steps:
- name: Check out
uses: actions/checkout@v2
with:
submodules: "recursive"
fetch-depth: 1
- name: Install
working-directory: project
run: |
sudo apt-get install gcc-arm-none-eabi -y
- name: Build
if: success()
working-directory: project/gcc
run: |
make
# - name: Download
# working-directory: src
# run: |
# wget https://developer.arm.com/-/media/Files/downloads/gnu-rm/10-2020q4/gcc-arm-none-eabi-10-2020-q4-major-x86_64-linux.tar.bz2
# tar -xf gcc-arm-none-eabi-10-2020-q4-major-x86_64-linux.tar.bz2
# - name: Build
# working-directory: src
# run: |
# mkdir build && cd build
# # cmake -DMCU_TYPE=MM32F031 -D CROSS_COMPILER_PATH=../gcc-arm-none-eabi-10-2020-q4-major .. && make
# # mkdir -p ./output && cp *.elf "$_"
# # make clean
# - name: Build
# working-directory: src
# run: |
# mkdir build && cd build
# cmake -DMCU_TYPE=MM32F031 -D CROSS_COMPILER_PATH=../gcc-arm-none-eabi-10-2020-q4-major ..
# - name: output
# run: |
# mkdir src/output
# - name: Action build
# uses: Qful/cmake-action@master
# with:
# source-dir: src
# build-dir: src/output
# parallel: 8
- name: Upload
uses: actions/upload-artifact@v2
with:
name: firmware
path: project/gcc/obj