-
Notifications
You must be signed in to change notification settings - Fork 981
79 lines (69 loc) · 2.23 KB
/
linux.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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
name: Build DAPLink (Linux)
on:
push:
branches:
- main
- develop
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-22.04
strategy:
matrix:
gcc: ['10.3-2021.10']
steps:
- name: Install Arm GNU Toolchain (arm-none-eabi-gcc)
uses: carlosperate/arm-none-eabi-gcc-action@v1
with:
release: ${{ matrix.gcc }}
path-env-var: ARM_NONE_EABI_GCC_PATH
- name: Cache Python modules
id: cache-python
uses: actions/cache@v3
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }}
restore-keys: |
${{ runner.os }}-pip-
- name: Checkout source files
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Install Python module
run: |
pip3 install --user -r requirements.txt
- name: Install dependencies
run: |
sudo apt install -y ccache ninja-build
export PATH="/usr/lib/ccache:$ARM_NONE_EABI_GCC_PATH:/home/runner/.local/bin:$PATH"
for i in "$ARM_NONE_EABI_GCC_PATH/"* ; do sudo ln -s /usr/bin/ccache /usr/lib/ccache/$(basename $i); done
arm-none-eabi-gcc -v | tee log.txt
(git status; git log -1)>> log.txt
- name: Cache CCache
id: ccache
uses: actions/cache@v3
with:
path: .ccache
key: ${{ runner.os }}-gcc-${{ matrix.gcc }}-${{ hashFiles('log.txt') }}
restore-keys: |
${{ runner.os }}-gcc-${{ matrix.gcc }}-
- name: Configure CCache
run: |
ccache --set-config=cache_dir="$GITHUB_WORKSPACE/.ccache"
ccache --set-config=max_size=2Gi
ccache -z -s
- name: Compile
run: |
export PATH="/usr/lib/ccache:$ARM_NONE_EABI_GCC_PATH:/home/runner/.local/bin:$PATH"
python tools/progen_compile.py --release --parallel -v
mkdir bootloaders
cp projectfiles/make_gcc_arm/*_bl/build/*_crc.{bin,hex} bootloaders
(ls -lR firmware_*; ccache -s; arm-none-eabi-gcc -v) | tee log.txt
- name: Upload test artifacts
uses: actions/upload-artifact@v3
with:
name: firmware-dev-${{github.run_number}}
path: |
bootloaders/*
firmware*/*
!firmware*/*.zip