Merge pull request #11 from guorbit/feature/gio-telecommanded-mission… #39
This file contains 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: | |
# triggered when refereneced in another workflow | |
workflow_call: | |
# automatically triggered by push events on all branches except for main | |
push: | |
branches: | |
- 'feature/*' # run on feature branches | |
- 'main' # run on main | |
- 'cid-test' # run on cid-test for testing | |
jobs: | |
# build and run the TASTE Docker container | |
build: | |
# run on Linux to use Docker | |
runs-on: ubuntu-latest | |
steps: | |
# checkout in GitHub workspace | |
- name: Checkout repository | |
uses: actions/checkout@v3 | |
- name: Select mocking SDL implementations for non-SDL functions | |
run: perl -i -pe 's/(language)="(?!SDL).*?" (default_implementation)="(?!default).*?"/$1="SDL" $2="x86"/g' obc-firmware/interfaceview.xml | |
- name: Select Ada code generation backend for SDL functions | |
run: perl -i -pe 's/(language="SDL".*\n.*name="TASTE_IV_Properties::Default_Codegen" value)="(.*?)"/$1="Ada"/g' obc-firmware/interfaceview.xml | |
- name: Make Docker-run.sh executable | |
run: chmod +x Docker-run.sh | |
- name: Build Docker container | |
run: docker build -t taste:bullseye-fork . | |
# detached run with bind mount of TASTE firmware directory | |
- name: Run Docker container | |
run: ./Docker-run.sh | |
- name: Build OBC Firmware for default deployment (x86 linux) | |
run: docker exec -i taste-fork bash -c " | |
source /root/.bashrc.taste && | |
cd /root/work/obc-firmware/obc-firmware && | |
make interfaceview debug | |
" | |
- name: Upload artifacts | |
uses: actions/upload-artifact@v3 | |
with: | |
name: build_x86 | |
path: | | |
obc-firmware/work/binaries/* | |
obc-firmware/work/*/GUI/src/*.py | |
obc-firmware/work/build/* |