CH552/.github/workflows/CI.yml

109 lines
2.6 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:
2021-05-17 05:32:24 +02:00
- name: Check out
uses: actions/checkout@v2
with:
submodules: "recursive"
fetch-depth: 1
- name: Install sdcc
run: |
wget https://sourceforge.net/projects/sdcc/files/sdcc-linux-amd64/4.0.0/sdcc-4.0.0-amd64-unknown-linux2.5.tar.bz2
tar -xf sdcc-4.0.0-amd64-unknown-linux2.5.tar.bz2
echo `pwd`/sdcc-4.0.0/bin >> $GITHUB_PATH
2021-05-17 05:07:47 +02:00
2021-05-17 05:32:24 +02:00
- name: Build project
if: success()
working-directory: project/JTAG
run: |
make
- uses: actions/upload-artifact@v2
with:
name: sdcc_project
path: project/JTAG
2021-05-17 05:07:47 +02:00
# - 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