unleashed-firmware/.github/workflows/ci.yml
Nikita Beletskii 110a9efc3c
[WIP] Add syntax check for rust and C\C++ code (#108)
* proof of concept

* fix syntax for rust and add auto fix syntax

* fix syntax for C

* fix bug with files owner

* add information to wiki

* try to add ci

* format code from master

* even more format fixes

* change docker to docker-compose

* Exclude ./target_*/build directories from format check

* Run rustfmt only on project files

* add ulimit setup for long clang list

* merge

* fix rustfmt, exclude target Inc directory

* sync with master

* abspath

Co-authored-by: aanper <mail@s3f.ru>
Co-authored-by: Vadim Kaushan <admin@disasm.info>
2020-09-30 02:18:30 +03:00

65 lines
1.7 KiB
YAML

name: 'CI'
on:
push:
branches: [ master ]
paths-ignore:
- 'wiki/**'
- 'wiki_static/**'
pull_request:
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- uses: satackey/action-docker-layer-caching@v0.0.8
continue-on-error: true
with:
key: docker-cache-${{ hashFiles('docker/**') }}-{hash}
restore-keys: docker-cache-${{ hashFiles('docker/**') }}-
- name: Build docker image
uses: ./.github/actions/docker
- name: Check syntax
uses: ./.github/actions/docker
continue-on-error: true
with:
run: /syntax_check.sh
- name: Build target_lo in docker
uses: ./.github/actions/docker
with:
run: make -C target_lo
- name: Build target_f1 in docker
uses: ./.github/actions/docker
with:
run: make -C target_f1
- name: Publish target_f1 artifacts
uses: actions/upload-artifact@v2
with:
name: target_f1
path: |
target_f1/build/target_prod.elf
target_f1/build/target_prod.bin
target_f1/build/target_prod.hex
if-no-files-found: error
- name: Build target_f2 in docker
uses: ./.github/actions/docker
with:
run: make -C target_f2
- name: Publish target_f2 artifacts
uses: actions/upload-artifact@v2
with:
name: target_f2
path: |
target_f2/build/target_prod.elf
target_f2/build/target_prod.bin
target_f2/build/target_prod.hex
if-no-files-found: error