Repository navigation
81 lines (71 loc) · 2.84 KB
/
Copy pathlinux.yml
File metadata and controls
81 lines (71 loc) · 2.84 KB
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
80
81
name: Build DAPLink (Linux)
on:
workflow_dispatch:
inputs:
version:
required: true
jobs:
build:
runs-on: ubuntu-20.04
steps:
- name: Cache Embedded Arm Toolchain
id: cache-arm-gcc
uses: actions/cache@v2
env:
cache-name: arm-gcc-9-2020-q2
with:
path: ${{ runner.temp }}/arm-gcc
key: ${{ runner.os }}-${{ env.cache-name }}
restore-keys: ${{ runner.os }}-${{ env.cache-name }}
- name: Cache Python modules
uses: actions/cache@v2
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }}
restore-keys: |
${{ runner.os }}-pip-
- name: Checkout source files
uses: actions/checkout@v2
- name: Install Python module
run: |
pip3 install --user -r requirements.txt
pip3 uninstall -y project-generator
pip3 install --user git+https://github.com/mbrossard/project_generator.git@development
- name: Install Embedded Arm Toolchain
if: steps.cache-arm-gcc.outputs.cache-hit != 'true'
run: |
curl -O -L https://developer.arm.com/-/media/Files/downloads/gnu-rm/9-2020q2/gcc-arm-none-eabi-9-2020-q2-update-x86_64-linux.tar.bz2
md5sum gcc-arm-none-eabi-9-2020-q2-update-x86_64-linux.tar.bz2
echo Installing gcc-arm-none-eabi-9-2020-q2-update-x86_64-linux in ${{ runner.temp }}/arm-gcc
mkdir -p ${{ runner.temp }}/arm-gcc
tar jvxf gcc-arm-none-eabi-9-2020-q2-update-x86_64-linux.tar.bz2 -C ${{ runner.temp }}/arm-gcc --strip-components 1
- name: Install dependencies
run: |
sudo apt install -y ccache ninja-build
export PATH=/usr/lib/ccache:${{ runner.temp }}/arm-gcc/bin/:/home/runner/.local/bin:$PATH
for i in ${{ runner.temp }}/arm-gcc/bin/* ; do sudo ln -s /usr/bin/ccache /usr/lib/ccache/$(basename $i); done
ccache --set-config=cache_dir="$GITHUB_WORKSPACE"
ccache --set-config=cache_dir="$GITHUB_WORKSPACE/.ccache"
ccache --set-config=max_size=2Ti
ccache -z -s
arm-none-eabi-gcc -v | tee log.txt
(git status; git log -1 )>> log.txt
- name: Cache CCache
id: ccache
uses: actions/cache@v2
with:
path: .ccache
key: ${{ runner.os }}-ccache-${{ hashFiles('log.txt') }}
restore-keys: ${{ runner.os }}-ccache-
- name: Compile
run: |
export PATH="/usr/lib/ccache:${{ runner.temp }}/arm-gcc/bin/:/home/runner/.local/bin:$PATH"
python tools/progen_compile.py --release --parallel -v -v --ignore-failures
(ls -lR firmware_*; ccache -s; arm-none-eabi-gcc -v) | tee log.txt
- name: Upload test artifacts
uses: actions/upload-artifact@v2
with:
name: firmware-dev-${{github.run_number}}
path: |
firmware*/*
!firmware*/*.zip