Automated Integration Tests #191
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
| 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 | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| with: | |
| submodules: false # We'll handle submodules with smart caching | |
| fetch-depth: 0 | |
| # - name: Cache bin | |
| # id: cache-bin | |
| # uses: actions/cache@v4 | |
| # with: | |
| # path: | | |
| # bin | |
| # key: bin-${{ hashFiles('Makefile') }}-v3 | |
| # restore-keys: | | |
| # bin-${{ hashFiles('Makefile') }}- | |
| # bin- | |
| - name: Download bin tools | |
| if: steps.cache-bin.outputs.cache-hit != 'true' | |
| run: | | |
| make download-bin | |
| # - name: Cache submodules | |
| # id: cache-submodules | |
| # uses: actions/cache@v4 | |
| # with: | |
| # path: | | |
| # lib/fprime | |
| # lib/fprime-zephyr | |
| # lib/zephyr-workspace/zephyr | |
| # key: submodules-${{ hashFiles('.gitmodules') }}-v3 | |
| # restore-keys: | | |
| # submodules-${{ hashFiles('.gitmodules') }}- | |
| # submodules- | |
| - name: Setup submodules | |
| if: steps.cache-submodules.outputs.cache-hit != 'true' | |
| run: | | |
| make submodules | |
| # - name: Cache python venv | |
| # id: cache-python | |
| # uses: actions/cache@v4 | |
| # with: | |
| # path: fprime-venv | |
| # key: python-venv-${{ runner.os }}-${{ hashFiles('requirements.txt') }}-v3 | |
| # restore-keys: | | |
| # python-venv-${{ runner.os }}- | |
| # python-venv- | |
| - name: Setup python venv | |
| if: steps.cache-python.outputs.cache-hit != 'true' | |
| 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 | |
| integration: | |
| runs-on: [self-hosted, integration] | |
| needs: build | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/download-artifact@v5 | |
| - name: Set up dependencies | |
| run: | | |
| mkdir -p build-artifacts/zephyr/fprime-zephyr-deployment/dict && mv zephyr/fprime-zephyr-deployment/dict/ReferenceDeploymentTopologyDictionary.json build-artifacts/zephyr/fprime-zephyr-deployment/dict | |
| make submodules | |
| make fprime-venv | |
| - name: Trigger Bootloader | |
| run: | | |
| make bootloader | |
| sleep 10 | |
| - name: Copy Firmware | |
| run: | | |
| picotool load ./zephyr.uf2 | |
| picotool reboot | |
| - name: Run Integration Tests | |
| run: | | |
| make test-integration |