From e6c4acbd098f55d704f7ec8b94dfdeae4c683929 Mon Sep 17 00:00:00 2001 From: Richard Cheng Date: Wed, 18 Sep 2024 10:41:32 -0700 Subject: [PATCH] workflow-2612 - build using github's servers and upload binary. --- .github/workflows/baremetal_ci_teensy.yml | 53 ++++++++++++++++------- 1 file changed, 37 insertions(+), 16 deletions(-) diff --git a/.github/workflows/baremetal_ci_teensy.yml b/.github/workflows/baremetal_ci_teensy.yml index a72b1a38..9e0db4a2 100644 --- a/.github/workflows/baremetal_ci_teensy.yml +++ b/.github/workflows/baremetal_ci_teensy.yml @@ -13,7 +13,7 @@ env: jobs: build: - runs-on: self-hosted + runs-on: ubuntu-latest outputs: platform_setup: ${{ env.platform_setup }} start_cmd: /home/odroid/teensy_loader_cli/teensy_loader_cli --mcu=TEENSY41 -v -s ${{ env.baremetal_bin }} @@ -34,22 +34,43 @@ jobs: . ./fprime-venv/bin/activate pip3 install -U setuptools wheel pip pip3 install -r ${{ inputs.fprime_location }}./fprime/requirements.txt + + mkdir -p ~/.local/bin + curl -fsSL https://raw.githubusercontent.com/arduino/arduino-cli/master/install.sh | BINDIR=~/.local/bin sh + cd ~/.local/bin + git clone https://github.com/SterlingPeet/arduino-cli-cmake-wrapper.git + cd arduino-cli-cmake-wrapper + git checkout update/refactor + pip3 install . + export PATH=~/.local/bin:$PATH + cd ${{ github.workspace }} + arduino-cli config init + arduino-cli config add board_manager.additional_urls https://www.pjrc.com/teensy/package_teensy_index.json + arduino-cli core update-index + arduino-cli core install teensy:avr + + . ./fprime-venv/bin/activate fprime-util generate fprime-util build - - name: "Temp step, file renaming" - run: | - mv ${{ github.workspace }}/lib/arduino/fprime-arduino/ATmega/vendor/libraries/TimerOne/examples/FanSpeed/FanSpeed.pde ${{ github.workspace }}/lib/arduino/fprime-arduino/ATmega/vendor/libraries/TimerOne/examples/FanSpeed/FanSpeed.ino - mv ${{ github.workspace }}/lib/arduino/fprime-arduino/ATmega/vendor/libraries/TimerOne/examples/Interrupt/Interrupt.pde ${{ github.workspace }}/lib/arduino/fprime-arduino/ATmega/vendor/libraries/TimerOne/examples/Interrupt/Interrupt.ino + - name: "Upload build binary" + uses: actions/upload-artifact@v4 + with: + name: baremetal binary + path: ${{ env.baremetal_bin }} + #- name: "Temp step, file renaming" + # run: | + # mv ${{ github.workspace }}/lib/arduino/fprime-arduino/ATmega/vendor/libraries/TimerOne/examples/FanSpeed/FanSpeed.pde ${{ github.workspace }}/lib/arduino/fprime-arduino/ATmega/vendor/libraries/TimerOne/examples/FanSpeed/FanSpeed.ino + # mv ${{ github.workspace }}/lib/arduino/fprime-arduino/ATmega/vendor/libraries/TimerOne/examples/Interrupt/Interrupt.pde ${{ github.workspace }}/lib/arduino/fprime-arduino/ATmega/vendor/libraries/TimerOne/examples/Interrupt/Interrupt.ino - run: echo "Expose env vars for reusable workflow." - fit: - needs: build - uses: ./.github/workflows/reusable_fit_ci.yml - with: - runs_on: self-hosted - platform_setup: ${{ needs.build.outputs.platform_setup }} - start_cmd: ${{ needs.build.outputs.start_cmd }} - gds_args: ${{ needs.build.outputs.gds_args }} - dict_path: ${{ needs.build.outputs.dict_path }} - test_path: ${{ needs.build.outputs.test_path }} - workspace_path: ${{ needs.build.outputs.workspace_path }} +# fit: +# needs: build +# uses: ./.github/workflows/reusable_fit_ci.yml +# with: +# runs_on: self-hosted +# platform_setup: ${{ needs.build.outputs.platform_setup }} +# start_cmd: ${{ needs.build.outputs.start_cmd }} +# gds_args: ${{ needs.build.outputs.gds_args }} +# dict_path: ${{ needs.build.outputs.dict_path }} +# test_path: ${{ needs.build.outputs.test_path }} +# workspace_path: ${{ needs.build.outputs.workspace_path }}