Skip to content

Commit da1c314

Browse files
committed
add workflows
add workflows for doc and twister with sample yml Signed-off-by: Håvard Vermeer <havard.vermeer@nordicsemi.no>
1 parent 09154e8 commit da1c314

File tree

5 files changed

+117
-2
lines changed

5 files changed

+117
-2
lines changed
+37
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
name: Build and test app in NCS docker container
2+
3+
on:
4+
pull_request:
5+
push:
6+
7+
jobs:
8+
build-and-test-in-docker:
9+
runs-on: ubuntu-latest
10+
container: ghcr.io/nrfconnect/sdk-nrf-toolchain:v2.8.0
11+
defaults:
12+
run:
13+
# Bash shell is needed to set toolchain related environment variables in docker container
14+
# It is a workaround for GitHub Actions limitation https://github.com/actions/runner/issues/1964
15+
shell: bash
16+
steps:
17+
- name: Checkout repository with sb_fota sample
18+
uses: actions/checkout@v4
19+
with:
20+
path: sb_fota
21+
22+
- name: Prepare west project
23+
run: |
24+
west init -l sb_fota
25+
west update -o=--depth=1 -n
26+
27+
- name: Build firmware
28+
working-directory: sb_fota
29+
run: |
30+
west twister -T sample -v --inline-logs --integration
31+
32+
- name: Store hex files
33+
uses: actions/upload-artifact@v4
34+
with:
35+
name: built-applications
36+
path: sb_fota/twister-out/**/zephyr/zephyr.hex
37+

.github/workflows/docs.yml

+63
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
# Copyright (c) 2024, Nordic Semiconductor ASA
2+
# SPDX-License-Identifier: Apache-2.0
3+
4+
name: Documentation
5+
6+
on: [push, pull_request]
7+
8+
env:
9+
DOXYGEN_VERSION: 1.9.6
10+
11+
jobs:
12+
build:
13+
runs-on: ubuntu-latest
14+
steps:
15+
- name: Checkout
16+
uses: actions/checkout@v4
17+
18+
- name: Install dependencies
19+
run: |
20+
wget --no-verbose "https://github.com/doxygen/doxygen/releases/download/Release_${DOXYGEN_VERSION//./_}/doxygen-${DOXYGEN_VERSION}.linux.bin.tar.gz"
21+
tar xf doxygen-${DOXYGEN_VERSION}.linux.bin.tar.gz
22+
echo "${PWD}/doxygen-${DOXYGEN_VERSION}/bin" >> $GITHUB_PATH
23+
pip install -r doc/requirements.txt
24+
25+
- name: Build
26+
run: |
27+
cd doc
28+
doxygen
29+
30+
SPHINXOPTS="-W" make html
31+
32+
mkdir deploy
33+
mv _build_doxygen/html deploy/doxygen
34+
mv _build_sphinx/html/* deploy
35+
36+
- name: Setup pages
37+
if: github.event_name != 'pull_request'
38+
uses: actions/configure-pages@v4
39+
40+
- name: Upload pages artifact
41+
if: github.event_name != 'pull_request'
42+
uses: actions/upload-pages-artifact@v3
43+
with:
44+
path: doc/deploy
45+
46+
- name: Upload artifacts
47+
if: github.event_name == 'pull_request'
48+
uses: actions/upload-artifact@v4
49+
with:
50+
path: doc/deploy
51+
52+
deploy:
53+
runs-on: ubuntu-latest
54+
needs: build
55+
if: github.event_name != 'pull_request'
56+
permissions:
57+
pages: write
58+
id-token: write
59+
environment:
60+
name: github-pages # Add this line to specify environment
61+
steps:
62+
- name: Deploy to GitHub Pages
63+
uses: actions/deploy-pages@v4

doc/conf.py

-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@
2525

2626
extensions = [
2727
'breathe',
28-
'sphinxcontrib.mscgen',
2928
'sphinx_tabs.tabs',
3029
'sphinx_togglebutton',
3130
]

doc/requirements.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
Sphinx
2-
breathe
2+
breathe>=4.35.0
33
sphinx-ncs-theme==0.7.4
44
sphinx-tabs>=3.4
55
sphinx-togglebutton

sample/sample.yaml

+16
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
sample:
2+
description: Softbank FOTA sample
3+
name: Softbank FOTA
4+
tests:
5+
sample.sb_fota:
6+
sysbuild: true
7+
build_only: true
8+
integration_platforms:
9+
- nrf9160dk/nrf9160/ns
10+
- nrf9161dk/nrf9161/ns
11+
platform_allow:
12+
- nrf9160dk/nrf9160/ns
13+
- nrf9161dk/nrf9161/ns
14+
tags:
15+
- ci_build
16+
- sysbuild

0 commit comments

Comments
 (0)