-
Notifications
You must be signed in to change notification settings - Fork 13.5k
66 lines (58 loc) · 2.01 KB
/
build_all_targets.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
name: Build all targets
on:
push:
branches:
- 'mrpollo/ci_runner_groups'
jobs:
group_targets:
runs-on: [runs-on,runner=8cpu-linux-x64,"run-id=${{ github.run_id }}"]
container:
image: px4io/px4-dev-base-focal:2021-09-08
options: --user 1000
outputs:
matrix: ${{ steps.set-matrix.outputs.matrix }}
timestamp: ${{ steps.set-timestamp.outputs.timestamp }}
steps:
- uses: actions/checkout@v1
with:
token: ${{ secrets.ACCESS_TOKEN }}
- id: set-matrix
run: echo "::set-output name=matrix::$(./Tools/generate_board_targets_json.py --group)"
- id: set-timestamp
run: echo "::set-output name=timestamp::$(date +"%Y%m%d%H%M%S")"
setup:
name: ${{ matrix.group }}
runs-on: self-hosted
needs: group_targets
strategy:
matrix: ${{ fromJson(needs.group_targets.outputs.matrix) }}
container:
image: ${{ matrix.container }}
options: --user 1000
steps:
- uses: actions/checkout@v1
with:
token: ${{ secrets.ACCESS_TOKEN }}
# - name: ownership workaround
# run: git config --system --add safe.directory '*'
- name: ccache setup keys
uses: actions/cache@v3
with:
path: ~/.ccache
key: ${{ matrix.arch }}-ccache-${{ needs.group_targets.outputs.timestamp }}
restore-keys: ${{ matrix.arch }}-ccache-${{ needs.group_targets.outputs.timestamp }}
- name: setup ccache
run: |
mkdir -p ~/.ccache
echo "base_dir = ${GITHUB_WORKSPACE}" > ~/.ccache/ccache.conf
echo "compression = true" >> ~/.ccache/ccache.conf
echo "compression_level = 6" >> ~/.ccache/ccache.conf
echo "max_size = 120M" >> ~/.ccache/ccache.conf
echo "hash_dir = false" >> ~/.ccache/ccache.conf
ccache -s
ccache -z
- name: build target group
run: |
./Tools/ci_build_all_runner.sh ${{matrix.targets}}
- name: ccache post-run
run: ccache -s