-
Notifications
You must be signed in to change notification settings - Fork 4
36 lines (30 loc) · 982 Bytes
/
builder-41.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
name: Build with ESP-IDF v4.1
on: [push]
jobs:
builder:
name: Builder for the test project
runs-on: ubuntu-20.04
env:
main-path: ESP32HAL
app-path: ESP32HAL/test
steps:
- name: Checkout code
uses: actions/checkout@v2
with:
path: ${{ env.main-path }}
- name: Build
uses: CalinRadoni/[email protected]
id: idf_build
with:
entrypoint: /github/workspace/${{ env.app-path }}/action-build.sh
- name: Compute SHA256 for bin and elf files
if: steps.idf_build.outputs.result == 0
run: |
fileE=$(find "${{ github.workspace }}/${{ env.app-path }}/build" -maxdepth 1 -type f -name '*.elf')
fileB=${fileE%.elf}.bin
declare -a files
files=("$fileE" "$fileB")
for file in "${files[@]}"; do
hash=$(sha256sum -b "$file")
stat -c"${hash%% *} ${file##*/} %s" "$file"
done