File tree Expand file tree Collapse file tree 2 files changed +68
-4
lines changed Expand file tree Collapse file tree 2 files changed +68
-4
lines changed Original file line number Diff line number Diff line change 4
4
branches :
5
5
- main
6
6
- develop
7
- pull_request :
8
- branches :
9
- - main
10
- - develop
11
7
workflow_dispatch :
12
8
13
9
jobs :
Original file line number Diff line number Diff line change
1
+ name : Build DAPLink PR (Linux)
2
+ on :
3
+ pull_request :
4
+ branches :
5
+ - main
6
+ - develop
7
+ workflow_dispatch :
8
+
9
+ jobs :
10
+ build :
11
+ runs-on : ubuntu-22.04
12
+ strategy :
13
+ matrix :
14
+ gcc : ['10.3-2021.10']
15
+
16
+ steps :
17
+ - name : Install Arm GNU Toolchain (arm-none-eabi-gcc)
18
+ uses : carlosperate/arm-none-eabi-gcc-action@v1
19
+ with :
20
+ release : ${{ matrix.gcc }}
21
+ path-env-var : ARM_NONE_EABI_GCC_PATH
22
+
23
+ - name : Cache Python modules
24
+ id : cache-python
25
+ uses : actions/cache@v3
26
+ with :
27
+ path : ~/.cache/pip
28
+ key : ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }}
29
+ restore-keys : |
30
+ ${{ runner.os }}-pip-
31
+
32
+ - name : Checkout source files
33
+ uses : actions/checkout@v2
34
+ with :
35
+ fetch-depth : 0
36
+
37
+ - name : Install Python module
38
+ run : |
39
+ pip3 install --user -r requirements.txt
40
+
41
+ - name : Install dependencies
42
+ run : |
43
+ sudo apt install -y ccache ninja-build
44
+ arm-none-eabi-gcc -v | tee log.txt
45
+ (git status; git log -1)>> log.txt
46
+
47
+ - name : Cache CCache
48
+ id : ccache
49
+ uses : actions/cache@v3
50
+ with :
51
+ path : .ccache
52
+ key : ${{ runner.os }}-gcc-${{ matrix.gcc }}-${{ hashFiles('log.txt') }}
53
+ restore-keys : |
54
+ ${{ runner.os }}-gcc-${{ matrix.gcc }}-
55
+
56
+ - name : Configure CCache
57
+ run : |
58
+ ccache --set-config=cache_dir="$GITHUB_WORKSPACE/.ccache"
59
+ ccache --set-config=max_size=2Gi
60
+ ccache -s -z
61
+
62
+ - name : Compile
63
+ run : |
64
+ export PATH="/usr/lib/ccache:$ARM_NONE_EABI_GCC_PATH:/home/runner/.local/bin:$PATH"
65
+ progen generate -t cmake_gcc_arm global_workspace
66
+ cmake -DCMAKE_C_COMPILER_LAUNCHER=ccache -GNinja -S projectfiles/cmake_gcc_arm -B projectfiles/cmake_gcc_arm
67
+ ninja -C projectfiles/cmake_gcc_arm
68
+ ccache -s
You can’t perform that action at this time.
0 commit comments