add gdb to the ci config #289
Workflow file for this run
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
name: build & test | |
on: [push, pull_request] | |
jobs: | |
# This workflow contains 2 jobs build and test | |
build: | |
name: Build uoscore-uedhoc | |
runs-on: ubuntu-latest | |
steps: | |
- name: Install Zephyr tools | |
run: | | |
wget https://apt.kitware.com/kitware-archive.sh | |
sudo bash kitware-archive.sh | |
sudo apt install --no-install-recommends git cmake ninja-build gperf ccache dfu-util device-tree-compiler wget python3-dev python3-pip python3-setuptools python3-tk python3-wheel xz-utils file make gcc gcc-multilib g++-multilib libsdl2-dev libmagic1 lcov gdb | |
cmake --version | |
python3 --version | |
dtc --version | |
sudo apt install python3-venv | |
python3 -m venv ~/zephyrproject/.venv | |
source ~/zephyrproject/.venv/bin/activate | |
pip3 install west | |
west init ~/zephyrproject | |
cd ~/zephyrproject | |
west update | |
west zephyr-export | |
pip install -r ~/zephyrproject/zephyr/scripts/requirements.txt | |
cd ~ | |
wget https://github.com/zephyrproject-rtos/sdk-ng/releases/download/v0.16.3/zephyr-sdk-0.16.3_linux-x86_64.tar.xz | |
wget -O - https://github.com/zephyrproject-rtos/sdk-ng/releases/download/v0.16.3/sha256.sum | shasum --check --ignore-missing | |
tar xvf zephyr-sdk-0.16.3_linux-x86_64.tar.xz | |
cd zephyr-sdk-0.16.3 | |
/bin/bash -c "yes | ./setup.sh" | |
- name: Checkout code | |
uses: actions/checkout@v2 | |
with: | |
submodules: recursive | |
### build, test and archive | |
# native_posix (0x68) | |
- name: Build native_posix | |
run: | | |
source ~/zephyrproject/zephyr/zephyr-env.sh | |
source ~/zephyrproject/.venv/bin/activate | |
cd test/ | |
bash ci_scripts/test_build_options.sh | |
- name: Archive static lib | |
uses: actions/upload-artifact@v2 | |
with: | |
name: uoscore-uedhoc-x86 | |
path: test/build/uoscore_uedhoc/libuoscore-uedhoc.a | |
# native_posix_64 | |
- name: Build native_posix_64 | |
run: | | |
source ~/zephyrproject/zephyr/zephyr-env.sh | |
source ~/zephyrproject/.venv/bin/activate | |
cd test/ | |
rm -rf build | |
rm -rf build_lib_test | |
west build -b=native_posix_64 | |
west build -t run | |
- name: Archive static lib | |
uses: actions/upload-artifact@v2 | |
with: | |
name: uoscore-uedhoc-x86-64 | |
path: test/build/uoscore_uedhoc/libuoscore-uedhoc.a | |
### Generate test coverage/stack/flash report | |
- name: Build native_posix with coverage information | |
run: | | |
source ~/zephyrproject/zephyr/zephyr-env.sh | |
source ~/zephyrproject/.venv/bin/activate | |
cd test/ | |
rm -rf build | |
rm -rf build_lib_test | |
west build -b native_posix -- -DCONFIG_COVERAGE=y | |
west build -t run | |
lcov --capture --directory ./ --output-file lcov.info -q --rc lcov_branch_coverage=1 | |
genhtml lcov.info --output-directory lcov_html -q --ignore-errors source --branch-coverage --highlight --legend | |
tar -zcvf github-pages.tar.gz lcov_html | |
bash ci_scripts/flash_report_gen.sh | |
bash ci_scripts/stack_report_gen.sh | |
- name: Upload test coverage report | |
uses: actions/upload-pages-artifact@v1 | |
with: | |
name: github-pages | |
path: test/lcov_html | |
- name: Upload rom report | |
uses: actions/upload-pages-artifact@v1 | |
with: | |
name: github-pages | |
path: build_reports/rom_report_nrf91_with_tinycrypt.txt | |
- name: Upload stack report | |
uses: actions/upload-pages-artifact@v1 | |
with: | |
name: github-pages | |
path: build_reports/stack_report.html | |
# Deploy job | |
deploy: | |
# Add a dependency to the build job | |
needs: build | |
# Grant GITHUB_TOKEN the permissions required to make a Pages deployment | |
permissions: | |
pages: write # to deploy to Pages | |
id-token: write # to verify the deployment originates from an appropriate source | |
# Deploy to the github-pages environment | |
environment: | |
name: github-pages | |
url: ${{ steps.deployment.outputs.page_url }} | |
# Specify runner + deployment step | |
runs-on: ubuntu-latest | |
steps: | |
- name: Deploy to GitHub Pages | |
id: deployment | |
uses: actions/deploy-pages@v1 |