mirror of
https://github.com/nasa/fprime.git
synced 2025-12-10 00:44:37 -06:00
Update CI to use Json dictionaries (#2806)
* Change CI to use Json dictionaries * Bumping to gds/tools for alpha release of JSON dictionary * Change Workflow RPI Dictionary to JSON * Install requirements.txt on RPIs for integration tests --------- Co-authored-by: M Starch <LeStarch@googlemail.com> Co-authored-by: Thomas Boyer-Chammard <49786685+thomas-bc@users.noreply.github.com>
This commit is contained in:
parent
fd117428d2
commit
4476828cb3
15
.github/workflows/build-test-rpi.yml
vendored
15
.github/workflows/build-test-rpi.yml
vendored
@ -17,7 +17,7 @@ on:
|
||||
- '.github/ISSUE_TEMPLATE/**'
|
||||
env:
|
||||
RPI_TOOLCHAIN_DIR: /tmp/rpi-toolchain
|
||||
DICTIONARY_PATH: build-artifacts/raspberrypi/RPI/dict/RPITopologyAppDictionary.xml
|
||||
DICTIONARY_PATH: build-artifacts/raspberrypi/RPI/dict/RPITopologyDictionary.json
|
||||
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
|
||||
jobs:
|
||||
RPI:
|
||||
@ -55,12 +55,23 @@ jobs:
|
||||
runs-on: self-hosted
|
||||
needs: RPI
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
sparse-checkout: 'requirements.txt'
|
||||
- name: "Setup environment"
|
||||
run: |
|
||||
python -m venv venv
|
||||
. venv/bin/activate
|
||||
pip install -r requirements.txt
|
||||
- name: RPI Build Download
|
||||
uses: actions/download-artifact@v3
|
||||
with:
|
||||
name: rpi-build
|
||||
- name: RPI Integration Tests
|
||||
run: chmod +x RPI/build-artifacts/raspberrypi/RPI/bin/RPI; /bin/bash ci/tests/RPI-Ints.bash
|
||||
run: |
|
||||
chmod +x RPI/build-artifacts/raspberrypi/RPI/bin/RPI
|
||||
. venv/bin/activate
|
||||
/bin/bash ci/tests/RPI-Ints.bash
|
||||
# Archive the outputs
|
||||
- name: 'Archive Logs'
|
||||
uses: actions/upload-artifact@v3
|
||||
|
||||
@ -70,11 +70,15 @@ jobs:
|
||||
runs-on: self-hosted
|
||||
needs: cross-compilation
|
||||
steps:
|
||||
- name: "Checkout F´ Repository"
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
sparse-checkout: 'requirements.txt'
|
||||
- name: "Setup environment"
|
||||
run: |
|
||||
python -m venv venv
|
||||
. venv/bin/activate
|
||||
pip install fprime-gds
|
||||
pip install -r requirements.txt
|
||||
- name: "Artifacts Download"
|
||||
uses: actions/download-artifact@v3
|
||||
with:
|
||||
@ -86,7 +90,7 @@ jobs:
|
||||
chmod +x ./build-artifacts/raspberrypi/LedBlinker/bin/LedBlinker
|
||||
fprime-gds --ip-client -d ./build-artifacts/raspberrypi/LedBlinker --logs ./ci-logs &
|
||||
sleep 10
|
||||
pytest --dictionary ./build-artifacts/raspberrypi/LedBlinker/dict/LedBlinkerTopologyAppDictionary.xml ./int/led_integration_tests.py
|
||||
pytest --dictionary ./build-artifacts/raspberrypi/LedBlinker/dict/LedBlinkerTopologyDictionary.json ./int/led_integration_tests.py
|
||||
- name: 'Archive logs'
|
||||
uses: actions/upload-artifact@v3
|
||||
if: always()
|
||||
|
||||
@ -83,7 +83,7 @@ home network where the pi and the user's computer are connected to the same netw
|
||||
|
||||
```
|
||||
cd fprime/RPI
|
||||
fprime-gds -n --dictionary ./build-artifacts/raspberrypi/dict/RPITopologyAppDictionary.xml
|
||||
fprime-gds -n --dictionary ./build-artifacts/raspberrypi/dict/RPITopologyDictionary.json
|
||||
```
|
||||
The ground station should now appear in the user's default browser. Should the user wish to terminate the ground system, return to that terminal
|
||||
and press CTRL-C to shut it down. Please allow it a few moments to finalize and exit. The user may then kill the browser tab displaying the GUI.
|
||||
|
||||
@ -69,7 +69,7 @@ function integration_test_run {
|
||||
mkdir -p "${LOG_DIR}/gds-logs"
|
||||
# Start the GDS layer and give it time to run
|
||||
echo "[INFO] Starting headless GDS layer"
|
||||
fprime-gds -n --dictionary "${ROOTDIR}/"*"/${BINARY}/dict/${BINARY}TopologyAppDictionary.xml" -g none -l "${LOG_DIR}/gds-logs" 1>${LOG_DIR}/gds-logs/fprime-gds.stdout.log 2>${LOG_DIR}/gds-logs/fprime-gds.stderr.log &
|
||||
fprime-gds -n --dictionary "${ROOTDIR}/"*"/${BINARY}/dict/${BINARY}TopologyDictionary.json" -g none -l "${LOG_DIR}/gds-logs" 1>${LOG_DIR}/gds-logs/fprime-gds.stdout.log 2>${LOG_DIR}/gds-logs/fprime-gds.stderr.log &
|
||||
GDS_PID=$!
|
||||
# run the app with valgrind in the background
|
||||
if command -v valgrind &> /dev/null
|
||||
|
||||
@ -152,12 +152,12 @@ Retrieval Options:
|
||||
|
||||
As mentioned, these CLI commands let you interact with the GDS through events and commands, and telemetry channels.
|
||||
Through a *project F´ dictionary* the CLI can understand what commands, events and telemetry channels are available.
|
||||
Every F´ project deployment will have a `*Dictionary.xml` file that's created when the project's deployment is built
|
||||
In the `Ref` example project, it'll be the `Ref/Top/RefTopologyAppDictionary.xml` file. By reading this file, the CLI
|
||||
Every F´ project deployment will have a `*Dictionary.json` file that's created when the project's deployment is built
|
||||
In the `Ref` example project, it'll be the `Ref/Top/RefTopologyDictionary.json` file. By reading this file, the CLI
|
||||
tool knows what to look for when it's reading or sending data to the GDS. If it doesn't know where the dictionary is,
|
||||
then the CLI tool can't do much beyond printing out help messages.
|
||||
|
||||
When you run one of the CLI commands, the tool will automatically look for files ending in `Dictionary.xml` in your
|
||||
When you run one of the CLI commands, the tool will automatically look for files ending in `Dictionary.json` in your
|
||||
current working directory and use the first one it can find. This behavior is similar to how `fprime-gds` searches for
|
||||
dictionaries it uses to construct the browser GUI. If it can't find any dictionaries, it will print out an error message
|
||||
like this:
|
||||
@ -168,7 +168,7 @@ fprime-cli: error: No valid project dictionary found
|
||||
|
||||
Running commands from your project folder (e.g. inside `fprime/Ref`) should work to find a dictionary, but if you want
|
||||
to run commands for a different deployment or project, you can specify the dictionary file exactly using the
|
||||
`--dictionary` option with the file's path. `fprime-cli command-send --dictionary Ref/Top/RefTopologyAppDictionary.xml`.
|
||||
`--dictionary` option with the file's path. `fprime-cli command-send --dictionary Ref/Top/RefTopologyDictionary.json`.
|
||||
|
||||
### Using the Tools
|
||||
|
||||
|
||||
@ -37,7 +37,7 @@ Below is an example of how to run the sample example sequence with the Ref dicti
|
||||
dictionary will not be generated.
|
||||
|
||||
```
|
||||
fprime-seqgen fprime/Gds/examples/simple_sequence.seq -d fprime/Ref/build-artifacts/*/dict/RefTopologyAppDictionary.xml
|
||||
fprime-seqgen fprime/Gds/examples/simple_sequence.seq -d fprime/Ref/build-artifacts/*/dict/RefTopologyDictionary.json
|
||||
```
|
||||
|
||||
Here the output file is not specified, so it will be a new file in the same directory as the sequence but ending with
|
||||
|
||||
@ -30,8 +30,8 @@ fprime-fpp-to-cpp==2.1.0
|
||||
fprime-fpp-to-dict==2.1.0
|
||||
fprime-fpp-to-json==2.1.0
|
||||
fprime-fpp-to-xml==2.1.0
|
||||
fprime-gds==3.4.3
|
||||
fprime-tools==3.4.4
|
||||
fprime-gds==v3.4.4a2
|
||||
fprime-tools==v3.4.5a1
|
||||
fprime-visual==1.0.2
|
||||
gcovr==6.0
|
||||
idna==3.4
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user