Skip to content

Commit

Permalink
Merge branch 'update-arduino-ide-to-2.1.1' into investigate-disk-space
Browse files Browse the repository at this point in the history
  • Loading branch information
capsulecorplab committed Mar 24, 2024
2 parents 2251c7a + 516da1a commit 9642673
Show file tree
Hide file tree
Showing 7 changed files with 22 additions and 23 deletions.
Binary file removed install_files/arduino-1.8.19-linux64.tar.xz.partac
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
45 changes: 22 additions & 23 deletions playbook.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -450,27 +450,26 @@
- install_oshw_tools

vars:
arduino_version: "1.8.19"
arduino_version: "2.1.1"
arduino_cli_version: "0.33.0"
arduino_esp32_version: "2.0.9"

tasks:
- name: Join parts of Arduino tarball
shell: cat /home/kasm-default-profile/install_files/arduino-{{ arduino_version }}-linux64.tar.xz.part* > /home/kasm-default-profile/install_files/arduino-{{ arduino_version }}-linux64.tar.xz
- name: unarchive Arduino tarball
- name: Install unzip
apt:
name: unzip
update_cache: yes
- name: Join parts of Arduino zip file
shell: cat /home/kasm-default-profile/install_files/arduino-ide_{{ arduino_version }}_Linux_64bit.zip.part* > /home/kasm-default-profile/install_files/arduino-ide_{{ arduino_version }}_Linux_64bit.zip
- name: unarchive Arduino zip file
unarchive:
src: /home/kasm-default-profile/install_files/arduino-{{ arduino_version }}-linux64.tar.xz
src: /home/kasm-default-profile/install_files/arduino-ide_{{ arduino_version }}_Linux_64bit.zip
dest: /opt
remote_src: yes
creates: /opt/arduino-{{ arduino_version }}/install.sh
- name: Unarchive AVR-GCC toolchain for arduino
unarchive:
src: /home/kasm-default-profile/install_files/avr-gcc-7.3.0-atmel3.6.1-arduino7-x86_64-pc-linux-gnu.tar.bz2
dest: /opt/arduino-{{ arduino_version }}/hardware/tools
remote_src: yes
- name: install Arduino
creates: /opt/arduino-ide_{{ arduino_version }}_Linux_64bit/LICENSE.electron.txt
- name: Create symlink to Arduino IDE in /usr/local/bin
shell:
cmd: /opt/arduino-{{ arduino_version }}/install.sh
cmd: ln -sv /opt/arduino-ide_{{ arduino_version }}_Linux_64bit/arduino-ide /usr/local/bin
executable: /bin/bash
- name: Create directory for Arduino CLI tarball
shell: mkdir -p /home/kasm-default-profile/install_files/arduino-cli_{{ arduino_cli_version }}
Expand All @@ -490,28 +489,28 @@
shell: echo "boardsmanager.additional.urls=https://github.com/espressif/arduino-esp32/releases/download/{{ arduino_esp32_version }}/package_esp32_index.json" >> /home/kasm-default-profile/.arduino15/preferences.txt
- name: install Arduino-ESP32 {{ arduino_esp32_version }} using arduino-cli
shell: arduino-cli core install esp32:esp32@{{ arduino_esp32_version }} --additional-urls https://github.com/espressif/arduino-esp32/releases/download/{{ arduino_esp32_version }}/package_esp32_index.json
- name: Get Arduino version
shell: arduino --version 2>/dev/null | sed 's/[[:alpha:]\:|(|[:space:]]//g'
register: installed_arduino_version
# - name: Get Arduino version
# shell: arduino --version 2>/dev/null | sed 's/[[:alpha:]\:|(|[:space:]]//g'
# register: installed_arduino_version
- name: Get Arduino CLI version
shell: arduino-cli version | sed 's/arduino-cli/\n/g' | sed 's/Commit:/\n/g' | grep Version | sed 's/[[:alpha:]|[:space:]]//g' | sed 's/://g'
register: installed_arduino_cli_version
- name: Get Arduino-ESP32 version
shell: arduino-cli core list | grep esp32 | awk '{ print $2'}
register: installed_arduino_esp32_version
- name: Display Arduino version
debug:
msg: "Arduino version = {{ installed_arduino_version.stdout }}"
# - name: Display Arduino version
# debug:
# msg: "Arduino version = {{ installed_arduino_version.stdout }}"
- name: Display Arduino CLI version
debug:
msg: "Arduino CLI version = {{ installed_arduino_cli_version.stdout }}"
- name: Display Arduino-ESP32 version
debug:
msg: "Arduino-ESP32 version = {{ installed_arduino_esp32_version.stdout }}"
- name: Test Arduino version
fail:
msg: "Arduino Version Error: Expected {{ arduino_version }} | Found {{ installed_arduino_version.stdout }}"
when: installed_arduino_version.stdout != arduino_version
# - name: Test Arduino version
# fail:
# msg: "Arduino Version Error: Expected {{ arduino_version }} | Found {{ installed_arduino_version.stdout }}"
# when: installed_arduino_version.stdout != arduino_version
- name: Test Arduino CLI version
fail:
msg: "Arduino CLI Version Error: Expected {{ arduino_cli_version }} | Found {{ installed_arduino_cli_version.stdout }}"
Expand Down

0 comments on commit 9642673

Please sign in to comment.