-
Notifications
You must be signed in to change notification settings - Fork 13.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
62 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
name: Build all targets | ||
|
||
on: | ||
push: | ||
branches: | ||
- 'mrpollo/ci_runner_groups' | ||
|
||
jobs: | ||
group_targets: | ||
runs-on: ubuntu-latest | ||
container: px4io/px4-dev-base-focal:2021-09-08 | ||
outputs: | ||
matrix: ${{ steps.set-matrix.outputs.matrix }} | ||
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)" | ||
|
||
setup: | ||
runs-on: ubuntu-latest | ||
needs: group_targets | ||
strategy: | ||
matrix: ${{ fromJson(needs.group_targets.outputs.matrix) }} | ||
container: ${{ matrix.container }} | ||
steps: | ||
- uses: actions/checkout@v1 | ||
with: | ||
token: ${{ secrets.ACCESS_TOKEN }} | ||
- name: ownership workaround | ||
run: git config --system --add safe.directory '*' | ||
- name: ccache setup timestamp | ||
id: ccache_cache_timestamp | ||
shell: cmake -P {0} | ||
run: | | ||
string(TIMESTAMP current_date "%Y-%m-%d-%H;%M;%S" UTC) | ||
message("::set-output name=timestamp::${current_date}") | ||
- name: ccache setup keys | ||
uses: actions/cache@v2 | ||
with: | ||
path: ~/.ccache | ||
key: ${{ matrix.arch }}-ccache-${{ steps.ccache_cache_timestamp.outputs.timestamp }} | ||
restore-keys: ${{ matrix.arch }}-ccache- | ||
- 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: | | ||
for target in ${matrix.targets//,/ } | ||
do | ||
make $target | ||
done | ||
- name: ccache post-run | ||
run: ccache -s |