Skip to content

Merge pull request #1679 from bitcraze/Aris/remove-apps #2619

Merge pull request #1679 from bitcraze/Aris/remove-apps

Merge pull request #1679 from bitcraze/Aris/remove-apps #2619

Workflow file for this run

# CI jobs
name: CI
# Controls when the action will run. Triggers the workflow on push or pull request
# events but only for the master branch
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
schedule:
# Weekly build to make sure dependencies are OK
- cron: '30 16 * * 1'
workflow_dispatch:
permissions:
contents: read
jobs:
read_targets_from_file:
uses: bitcraze/workflows/.github/workflows/read_build_targets.yml@41b8cc3c616fd6fad685c3411f21f72646333b19
with:
target_file: './build_targets.json'
basic_build:
needs: read_targets_from_file
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
${{fromJson(needs.read_targets_from_file.outputs.platforms)}}
steps:
- name: Checkout Repo
uses: actions/checkout@v7
with:
submodules: true
- name: build
run: docker run --rm -v ${PWD}:/module bitcraze/builder bash -c "make ${{ matrix.platform }}_defconfig && ./tools/build/build UNIT_TEST_STYLE=min"
- name: Upload Build Artifact
uses: actions/upload-artifact@v7
with:
name: ${{ matrix.platform }}-${{ github.sha }}
path: |
build/${{ matrix.platform }}.bin
build/${{ matrix.platform }}.elf
features:
runs-on: ubuntu-latest
needs: basic_build
strategy:
fail-fast: false
matrix:
features:
# Build cf2 with bosch sensors
- bosch.conf
# Build cf2 with TDMA
- loco_tdma.conf
# Build cf2 with TDOA2 positioning mode
- loco_tdoa2.conf
#- LPS_TDOA_ENABLE=1
# Build cf2 with TDOA3 positioning mode
- loco_tdoa3.conf
#- LPS_TDOA3_ENABLE=1
# Build cf2 with TDOA3 and all config options
- loco_tdoa3_all.conf
# Build Bigquad deck with all config options
- bigquad.conf
# Build API test app layer app
- app_api.conf
env:
CONF: ${{ matrix.features }}
steps:
- name: Checkout Repo
uses: actions/checkout@v7
with:
submodules: true
- name: build
run: docker run --rm -v ${PWD}:/module bitcraze/builder bash -c "./scripts/kconfig/merge_config.sh configs/${CONF} configs/defconfig && ./tools/build/build UNIT_TEST_STYLE=min"
apps:
runs-on: ubuntu-latest
needs: basic_build
strategy:
fail-fast: false
matrix:
example:
- examples/app_hello_world
- examples/app_hello_world-cpp
- examples/app_hello_file_tree
- examples/app_peer_to_peer
- examples/app_p2p_DTR
- examples/app_stm_gap8_cpx
env:
EXAMPLE: ${{ matrix.example }}
steps:
- name: Checkout Repo
uses: actions/checkout@v7
with:
submodules: true
- name: build
run: docker run --rm -v ${PWD}:/module bitcraze/builder bash -c "./tools/build/make_app ${EXAMPLE}"
kbuild-targets:
runs-on: ubuntu-latest
needs: basic_build
strategy:
fail-fast: false
matrix:
target:
- allyesconfig
- allnoconfig
include:
- target: allyesconfig
build_flag: --tolerate-ccmram-overflow
env:
TARGET: ${{ matrix.target }}
BUILD_FLAG: ${{ matrix.build_flag }}
steps:
- name: Checkout Repo
uses: actions/checkout@v7
with:
submodules: true
- name: build
run: docker run --rm -v ${PWD}:/module bitcraze/builder bash -c "KCONFIG_ALLCONFIG=configs/all.config make ${TARGET} && ./tools/build/build ${BUILD_FLAG} UNIT_TEST_STYLE=min"
kbuild-targets-random:
runs-on: ubuntu-latest
needs: basic_build
if: github.event_name == 'schedule' || github.event_name == 'workflow_dispatch'
env:
RANDOM_BUILD_COUNT: '5'
steps:
- name: Checkout Repo
uses: actions/checkout@v4
with:
submodules: true
- name: build
# A new KCONFIG_SEED (derived from the commit SHA) is used for each iteration
run: |
docker run --rm \
-e GITHUB_SHA \
-e RANDOM_BUILD_COUNT \
-v ${PWD}:/module bitcraze/builder bash -c '
FAIL_COUNT=0
for i in $(seq 1 "$RANDOM_BUILD_COUNT"); do
SEED=$(( 0x${GITHUB_SHA:0:8} + i ))
echo "=== Random build $i/$RANDOM_BUILD_COUNT ==="
if ! KCONFIG_SEED=$SEED KCONFIG_ALLCONFIG=configs/all.config make randconfig || ! ./tools/build/build UNIT_TEST_STYLE=min; then
FAIL_COUNT=$((FAIL_COUNT + 1))
fi
done
if [ "$FAIL_COUNT" -ne 0 ]; then
echo "ERROR: $FAIL_COUNT/$RANDOM_BUILD_COUNT random builds failed"
fi
exit $FAIL_COUNT
'