2023-04-03 21:21:27 +08:00
|
|
|
name: BabbleSim BT Tests
|
2021-04-23 01:13:07 +08:00
|
|
|
|
|
|
|
on:
|
2022-02-23 23:37:23 +08:00
|
|
|
pull_request:
|
2021-04-23 01:13:07 +08:00
|
|
|
paths:
|
2023-04-03 21:21:27 +08:00
|
|
|
- ".github/workflows/bsim-tests-bluetooth.yaml"
|
|
|
|
- ".github/workflows/bsim-tests-publish.yaml"
|
2021-04-23 01:13:07 +08:00
|
|
|
- "west.yml"
|
|
|
|
- "subsys/bluetooth/**"
|
2023-04-03 21:21:27 +08:00
|
|
|
- "tests/bsim/bluetooth/**"
|
2023-03-07 00:42:40 +08:00
|
|
|
- "samples/bluetooth/**"
|
2021-04-23 01:13:07 +08:00
|
|
|
- "boards/posix/**"
|
|
|
|
- "soc/posix/**"
|
|
|
|
- "arch/posix/**"
|
|
|
|
|
2022-10-14 00:31:54 +08:00
|
|
|
concurrency:
|
|
|
|
group: ${{ github.workflow }}-${{ github.event_name }}-${{ github.head_ref || github.ref }}
|
|
|
|
cancel-in-progress: true
|
|
|
|
|
2021-04-23 01:13:07 +08:00
|
|
|
jobs:
|
2023-04-03 21:21:27 +08:00
|
|
|
bsim-test-bluetooth:
|
2022-11-23 14:38:05 +08:00
|
|
|
if: github.repository_owner == 'zephyrproject-rtos'
|
|
|
|
runs-on: zephyr-runner-linux-x64-4xlarge
|
2021-04-23 01:13:07 +08:00
|
|
|
container:
|
2023-04-13 19:46:58 +08:00
|
|
|
image: ghcr.io/zephyrproject-rtos/ci:v0.26.1
|
2021-04-23 01:13:07 +08:00
|
|
|
options: '--entrypoint /bin/bash'
|
2022-11-23 14:38:05 +08:00
|
|
|
volumes:
|
|
|
|
- /repo-cache/zephyrproject:/github/cache/zephyrproject
|
2021-04-23 01:13:07 +08:00
|
|
|
env:
|
|
|
|
ZEPHYR_TOOLCHAIN_VARIANT: zephyr
|
2023-03-15 20:51:42 +08:00
|
|
|
ZEPHYR_SDK_INSTALL_DIR: /opt/toolchains/zephyr-sdk-0.16.0
|
2021-04-23 01:13:07 +08:00
|
|
|
BSIM_OUT_PATH: /opt/bsim/
|
|
|
|
BSIM_COMPONENTS_PATH: /opt/bsim/components
|
|
|
|
EDTT_PATH: ../tools/edtt
|
2023-03-21 22:11:02 +08:00
|
|
|
bsim_test_results_file: ./bsim_out/bsim_results.xml
|
2021-04-23 01:13:07 +08:00
|
|
|
steps:
|
2022-04-15 02:35:57 +08:00
|
|
|
- name: Apply container owner mismatch workaround
|
|
|
|
run: |
|
|
|
|
# FIXME: The owner UID of the GITHUB_WORKSPACE directory may not
|
|
|
|
# match the container user UID because of the way GitHub
|
|
|
|
# Actions runner is implemented. Remove this workaround when
|
|
|
|
# GitHub comes up with a fundamental fix for this problem.
|
|
|
|
git config --global --add safe.directory ${GITHUB_WORKSPACE}
|
|
|
|
|
2022-11-23 14:38:05 +08:00
|
|
|
- name: Clone cached Zephyr repository
|
|
|
|
continue-on-error: true
|
2021-04-23 01:13:07 +08:00
|
|
|
run: |
|
2022-11-23 14:38:05 +08:00
|
|
|
git clone --shared /github/cache/zephyrproject/zephyr .
|
|
|
|
git remote set-url origin ${GITHUB_SERVER_URL}/${GITHUB_REPOSITORY}
|
2021-04-23 01:13:07 +08:00
|
|
|
|
2022-11-23 14:38:05 +08:00
|
|
|
- name: Checkout
|
2022-10-14 01:48:20 +08:00
|
|
|
uses: actions/checkout@v3
|
2022-03-04 17:24:33 +08:00
|
|
|
with:
|
|
|
|
fetch-depth: 0
|
2021-04-23 01:13:07 +08:00
|
|
|
|
2022-11-23 14:38:05 +08:00
|
|
|
- name: Environment Setup
|
2022-03-01 23:02:14 +08:00
|
|
|
env:
|
|
|
|
BASE_REF: ${{ github.base_ref }}
|
2021-04-23 01:13:07 +08:00
|
|
|
run: |
|
2022-11-23 14:38:05 +08:00
|
|
|
git config --global user.email "bot@zephyrproject.org"
|
|
|
|
git config --global user.name "Zephyr Bot"
|
|
|
|
rm -fr ".git/rebase-apply"
|
2022-03-01 23:02:14 +08:00
|
|
|
git rebase origin/${BASE_REF}
|
2022-11-23 14:38:05 +08:00
|
|
|
git log --pretty=oneline | head -n 10
|
2021-04-23 01:13:07 +08:00
|
|
|
west init -l . || true
|
2022-11-23 14:38:05 +08:00
|
|
|
west config manifest.group-filter -- +ci
|
2021-11-16 21:53:30 +08:00
|
|
|
west config --global update.narrow true
|
2022-11-23 14:38:05 +08:00
|
|
|
west update --path-cache /github/cache/zephyrproject 2>&1 1> west.update.log || west update --path-cache /github/cache/zephyrproject 2>&1 1> west.update.log || ( rm -rf ../modules ../bootloader ../tools && west update --path-cache /github/cache/zephyrproject)
|
|
|
|
west forall -c 'git reset --hard HEAD'
|
2021-04-23 01:13:07 +08:00
|
|
|
|
2023-04-03 21:21:27 +08:00
|
|
|
- name: Run Bluetooth Tests with BSIM
|
2021-04-23 01:13:07 +08:00
|
|
|
run: |
|
|
|
|
export ZEPHYR_BASE=${PWD}
|
2023-04-03 21:21:27 +08:00
|
|
|
WORK_DIR=${ZEPHYR_BASE}/bsim_out tests/bsim/bluetooth/compile.sh
|
2023-03-21 22:11:02 +08:00
|
|
|
RESULTS_FILE=${ZEPHYR_BASE}/${bsim_test_results_file} \
|
2023-04-03 21:21:27 +08:00
|
|
|
SEARCH_PATH=tests/bsim/bluetooth/ tests/bsim/run_parallel.sh
|
2021-04-23 01:13:07 +08:00
|
|
|
|
|
|
|
- name: Upload Test Results
|
|
|
|
if: always()
|
2022-10-14 01:57:47 +08:00
|
|
|
uses: actions/upload-artifact@v3
|
2021-04-23 01:13:07 +08:00
|
|
|
with:
|
2023-03-21 22:11:02 +08:00
|
|
|
name: bsim-test-results
|
2022-02-23 23:37:23 +08:00
|
|
|
path: |
|
2023-03-21 22:11:02 +08:00
|
|
|
./bsim_out/bsim_results.xml
|
2022-02-23 23:37:23 +08:00
|
|
|
${{ github.event_path }}
|
2021-04-23 01:13:07 +08:00
|
|
|
|
2022-02-23 23:37:23 +08:00
|
|
|
- name: Upload Event Details
|
|
|
|
if: always()
|
2022-10-14 01:57:47 +08:00
|
|
|
uses: actions/upload-artifact@v3
|
2021-04-23 01:13:07 +08:00
|
|
|
with:
|
2022-02-23 23:37:23 +08:00
|
|
|
name: event
|
|
|
|
path: |
|
|
|
|
${{ github.event_path }}
|