Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
50 changes: 0 additions & 50 deletions .github/native-test.yml

This file was deleted.

80 changes: 80 additions & 0 deletions .github/workflows/native-test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
name: Test With Native

on:
#triggers the workflow on pull requests
pull_request:
branches:
- '**'

#allows manual triggering of the workflow
workflow_dispatch:

jobs:
test-native:
runs-on: ubuntu-latest

steps:
#gets the current repo
- name: Checkout avionics repo
uses: actions/checkout@v4
with:
path: avionics

#clones the native repo
- name: Clone Native repo
run: |
git clone https://github.com/CURocketEngineering/Native native

#replaces the linked avionics repo with the current avionics code
- name: Replace Native lib avionics with checked-out avionics code
run: |
rm -rf native/lib/avionics
mkdir -p native/lib
mv avionics native/lib/avionics

#downlaods the rocket-test-data for the test
- name: Download Rocket-test-data v1.0.0 release CSVs
run: |
mkdir -p native/data
curl -s \
-H "Accept: application/vnd.github+json" \
https://api.github.com/repos/CURocketEngineering/Rocket-Test-Data/releases/tags/v1.0.0 \
| jq -r '.assets[].browser_download_url' \
| while read url; do
echo "Downloading $url"
curl -L "$url" -o native/data/$(basename "$url")
done

#fixes the file name replacing the . with spaces
- name: Fix file name
run: |
mv native/data/AA.Data.Collection.-.Second.Launch.Trimmed.csv \
native/data/"AA Data Collection - Second Launch Trimmed.csv"

#installed PlatformIO core
- name: Install PlatformIO Core
run: |
pip install -U platformio
#shows the file tree structure for debugging
- name: Show native directory structure
run: |
echo "===== native directory tree ====="
ls -R native

#used to allow non-standard C++ code
- name: Make CI permissive for all tests
working-directory: ./native
run: |
echo "
[env:native]
build_flags =
-fpermissive
-Wno-pedantic
-Wno-error
" >> platformio.ini

#runs platformio test
- name: Run PlatformIO Tests
working-directory: ./native
run: |
pio test -e native
Loading