From 514133cfc3c19f518a09417636109e91572ed4ea Mon Sep 17 00:00:00 2001 From: Danny Date: Mon, 2 Sep 2024 21:47:28 +0330 Subject: [PATCH 1/3] arduino CI 1 --- .github/workflows/arduino.yml | 51 +++++++++++++++++++++++++++++++++++ 1 file changed, 51 insertions(+) create mode 100644 .github/workflows/arduino.yml diff --git a/.github/workflows/arduino.yml b/.github/workflows/arduino.yml new file mode 100644 index 00000000..ac4e0424 --- /dev/null +++ b/.github/workflows/arduino.yml @@ -0,0 +1,51 @@ +name: Arduino Build + +on: + push: + branches: [main] + +jobs: + # This is the name of the job - can be whatever. + test-matrix: + + # Here we tell GitHub that the jobs must be determined + # dynamically depending on a matrix configuration. + strategy: + matrix: + # The matrix will produce one job for each configuration + # parameter of type `arduino-platform`, in this case a + # total of 2. + arduino-platform: ["rp2040:rp2040"] + # This is usually optional but we need to statically define the + # FQBN of the boards we want to test for each platform. In the + # future the CLI might automatically detect and download the core + # needed to compile against a certain FQBN, at that point the + # following `include` section will be useless. + include: + # This works like this: when the platform is "arduino:samd", the + # variable `fqbn` is set to "arduino:samd:nano_33_iot". + - arduino-platform: "rp2040:rp2040" + fqbn: "rp2040:rp2040:rpipico" + + runs-on: ubuntu-latest + + steps: + # First of all, we clone the repo using the `checkout` action. + - name: Checkout + uses: actions/checkout@v4 + + # We use the `arduino/setup-arduino-cli` action to install and + # configure the Arduino CLI on the system. + - name: Setup Arduino CLI + uses: arduino/setup-arduino-cli@v1 + + # We then install the platform, which one will be determined + # dynamically by the build matrix. + - name: Install platform + run: | + arduino-cli core update-index + arduino-cli core install ${{ matrix.arduino-platform }} + + - name: Run PWD + run: pwd + From 93a638be414a3552264a97deeaabc0b0c2b4a117 Mon Sep 17 00:00:00 2001 From: Danny Date: Mon, 2 Sep 2024 21:50:05 +0330 Subject: [PATCH 2/3] Arduino Ci check Arduino CI check ArduinoCli CI installation Arduino cli: change url installation Arduino-cli: path Arduino: cli build1 Arduino cli: build2 Arduino-cli path changed Arduino-cli address update ci 1 update ci2 action ci action2 action ci 3 action 4 action 4 action 5 action 6 action 7 action 8 Arduino: CI --- .github/workflows/arduino.yml | 51 ++++++++++++++++++----------------- 1 file changed, 26 insertions(+), 25 deletions(-) diff --git a/.github/workflows/arduino.yml b/.github/workflows/arduino.yml index ac4e0424..5d0e3d80 100644 --- a/.github/workflows/arduino.yml +++ b/.github/workflows/arduino.yml @@ -2,50 +2,51 @@ name: Arduino Build on: push: - branches: [main] + branches: [arduino] + jobs: - # This is the name of the job - can be whatever. test-matrix: - - # Here we tell GitHub that the jobs must be determined - # dynamically depending on a matrix configuration. strategy: matrix: - # The matrix will produce one job for each configuration - # parameter of type `arduino-platform`, in this case a - # total of 2. arduino-platform: ["rp2040:rp2040"] - # This is usually optional but we need to statically define the - # FQBN of the boards we want to test for each platform. In the - # future the CLI might automatically detect and download the core - # needed to compile against a certain FQBN, at that point the - # following `include` section will be useless. include: - # This works like this: when the platform is "arduino:samd", the - # variable `fqbn` is set to "arduino:samd:nano_33_iot". - arduino-platform: "rp2040:rp2040" fqbn: "rp2040:rp2040:rpipico" runs-on: ubuntu-latest - steps: - # First of all, we clone the repo using the `checkout` action. - name: Checkout uses: actions/checkout@v4 - # We use the `arduino/setup-arduino-cli` action to install and - # configure the Arduino CLI on the system. - - name: Setup Arduino CLI - uses: arduino/setup-arduino-cli@v1 - # We then install the platform, which one will be determined - # dynamically by the build matrix. + - name: Run PWD + run: pwd + + - name: Install Arduino-cli + run: curl -fsSL https://raw.githubusercontent.com/arduino/arduino-cli/master/install.sh | sh + - name: Install platform run: | + export PATH="${{ github.workspace }}/bin:$PATH" + arduino-cli config add board_manager.additional_urls https://github.com/earlephilhower/arduino-pico/releases/download/global/package_rp2040_index.json arduino-cli core update-index arduino-cli core install ${{ matrix.arduino-platform }} - - name: Run PWD - run: pwd + - name: TestArduinoFile + working-directory: ./source/arduino + run: | + export PATH="${{ github.workspace }}/bin:$PATH" + files=$(ls ../../demo/arduino/) + echo "Files in the folder:" + echo "$files" + + for file in $files; do + echo "Processing and Testing Arduino Sketch: $file" + cp ../../demo/arduino/$file/$file.ino ./arduino.ino + arduino-cli compile --fqbn rp2040:rp2040:rpipico ./arduino.ino + rm ./arduino.ino + done + + From ab6a847668f0c0a1901189a4ff7a5e8f320972b2 Mon Sep 17 00:00:00 2001 From: Danny Date: Wed, 4 Sep 2024 12:57:09 +0330 Subject: [PATCH 3/3] Arduino: keyword and properties --- source/arduino/keywords.txt | 28 ++++++++++++++++++++++++++++ source/arduino/library.properties | 10 ++++++++++ 2 files changed, 38 insertions(+) create mode 100644 source/arduino/keywords.txt create mode 100644 source/arduino/library.properties diff --git a/source/arduino/keywords.txt b/source/arduino/keywords.txt new file mode 100644 index 00000000..4a808130 --- /dev/null +++ b/source/arduino/keywords.txt @@ -0,0 +1,28 @@ +####################################### +# Syntax Coloring Map For ExampleLibrary +####################################### + +####################################### +# Datatypes (KEYWORD1) +####################################### + +ASTRONOMY KEYWORD1 + +####################################### +# Methods and Functions (KEYWORD2) +####################################### + +argvs KEYWORD2 +ParseArgs KEYWORD2 + + +####################################### +# Instances (KEYWORD2) +####################################### + +####################################### +# Constants (LITERAL1) +####################################### + +Astronomy_ObserverGravity LITERAL1 +Astronomy_ObserverGravity1 LITERAL1 diff --git a/source/arduino/library.properties b/source/arduino/library.properties new file mode 100644 index 00000000..b592560b --- /dev/null +++ b/source/arduino/library.properties @@ -0,0 +1,10 @@ +name=ASTRONOMYENGINE +version=1.0 +author=cosinekitty,DannyRavi +maintainer=cosinekitty,DannyRavi +sentence=Astronomy Engine library +paragraph=Library to Astronomy engine +category=Others +url=https://github.com/dannyravi/astronomy +architectures=rpi2040 +includes=astronomy.h,astro_demo_common.h