Skip to content

Commit

Permalink
install arduino tools before python packages
Browse files Browse the repository at this point in the history
  • Loading branch information
capsulecorplab committed Dec 13, 2023
1 parent 3eab8ed commit 3e5202f
Showing 1 changed file with 115 additions and 115 deletions.
230 changes: 115 additions & 115 deletions playbook.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -253,121 +253,6 @@
name: avr-libc, binutils-avr, cmake, g++, gcc, gcc-avr, git, libfontconfig1, libusb-dev, libxft-dev, make, unzip, vim, wget, xz-utils
update_cache: yes

-
# install Python packages with pip
hosts: localhost
connection: local
gather_facts: yes
tags:
- install_arduino_tools

vars:
fprime_version: "v3.4.0"
arduino_cli_cmake_wrapper_version: "94c3145e5ea4a0a48dc3f70560dfb8a"
fprime_led_blinker_version: "{{ fprime_version }}"
fprime_baremetal_reference_version: "cb7c0771c535f7583bbac7eecd78997246e4c003"

tasks:
- name: Update OS to point python to python3
apt:
name: python-is-python3
update_cache: yes
- name: Install pip for python3 with Apt
apt:
name: python3-pip
update_cache: yes
- name: Install python packages with pip
pip:
name:
- jupyterlab
- notebook
- voila
- pint
- setuptools
- git+https://github.com/SterlingPeet/arduino-cli-cmake-wrapper.git@{{ arduino_cli_cmake_wrapper_version }}#egg=arduino-cli-cmake-wrapper
- pyserial
- name: Install fprime python packages & dependencies
pip:
requirements: https://raw.githubusercontent.com/nasa/fprime/{{ fprime_version }}/requirements.txt

# led-blinker
- name: Clone fprime led blinker repo
shell:
cmd: git clone --recursive https://github.com/fprime-community/fprime-workshop-led-blinker.git
chdir: /home/kasm-default-profile/
executable: /bin/bash
- name: Checkout {{ fprime_led_blinker_version }} in fprime led blinker repo
shell:
cmd: git checkout {{ fprime_led_blinker_version }}
chdir: /home/kasm-default-profile/fprime-workshop-led-blinker
executable: /bin/bash
- name: Fetch fprime submodule
shell:
cmd: git fetch
chdir: /home/kasm-default-profile/fprime-workshop-led-blinker/fprime
executable: /bin/bash
- name: Checkout {{ fprime_version }} in fprime submodule
shell:
cmd: git checkout {{ fprime_version }}
chdir: /home/kasm-default-profile/fprime-workshop-led-blinker/fprime
executable: /bin/bash
- name: Initialize submodules in fprime submodule
shell:
cmd: git submodule update --init --recursive
chdir: /home/kasm-default-profile/fprime-workshop-led-blinker/fprime
executable: /bin/bash
- name: Generate fprime led blinker unit tests
shell:
cmd: fprime-util generate --ut
chdir: /home/kasm-default-profile/fprime-workshop-led-blinker
executable: /bin/bash
- name: Build fprime led blinker unit tests
shell:
cmd: fprime-util check 1> /tmp/fprime_workshop_led_blinker_build_output.txt
chdir: /home/kasm-default-profile/fprime-workshop-led-blinker
executable: /bin/bash
- name: Delete fprime led blinker repo
shell: rm -rf /home/kasm-default-profile/fprime-workshop-led-blinker

# baremetal-reference
- name: Clone fprime-baremetal-reference repo
shell:
cmd: git clone --recursive https://github.com/fprime-community/fprime-baremetal-reference.git
chdir: /home/kasm-default-profile/
executable: /bin/bash
- name: Checkout {{ fprime_baremetal_reference_version }} in fprime-baremetal-reference repo
shell:
cmd: git checkout {{ fprime_baremetal_reference_version }}
chdir: /home/kasm-default-profile/fprime-baremetal-reference
executable: /bin/bash
- name: Fetch fprime submodule in fprime-baremetal-reference
shell:
cmd: git fetch
chdir: /home/kasm-default-profile/fprime-baremetal-reference/fprime
executable: /bin/bash
- name: Checkout {{ fprime_version }} in fprime-baremetal-reference/fprime
shell:
cmd: git checkout {{ fprime_version }}
chdir: /home/kasm-default-profile/fprime-baremetal-reference/fprime
executable: /bin/bash
- name: Initialize submodules in fprime-baremetal-reference/fprime
shell:
cmd: git submodule update --init --recursive
chdir: /home/kasm-default-profile/fprime-baremetal-reference/fprime
executable: /bin/bash
- name: Generate fprime-baremetal-reference build cache
shell:
cmd: fprime-util generate
chdir: /home/kasm-default-profile/fprime-baremetal-reference
executable: /bin/bash
- name: Build fprime-baremetal-reference
shell:
cmd: fprime-util build -j4
chdir: /home/kasm-default-profile/fprime-baremetal-reference
executable: /bin/bash
- name: Delete fprime-baremetal-reference repo
shell: rm -rf /home/kasm-default-profile/fprime-baremetal-reference

-
# install arduino tools
hosts: localhost
Expand Down Expand Up @@ -494,6 +379,121 @@
- name: Create symlink for Arduino IDE binary in /usr/local/bin
shell: ln -srv /opt/{{ arduino_ide_bin_directory }}/arduino-ide /usr/local/bin/arduino-ide

-
# install Python packages with pip
hosts: localhost
connection: local
gather_facts: yes
tags:
- install_arduino_tools

vars:
fprime_version: "v3.4.0"
arduino_cli_cmake_wrapper_version: "94c3145e5ea4a0a48dc3f70560dfb8a"
fprime_led_blinker_version: "{{ fprime_version }}"
fprime_baremetal_reference_version: "cb7c0771c535f7583bbac7eecd78997246e4c003"

tasks:
- name: Update OS to point python to python3
apt:
name: python-is-python3
update_cache: yes
- name: Install pip for python3 with Apt
apt:
name: python3-pip
update_cache: yes
- name: Install python packages with pip
pip:
name:
- jupyterlab
- notebook
- voila
- pint
- setuptools
- git+https://github.com/SterlingPeet/arduino-cli-cmake-wrapper.git@{{ arduino_cli_cmake_wrapper_version }}#egg=arduino-cli-cmake-wrapper
- pyserial
- name: Install fprime python packages & dependencies
pip:
requirements: https://raw.githubusercontent.com/nasa/fprime/{{ fprime_version }}/requirements.txt

# led-blinker
- name: Clone fprime led blinker repo
shell:
cmd: git clone --recursive https://github.com/fprime-community/fprime-workshop-led-blinker.git
chdir: /home/kasm-default-profile/
executable: /bin/bash
- name: Checkout {{ fprime_led_blinker_version }} in fprime led blinker repo
shell:
cmd: git checkout {{ fprime_led_blinker_version }}
chdir: /home/kasm-default-profile/fprime-workshop-led-blinker
executable: /bin/bash
- name: Fetch fprime submodule
shell:
cmd: git fetch
chdir: /home/kasm-default-profile/fprime-workshop-led-blinker/fprime
executable: /bin/bash
- name: Checkout {{ fprime_version }} in fprime submodule
shell:
cmd: git checkout {{ fprime_version }}
chdir: /home/kasm-default-profile/fprime-workshop-led-blinker/fprime
executable: /bin/bash
- name: Initialize submodules in fprime submodule
shell:
cmd: git submodule update --init --recursive
chdir: /home/kasm-default-profile/fprime-workshop-led-blinker/fprime
executable: /bin/bash
- name: Generate fprime led blinker unit tests
shell:
cmd: fprime-util generate --ut
chdir: /home/kasm-default-profile/fprime-workshop-led-blinker
executable: /bin/bash
- name: Build fprime led blinker unit tests
shell:
cmd: fprime-util check 1> /tmp/fprime_workshop_led_blinker_build_output.txt
chdir: /home/kasm-default-profile/fprime-workshop-led-blinker
executable: /bin/bash
- name: Delete fprime led blinker repo
shell: rm -rf /home/kasm-default-profile/fprime-workshop-led-blinker

# baremetal-reference
- name: Clone fprime-baremetal-reference repo
shell:
cmd: git clone --recursive https://github.com/fprime-community/fprime-baremetal-reference.git
chdir: /home/kasm-default-profile/
executable: /bin/bash
- name: Checkout {{ fprime_baremetal_reference_version }} in fprime-baremetal-reference repo
shell:
cmd: git checkout {{ fprime_baremetal_reference_version }}
chdir: /home/kasm-default-profile/fprime-baremetal-reference
executable: /bin/bash
- name: Fetch fprime submodule in fprime-baremetal-reference
shell:
cmd: git fetch
chdir: /home/kasm-default-profile/fprime-baremetal-reference/fprime
executable: /bin/bash
- name: Checkout {{ fprime_version }} in fprime-baremetal-reference/fprime
shell:
cmd: git checkout {{ fprime_version }}
chdir: /home/kasm-default-profile/fprime-baremetal-reference/fprime
executable: /bin/bash
- name: Initialize submodules in fprime-baremetal-reference/fprime
shell:
cmd: git submodule update --init --recursive
chdir: /home/kasm-default-profile/fprime-baremetal-reference/fprime
executable: /bin/bash
- name: Generate fprime-baremetal-reference build cache
shell:
cmd: fprime-util generate
chdir: /home/kasm-default-profile/fprime-baremetal-reference
executable: /bin/bash
- name: Build fprime-baremetal-reference
shell:
cmd: fprime-util build -j4
chdir: /home/kasm-default-profile/fprime-baremetal-reference
executable: /bin/bash
- name: Delete fprime-baremetal-reference repo
shell: rm -rf /home/kasm-default-profile/fprime-baremetal-reference

-
# add default user to dialout group
hosts: localhost
Expand Down

0 comments on commit 3e5202f

Please sign in to comment.