2020-08-31 20:12:18 +00:00
|
|
|
name: 'CI'
|
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
branches: [ master ]
|
2020-09-27 23:36:32 +00:00
|
|
|
paths-ignore:
|
|
|
|
- 'wiki/**'
|
|
|
|
- 'wiki_static/**'
|
2020-08-31 20:12:18 +00:00
|
|
|
pull_request:
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
build:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- name: Checkout code
|
|
|
|
uses: actions/checkout@v2
|
2020-09-17 08:06:25 +00:00
|
|
|
|
|
|
|
- uses: satackey/action-docker-layer-caching@v0.0.8
|
|
|
|
continue-on-error: true
|
|
|
|
with:
|
2020-09-17 09:11:06 +00:00
|
|
|
key: docker-cache-${{ hashFiles('docker/**') }}-{hash}
|
|
|
|
restore-keys: docker-cache-${{ hashFiles('docker/**') }}-
|
2020-08-31 20:12:18 +00:00
|
|
|
- name: Build docker image
|
|
|
|
uses: ./.github/actions/docker
|
|
|
|
|
2020-09-29 23:18:30 +00:00
|
|
|
- name: Check syntax
|
|
|
|
uses: ./.github/actions/docker
|
|
|
|
continue-on-error: true
|
|
|
|
with:
|
|
|
|
run: /syntax_check.sh
|
|
|
|
|
2020-08-31 20:12:18 +00:00
|
|
|
- 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
|
2020-09-29 12:40:47 +00:00
|
|
|
|
|
|
|
- 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
|