Skip to content

Commit

Permalink
add main setup actions
Browse files Browse the repository at this point in the history
  • Loading branch information
ahiuchingau committed Jan 12, 2024
1 parent 6b78a9a commit e19a65e
Show file tree
Hide file tree
Showing 3 changed files with 41 additions and 17 deletions.
1 change: 0 additions & 1 deletion .github/actions/cross-compile-setup/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,5 @@ runs:
uses: './.github/actions/cache-stm32-tools'

- name: Configure
working-directory: ot3-firmware
shell: bash
run: cmake --preset=cross .
35 changes: 35 additions & 0 deletions .github/actions/main-setup/action.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: ot3-firmware Repo Setup
description: Setup for ot3-firmware Github Actions

runs:
using: composite
steps:
- name: Update and install gcc-10 & g++-10
shell: bash
run: |
sudo apt update
sudo apt install -y gcc-10 g++-10
- name: Setup Python
if: ${{ contains(github.workflow, 'host') || contains(github.workflow, 'test')}}
uses: actions/setup-python@v4
with:
python-version: 3.10

- name: Checkout ot3-firmware repository
uses: actions/checkout@v4
with:
path: ot3-firmware

- name: Cache STM32 Tools
uses: actions/cache@v3
id: cache-tools
with:
path: ot3-firmware/stm32-tools
key: ${{ runner.os }}-${{ hashFiles('**/cmake/*') }}-${{ env.CACHE_VERSION }}

- name: Setup opentrons monorepo
if: ${{ contains(github.workflow, 'host') || contains(github.workflow, 'test')}}
uses: actions/checkout@4
with:
path: opentrons
22 changes: 6 additions & 16 deletions .github/workflows/gripper.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -58,19 +58,14 @@ jobs:
runs-on: "ubuntu-20.04"
timeout-minutes: 20
steps:
- name: Checkout ot3-firmware repository
uses: actions/checkout@v4
with:
path: ot3-firmware

- name: Checkout workflow/action directory
- name: Checkout github actions directory
uses: actions/checkout@v4
with:
sparse-checkout: '.github/'
sparse-checkout-cone-mode: false

- name: Cross-compile setup
uses: './.github/actions/cross-compile-setup'
- name: Setup
uses: './github/actions/main-setup'

- name: "Format"
run: cmake --build ./build-cross --target gripper-format-ci
Expand All @@ -84,19 +79,14 @@ jobs:
runs-on: "ubuntu-20.04"
timeout-minutes: 10
steps:
- name: Checkout ot3-firmware repository
uses: actions/checkout@v4
with:
path: ot3-firmware

- name: Checkout workflow/action directory
- name: Checkout github actions directory
uses: actions/checkout@v4
with:
sparse-checkout: '.github/'
sparse-checkout-cone-mode: false

- name: Host Compile setup
uses: './.github/actions/host-compile-setup'
- name: Setup
uses: './github/actions/main-setup'

# - name: 'Build and test'
# run: cmake --build ./build-host --target gripper-build-and-test
Expand Down

0 comments on commit e19a65e

Please sign in to comment.