CH552/.github/workflows/demo.yml

81 lines
1.8 KiB
YAML
Raw Normal View History

2022-07-29 18:08:02 +02:00
name: demo
2021-05-17 05:07:47 +02:00
on:
push:
2021-05-17 05:39:02 +02:00
paths:
- 'project/**'
2021-05-17 05:42:00 +02:00
- '**.yml'
2021-05-17 05:07:47 +02:00
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:
2021-05-17 05:39:02 +02:00
strategy:
2021-05-17 05:43:22 +02:00
fail-fast: false
matrix:
items:
- "JTAG"
- "jump_to_bl"
- "si5351"
os: [ubuntu-latest]
2021-05-17 05:39:02 +02:00
runs-on: ${{ matrix.os }}
2021-05-17 05:07:47 +02:00
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()
2021-05-17 05:39:02 +02:00
working-directory: project
2021-05-17 05:32:24 +02:00
run: |
2021-05-17 05:39:02 +02:00
make -C ${{ matrix.items }}
2021-05-17 05:32:24 +02:00
- uses: actions/upload-artifact@v2
2021-05-17 05:39:02 +02:00
if: success()
2021-05-17 05:32:24 +02:00
with:
2021-05-17 05:39:02 +02:00
name: build_project
path: project/${{ matrix.items }}
2021-05-17 05:07:47 +02:00