Skip to content

Commit

Permalink
add tests
Browse files Browse the repository at this point in the history
  • Loading branch information
ahiuchingau committed Jan 18, 2024
1 parent ff40ce5 commit f6ad497
Show file tree
Hide file tree
Showing 2 changed files with 55 additions and 10 deletions.
20 changes: 10 additions & 10 deletions .github/workflows/build-simulators.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ jobs:
path: |
${{
format(
'build-host/{0}/simulator/{1}-simulator',
'ot3-firmware/build-host/{0}/simulator/{1}-simulator',
contains(matrix.target, 'gantry') && 'gantry' || contains(matrix.target, 'pipettes') && 'pipettes' || matrix.target,
matrix.target
)
Expand Down Expand Up @@ -106,52 +106,52 @@ jobs:
uses: actions/upload-artifact@v4
with:
name: bootloader-simulator-${{ github.ref_name }}
path: build-host/bootloader/simulator/bootloader-simulator
path: ot3-firmware/build-host/bootloader/simulator/bootloader-simulator

- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name: gantry-x-simulator-${{ github.ref_name }}
path: build-host/gantry/simulator/gantry-x-simulator
path: ot3-firmware/build-host/gantry/simulator/gantry-x-simulator

- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name: gantry-y-simulator-${{ github.ref_name }}
path: build-host/gantry/simulator/gantry-y-simulator
path: ot3-firmware/build-host/gantry/simulator/gantry-y-simulator

- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name: gripper-simulator-${{ github.ref_name }}
path: build-host/gripper/simulator/gripper-simulator
path: ot3-firmware/build-host/gripper/simulator/gripper-simulator

- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name: head-simulator-${{ github.ref_name }}
path: build-host/head/simulator/head-simulator
path: ot3-firmware/build-host/head/simulator/head-simulator

- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name: hepa-uv-simulator-${{ github.ref_name }}
path: build-host/hepa-uv/simulator/hepa-uv-simulator
path: ot3-firmware/build-host/hepa-uv/simulator/hepa-uv-simulator

- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name: pipettes-single-simulator-${{ github.ref_name }}
path: build-host/pipettes/simulator/pipettes-single-simulator
path: ot3-firmware/build-host/pipettes/simulator/pipettes-single-simulator

- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name: pipettes-multi-simulator-${{ github.ref_name }}
path: build-host/pipettes/simulator/pipettes-multi-simulator
path: ot3-firmware/build-host/pipettes/simulator/pipettes-multi-simulator

- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name: pipettes-96-simulator-${{ github.ref_name }}
path: build-host/pipettes/simulator/pipettes-96-simulator
path: ot3-firmware/build-host/pipettes/simulator/pipettes-96-simulator
45 changes: 45 additions & 0 deletions .github/workflows/build-tests.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
name: "Build and Test"
on:
push:
branches:
- "*"
workflow_dispatch:

concurrency:
group: ${{ github.workflow }}-${{ github.ref_name }}
cancel-in-progress: true

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

jobs:
build-and-test:
name: Run all tests
runs-on: "ubuntu-20.04"
timeout-minutes: 10
steps:
- name: Checkout ot3-firmware repo
uses: actions/checkout@v4
with:
path: ot3-firmware

- 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 .

- name: Test
run: cmake --build ./build-host --target build-and-test

0 comments on commit f6ad497

Please sign in to comment.