Skip to content

Commit

Permalink
add dummy case for ci
Browse files Browse the repository at this point in the history
add hepaa_uv.yaml for ci
  • Loading branch information
vegano1 committed Jan 12, 2024
1 parent 58a4c84 commit 8b85350
Show file tree
Hide file tree
Showing 2 changed files with 123 additions and 3 deletions.
122 changes: 122 additions & 0 deletions .github/workflows/hepa_uv.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,122 @@
name: "HEPA/UV build/test"
on:
pull_request:
paths:
- "hepa-uv/**"
- "common/**"
- "can/**"
- "include/**"
- "!include/pipettes/**"
- "!include/gantry/**"
- "!include/head/**"
- "cmake/*"
- "!cmake/Arduino*"
- "CMakeLists.txt"
- "hepa-uv/CMakeLists.txt"
- "CMakePresets.json"
- ".clang-format"
- ".clang-tidy"
push:
paths:
- "hepa-uv/**"
- "common/**"
- "can/**"
- "spi/**"
- "include/**"
- "!include/pipettes/**"
- "!include/gantry/**"
- "!include/head/**"
- "cmake/*"
- "!cmake/Arduino*"
- "CMakeLists.txt"
- "hepa-uv/CMakeLists.txt"
- "CMakePresets.json"
- ".clang-format"
- ".clang-tidy"
- ".github/workflows/hepa_uv.yaml"
branches:
- "*"
tags:
- "hepa_uv@*"
workflow_dispatch:

env:
ci: 1

defaults:
run:
shell: bash

jobs:
cross-compile-check:
name: "Cross-Compile/Check"
runs-on: "ubuntu-20.04"
timeout-minutes: 20
steps:
- uses: "actions/checkout@v2"
with:
fetch-depth: 0
- uses: "actions/cache@v3"
with:
path: "./stm32-tools"
key: ${{ runner.os }}-${{ hashFiles('**/cmake/*') }}-${{ secrets.CACHE_VERSION }}
- name: "Configure"
run: cmake --preset=cross . -DCMAKE_BUILD_TYPE=RelWithDebInfo
- name: "Format"
run: cmake --build ./build-cross --target hepa-uv-format-ci
- name: "Build"
run: cmake --build ./build-cross --target hepa-uv-images hepa-uv-applications
- name: "Lint"
run: cmake --build ./build-cross --target hepa-uv-lint

host-compile-test:
name: "Host-Compile/Test"
runs-on: "ubuntu-20.04"
timeout-minutes: 10
steps:
- name: Update and install gcc-10 & g++-10
run: |
sudo apt update
sudo apt install gcc-10 g++-10
- name: Checkout ot3-firmware repository
uses: "actions/checkout@v2"
with:
fetch-depth: 0
path: ot3-firmware

- name: Checkout opentrons repository
uses: actions/checkout@v3
with:
repository: "Opentrons/opentrons"
path: opentrons

- name: Cache stm32-tools
uses: "actions/cache@v3"
with:
path: "./stm32-tools"
key: ${{ runner.os }}-${{ hashFiles('**/cmake/*') }}-${{ secrets.CACHE_VERSION }}

- name: "Configure"
run: cmake --preset=host-gcc10 .
working-directory: ot3-firmware

- name: 'Build and test'
run: cmake --build ./build-host --target hepa-uv-build-and-test
working-directory: ot3-firmware

- name: 'Setup state_manager'
run: cmake --build ./build-host/ --target state-manager-setup
working-directory: ot3-firmware

- name: 'Build simulator'
run: cmake --build ./build-host --target hepa-uv-simulator
working-directory: ot3-firmware

- name: "Upload artifacts"
if: github.event_name != 'pull_request'
uses: actions/upload-artifact@v3
with:
name: "hepa-uv-simulator-${{github.ref_name}}"
path: |
build-host/hepa-uv/simulator/hepa-uv-simulator
4 changes: 1 addition & 3 deletions hepa-uv/tests/test_leds.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
#include "catch2/catch.hpp"

// Just a dummy test case for CI.
TEST_CASE("Holder Test Case") {
REQUIRE(true);
}
TEST_CASE("Holder Test Case") { REQUIRE(true); }

0 comments on commit 8b85350

Please sign in to comment.