Skip to content

Commit

Permalink
build simulator
Browse files Browse the repository at this point in the history
  • Loading branch information
ahiuchingau committed Jan 17, 2024
1 parent 43d728a commit 3b016fa
Show file tree
Hide file tree
Showing 4 changed files with 52 additions and 81 deletions.
39 changes: 0 additions & 39 deletions .github/workflows/bootloader.yaml

This file was deleted.

16 changes: 4 additions & 12 deletions .github/workflows/build-cmake-targets.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ jobs:
non-executable-workflow:
strategy:
matrix:
target: [can, common, eeprom, i2c, motor-control, sensors, spi]
name: ${{ matrix.target }} Build/Test
target: [bootloader, can, common, eeprom, i2c, motor-control, sensors, spi]
name: ${{ matrix.target }} Build and Test
uses: ./.github/workflows/non-executable-workflow.yaml
with:
target: ${{ matrix.target }}
Expand All @@ -20,17 +20,9 @@ jobs:
executable-workflow:
strategy:
matrix:
include:
- target: head
- target: gantry
- target: gripper
subtarget: '["x", "y"]'
- target: pipettes
subtarget: '["single", "multi", "96"]'
name: ${{ matrix.target }} Build/Test
target: [gantry, gripper, head, pipettes]
name: ${{ matrix.target }} Build and Test
uses: ./.github/workflows/executable-workflow.yaml
with:
target: ${{ matrix.target }}
subtarget: ${{ matrix.subtarget }}
secrets: inherit

48 changes: 48 additions & 0 deletions .github/workflows/build-simulators.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
name: "Build Simulators"
on:
pull_request:
push:
branches:
- "*"
workflow_dispatch:

defaults:
run:
shell: bash
working-directory: ot3-firmware

jobs:
build-simulators:
strategy:
matrix:
target: [head, gantry-x, gantry-y, gripper, pipettes-single, pipettes-multi, pipettes-96]
name: ${{ matrix.target }} Simulator
runs-on: "ubuntu-20.04"
timeout-minutes: 10
env:
ci: 1
DEFAULT_DIRECTORY: ot3-firmware
TARGET: ${{ matrix.target }}
steps:
- name: Checkout github actions directory
uses: actions/checkout@v4
with:
sparse-checkout: |
.github/actions
sparse-checkout-cone-mode: false
path: actions

- name: Setup main
uses: ./actions/.github/actions/main-setup
with:
cache-version: ${{ secrets.CACHE_VERSION }}

- name: Configure
run: cmake --preset=host-gcc10 .
shell: bash
working-directory: ${{ env.DEFAULT_DIRECTORY }}

- name: Build Simulator
run: cmake --build ./build-host --target ${{ matrix.target }}-simulator
shell: bash
working-directory: ${{ env.DEFAULT_DIRECTORY }}
30 changes: 0 additions & 30 deletions .github/workflows/executable-workflow.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,6 @@ on:
description: Executable target
required: true
type: string
subtarget:
description: Sub-target
required: false
type: string


env:
ci: 1
Expand Down Expand Up @@ -70,28 +65,3 @@ jobs:
- name: Host-Compile/Test
uses: ./actions/.github/actions/host-compile-test

build-simulator:
name: "Build Simulator"
runs-on: "ubuntu-20.04"
timeout-minutes: 10
strategy:
matrix:
sim-target: ${{ fromJSON(inputs.subtarget || "") }}
steps:
- name: Checkout github actions directory
uses: actions/checkout@v4
with:
sparse-checkout: |
.github/actions
sparse-checkout-cone-mode: false
path: actions

- name: Setup main
uses: ./actions/.github/actions/main-setup
with:
cache-version: ${{ secrets.CACHE_VERSION }}

- name: Build Simulator
uses: ./actions/.github/actions/build-simulator
with:
sub-target: ${{ matrix.sim-target }}

0 comments on commit 3b016fa

Please sign in to comment.