Skip to content

Replace global assert hook with static class member #3838

Replace global assert hook with static class member

Replace global assert hook with static class member #3838

# Cross-compile https://github.com/fprime-community/fprime-workshop-led-blinker
# Runs integration tests on RaspberryPi
name: "External Repo: RPI LedBlinker"
on:
push:
branches: [devel, release/**]
pull_request:
# The branches below must be a subset of the branches above
branches: [devel, release/**]
paths-ignore:
- "docs/**"
- "**.md"
- ".github/actions/spelling/**"
- ".github/ISSUE_TEMPLATE/**"
# Cancel in-progress runs if a newer run is started on a given PR
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: ${{ !contains(github.ref, 'devel') && !contains(github.ref, 'release/')}}
env:
RPI_TOOLCHAIN_DIR: /tmp/rpi-toolchain
FPRIME_LOCATION: ./lib/fprime
jobs:
get-branch:
name: "Get target branch"
uses: ./.github/workflows/reusable-get-pr-branch.yml
with:
target_repository: fprime-community/fprime-workshop-led-blinker
cross-compilation:
name: "Cross Compilation"
runs-on: ubuntu-22.04
needs: get-branch
steps:
- name: "Checkout target repository"
uses: actions/checkout@v4
with:
submodules: false
repository: fprime-community/fprime-workshop-led-blinker
ref: ${{ needs.get-branch.outputs.target-branch }}
- name: "Overlay current F´ revision"
uses: actions/checkout@v4
with:
submodules: true
path: ${{ env.FPRIME_LOCATION }}
fetch-depth: 0
- uses: ./lib/fprime/.github/actions/setup
with:
location: ${{ env.FPRIME_LOCATION }}
- name: "Setup RPI Toolchain"
uses: fprime-community/setup-rpi-sysroot@main
- name: "Generate RPI Build Cache"
run: |
fprime-util generate raspberrypi
- name: "Build RPI"
run: |
cd LedBlinker/LedBlinkerDeployment
fprime-util build raspberrypi
- name: "Prepare artifacts"
run: |
mkdir -p rpi-artifacts
cp -r ./build-artifacts rpi-artifacts
cp -r LedBlinker/Components/Led/test/int rpi-artifacts
- name: "Archive Build Artifacts"
uses: actions/upload-artifact@v4
with:
name: rpi-artifacts
path: rpi-artifacts
retention-days: 5
RPI-integration:
name: "RPI Integration Tests"
runs-on: [self-hosted, raspberrypi]
needs: cross-compilation
steps:
- name: "Checkout F´ Repository"
uses: actions/checkout@v4
with:
sparse-checkout: "requirements.txt"
sparse-checkout-cone-mode: false
- name: "Setup environment"
run: |
python -m venv venv
. venv/bin/activate
pip install --upgrade pip
pip install -r requirements.txt
- name: "Artifacts Download"
uses: actions/download-artifact@v4
with:
name: rpi-artifacts
- name: Run Integration Tests
run: |
DEPLOYMENT=LedBlinker_LedBlinkerDeployment
. venv/bin/activate
mkdir -p ci-logs
chmod +x ./build-artifacts/raspberrypi/${DEPLOYMENT}/bin/${DEPLOYMENT}
fprime-gds --ip-client -d ./build-artifacts/raspberrypi/${DEPLOYMENT} --logs ./ci-logs &
sleep 10
pytest --dictionary ./build-artifacts/raspberrypi/${DEPLOYMENT}/dict/LedBlinkerDeploymentTopologyDictionary.json ./int/led_integration_tests.py
- name: "Archive logs"
uses: actions/upload-artifact@v4
if: always()
with:
name: rpi-logs
path: ci-logs
retention-days: 5