Skip to content

Improve Zephyr environment management + improve integration test reliability #197

Improve Zephyr environment management + improve integration test reliability

Improve Zephyr environment management + improve integration test reliability #197

Workflow file for this run

name: ci
on:
pull_request:
push:
branches:
- main
jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Lint
run: |
make fmt
build:
runs-on: ubuntu-latest
env:
UV_CACHE_DIR: /tmp/.uv-cache
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
submodules: false # We'll handle submodules with smart caching
fetch-depth: 0
- name: Cache bin
uses: actions/cache@v4
with:
path: |
bin
key: bin-${{ runner.os }}-${{ hashFiles('Makefile') }}
restore-keys: |
bin-${{ runner.os }}-${{ hashFiles('Makefile') }}
bin-${{ runner.os }}
- name: Download bin tools
if: steps.cache-bin.outputs.cache-hit != 'true'
run: |
make download-bin
- name: Submodule Cache Key
run: |
echo "submodule_cache_key=$(git submodule | sha256)" >> $GITHUB_OUTPUT
shell: bash
- name: Cache submodules
id: cache-submodules
uses: actions/cache@v4
with:
path: |
lib/fprime
lib/fprime-zephyr
lib/zephyr-workspace/zephyr
key: submodules-${{ runner.os }}-${{ steps.get-date.outputs.submodule_cache_key }}
restore-keys: |
submodules-${{ runner.os }}-${{ steps.get-date.outputs.submodule_cache_key }}
submodules-${{ runner.os }}
- name: Setup submodules
if: steps.cache-submodules.outputs.cache-hit != 'true'
run: |
make submodules
- name: Restore uv cache
uses: actions/cache@v4
with:
path: /tmp/.uv-cache
key: uv-${{ runner.os }}-${{ hashFiles('uv.lock') }}
restore-keys: |
uv-${{ runner.os }}-${{ hashFiles('uv.lock') }}
uv-${{ runner.os }}
- name: Setup python venv
run: |
make fprime-venv
# - name: Cache Zephyr workspace and SDK
# id: cache-zephyr
# uses: actions/cache@v4
# with:
# path: |
# lib/zephyr-workspace/modules
# lib/zephyr-workspace/bootloader
# ~/zephyr-sdk-0.17.2
# key: zephyr-${{ hashFiles('west.yml') }}-${{ runner.os }}-v3
# restore-keys: |
# zephyr-${{ hashFiles('west.yml') }}-${{ runner.os }}-
# zephyr-
- name: Setup Zephyr
if: steps.cache-zephyr.outputs.cache-hit != 'true'
run: |
make zephyr-setup
env:
PIP_DISABLE_PIP_VERSION_CHECK: 1
PIP_NO_COMPILE: 1
- name: Build
run: |
make generate-ci build-ci
- name: Upload build artifacts
uses: actions/upload-artifact@v4
with:
name: artifacts
path: |
build-artifacts/zephyr.uf2
build-artifacts/zephyr/fprime-zephyr-deployment/dict/ReferenceDeploymentTopologyDictionary.json
retention-days: 30
- name: Minimize uv cache
run: make minimize-uv-cache