From acb980ac0a8c91c8a6031de763ef9be2b4251562 Mon Sep 17 00:00:00 2001 From: Nate Gay Date: Wed, 14 Aug 2024 22:39:07 -0500 Subject: [PATCH 1/5] Add initial CI build --- .github/workflows/build.yaml | 43 ++++++++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100644 .github/workflows/build.yaml diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml new file mode 100644 index 0000000..1262a54 --- /dev/null +++ b/.github/workflows/build.yaml @@ -0,0 +1,43 @@ +name: build + +on: + pull_request: + push: + branches: + - main + - master + - devel + +jobs: + build: + name: Build + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + with: + submodules: recursive + - name: Install Arduino CLI + uses: arduino/setup-arduino-cli@v2 + with: + version: "1.0.1" + - name: Install Arduino CLI CMake Wrapper + run: | + pip3 install arduino-cli-cmake-wrapper + shell: bash + - name: Configure Arduino CLI and Install RP2040 Core + run: | + arduino-cli config init + arduino-cli config add board_manager.additional_urls https://github.com/earlephilhower/arduino-pico/releases/download/global/package_rp2040_index.json + arduino-cli core install rp2040:rp2040 + shell: bash + - name: Install Arduino Libraries + run: arduino-cli lib install Time RadioHead + shell: bash + - name: Install F' Requirements + run: pip3 install -r fprime/requirements.txt + shell: bash + - name: Build binary + run: | + fprime-util generate rpipico + fprime-util build rpipico + shell: bash From bc93dbf6c87051176d021ab360bf3d9d021f01c7 Mon Sep 17 00:00:00 2001 From: Nate Gay Date: Wed, 14 Aug 2024 22:42:27 -0500 Subject: [PATCH 2/5] Archive the uf2 --- .github/workflows/build.yaml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 1262a54..98cf5e2 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -41,3 +41,8 @@ jobs: fprime-util generate rpipico fprime-util build rpipico shell: bash + - name: Archive binary + uses: actions/upload-artifact@v4 + with: + name: uf2 + path: build-artifacts/rpipico/BroncoDeployment/bin/BroncoDeployment.uf2 From 144c0d56015f958eb125ad4decb266aad39128e3 Mon Sep 17 00:00:00 2001 From: Nate Gay Date: Wed, 14 Aug 2024 22:56:10 -0500 Subject: [PATCH 3/5] Add build badge in README --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index 7c1b68c..982948a 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,6 @@ # fprime-proves F' project +[![build](https://github.com/proveskit/fprime-proves/actions/workflows/build.yaml/badge.svg)](https://github.com/proveskit/fprime-proves/actions/workflows/build.yaml) + Valid for F' 3.4.3 ## Building and Running the Deployment From 4ca0a7f2b38a79ea90d22ffd446559dec90a5e4a Mon Sep 17 00:00:00 2001 From: Nate Gay Date: Wed, 14 Aug 2024 22:56:43 -0500 Subject: [PATCH 4/5] Declare python version and cache pip packages --- .github/workflows/build.yaml | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 98cf5e2..3d198f2 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -16,13 +16,16 @@ jobs: - uses: actions/checkout@v3 with: submodules: recursive + - uses: actions/setup-python@v5 + with: + python-version: '3.9' + cache: 'pip' - name: Install Arduino CLI uses: arduino/setup-arduino-cli@v2 with: version: "1.0.1" - name: Install Arduino CLI CMake Wrapper - run: | - pip3 install arduino-cli-cmake-wrapper + run: pip install arduino-cli-cmake-wrapper shell: bash - name: Configure Arduino CLI and Install RP2040 Core run: | @@ -31,10 +34,13 @@ jobs: arduino-cli core install rp2040:rp2040 shell: bash - name: Install Arduino Libraries - run: arduino-cli lib install Time RadioHead + run: | + arduino-cli lib install \ + RadioHead \ + Time shell: bash - name: Install F' Requirements - run: pip3 install -r fprime/requirements.txt + run: pip install -r fprime/requirements.txt shell: bash - name: Build binary run: | From 92765e67d95328d4536d92ca4633c7a91dbb3840 Mon Sep 17 00:00:00 2001 From: Nate Gay Date: Wed, 14 Aug 2024 23:00:27 -0500 Subject: [PATCH 5/5] Upgrade checkout action to remove deprecation notice and rename artifact --- .github/workflows/build.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 3d198f2..a2fcf5b 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -13,7 +13,7 @@ jobs: name: Build runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 with: submodules: recursive - uses: actions/setup-python@v5 @@ -50,5 +50,5 @@ jobs: - name: Archive binary uses: actions/upload-artifact@v4 with: - name: uf2 + name: BroncoDeployment.uf2 path: build-artifacts/rpipico/BroncoDeployment/bin/BroncoDeployment.uf2