task_runner: tasks: gnss: Zephyr API implementation #1947
Workflow file for this run
This file contains hidden or 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
# Copyright (c) 2020 Linaro Limited. | |
# SPDX-License-Identifier: Apache-2.0 | |
name: Documentation Build & Deploy | |
on: | |
push: | |
branches: | |
- main | |
- v* | |
pull_request: | |
paths: | |
- '.github/workflows/documentation.yml' | |
- 'doc/**' | |
- 'doc/requirements.txt' | |
- '**.rst' | |
- 'include/**' | |
- 'tests/**' | |
- '**/Kconfig*' | |
- 'west.yml' | |
env: | |
AWS_REGION: ap-southeast-2 | |
permissions: | |
id-token: write | |
contents: read | |
jobs: | |
doc-build-html: | |
name: "Documentation Build (HTML)" | |
runs-on: self-hosted | |
container: | |
image: ghcr.io/zephyrproject-rtos/ci-repo-cache:v0.28.4.20250818 | |
options: '--entrypoint /bin/bash' | |
volumes: | |
- /repo-cache/embeint:/github/cache/embeint | |
env: | |
# NOTE: west docstrings will be extracted from the version listed here | |
WEST_VERSION: 1.2.0 | |
# The latest CMake available directly with apt is 3.18, but we need >=3.20 | |
# so we fetch that through pip. | |
CMAKE_VERSION: 3.20.5 | |
DOXYGEN_VERSION: 1.14.0 | |
DOXYGEN_MD5SUM: e761a5097ae20ecccfd02041925f102a | |
BASE_REF: ${{ github.base_ref }} | |
ZEPHYR_TOOLCHAIN_VARIANT: zephyr | |
timeout-minutes: 10 | |
concurrency: | |
group: doc-build-html-${{ github.ref }} | |
cancel-in-progress: true | |
steps: | |
- name: Workspace cleanup | |
run: | | |
rm -rf ./{*,.*} | |
rm -rf infuse-sdk twister-out* | |
- name: Clone cached Infuse SDK repository | |
continue-on-error: true | |
run: | | |
git config --global --add safe.directory /github/cache/embeint/infuse-sdk/.git | |
git clone --shared /github/cache/embeint/infuse-sdk infuse-sdk | |
cd infuse-sdk | |
git remote set-url origin ${GITHUB_SERVER_URL}/${GITHUB_REPOSITORY} | |
- name: Checkout | |
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | |
with: | |
ref: ${{ github.event.pull_request.head.sha }} | |
path: infuse-sdk | |
fetch-depth: 0 | |
- name: Set up Python | |
uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0 | |
with: | |
python-version: 3.12 | |
cache: pip | |
cache-dependency-path: infuse-sdk/scripts/requirements-actions.txt | |
- name: Install Python packages | |
working-directory: infuse-sdk | |
run: | | |
pip install -r scripts/requirements-actions.txt --require-hashes | |
- name: Environment Setup | |
working-directory: infuse-sdk | |
run: | | |
if [ "${{github.event_name}}" = "pull_request" ]; then | |
git config --global user.email "[email protected]" | |
git config --global user.name "Embeint CI" | |
rm -fr ".git/rebase-apply" | |
git rebase origin/${BASE_REF} | |
git log --pretty=oneline | head -n 10 | |
fi | |
west init -l . || true | |
west config --global update.narrow true | |
west update --path-cache /github/cache/embeint | |
west forall -c 'git reset --hard HEAD' | |
echo "ZEPHYR_SDK_INSTALL_DIR=/opt/toolchains/zephyr-sdk-$( cat SDK_VERSION )" >> $GITHUB_ENV | |
- name: install-pkgs | |
shell: bash | |
run: | | |
sudo apt-get update | |
sudo apt-get install -y ninja-build graphviz lcov mscgen | |
rm -rf doxygen-* | |
wget --no-verbose "https://github.com/doxygen/doxygen/releases/download/Release_${DOXYGEN_VERSION//./_}/doxygen-${DOXYGEN_VERSION}.linux.bin.tar.gz" | |
echo "${DOXYGEN_MD5SUM} doxygen-${DOXYGEN_VERSION}.linux.bin.tar.gz" | md5sum -c | |
if [ $? -ne 0 ]; then | |
echo "Failed to verify doxygen tarball" | |
exit 1 | |
fi | |
tar xf doxygen-${DOXYGEN_VERSION}.linux.bin.tar.gz | |
echo "${PWD}/doxygen-${DOXYGEN_VERSION}/bin" >> $GITHUB_PATH | |
- name: Set up Python | |
uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0 | |
with: | |
python-version: 3.12 | |
cache: pip | |
cache-dependency-path: zephyr/doc/requirements.txt | |
- name: install-pip | |
run: | | |
pip install -r zephyr/doc/requirements.txt --require-hashes | |
pip install -r infuse-sdk/doc/requirements.txt | |
- name: build-docs | |
working-directory: infuse-sdk | |
shell: bash | |
run: | | |
if [[ "$GITHUB_REF" =~ "refs/tags/v" ]]; then | |
DOC_TAG="release" | |
else | |
DOC_TAG="development" | |
fi | |
if [[ "${{ github.event_name }}" == "pull_request" ]]; then | |
DOC_TARGET="html-fast" | |
else | |
DOC_TARGET="html" | |
fi | |
DOC_TAG=${DOC_TAG} SPHINXOPTS="-q -t publish" make -C doc ${DOC_TARGET} | |
- name: compress-docs | |
if: 0 | |
run: | | |
tar cfJ html-output.tar.xz --directory=infuse-sdk/doc/_build html | |
- name: upload-build | |
if: 0 | |
uses: actions/upload-artifact@v4 | |
with: | |
name: html-output | |
path: html-output.tar.xz | |
doc-publish: | |
name: Publish Documentation | |
if: 0 | |
runs-on: ubuntu-22.04 | |
needs: doc-build-html | |
steps: | |
- name: Download html artifacts | |
uses: actions/download-artifact@v4 | |
- name: Uncompress docs | |
run: | | |
ls -l | |
mkdir -p html-output | |
tar xf html-output/html-output.tar.xz -C html-output | |
- name: Configure AWS Credentials | |
uses: aws-actions/configure-aws-credentials@v4 | |
with: | |
role-to-assume: ${{ secrets.AWS_DEV_DOCS_ROLE_ARN }} | |
role-session-name: GitHub_to_AWS_via_FederatedOIDC | |
aws-region: ${{ env.AWS_REGION }} | |
- name: Upload to AWS S3 | |
env: | |
HEAD_BRANCH: ${{ github.event.workflow_run.head_branch }} | |
run: | | |
if [ "${HEAD_BRANCH:0:1}" == "v" ]; then | |
VERSION=${HEAD_BRANCH:1} | |
else | |
VERSION="latest" | |
fi | |
echo "Uploading to s3://dev.infuse-iot.com/${VERSION}" | |
aws s3 sync --quiet html-output/html s3://dev.infuse-iot.com/${VERSION} --delete | |
- name: Invalidate CloudFront | |
env: | |
HEAD_BRANCH: ${{ github.event.workflow_run.head_branch }} | |
run: | | |
if [ "${HEAD_BRANCH:0:1}" == "v" ]; then | |
VERSION=${HEAD_BRANCH:1} | |
else | |
VERSION="latest" | |
fi | |
echo "Invalidating CloudFront cache for ${VERSION}" | |
aws cloudfront create-invalidation --distribution-id ${{ secrets.AWS_DEV_CLOUDFRONT_DIST_ID }} --paths "/${VERSION}/*" |