Skip to content

Commit

Permalink
lets race
Browse files Browse the repository at this point in the history
  • Loading branch information
ahiuchingau committed Jan 18, 2024
1 parent e161013 commit 2acca04
Show file tree
Hide file tree
Showing 4 changed files with 85 additions and 162 deletions.
43 changes: 43 additions & 0 deletions .github/workflows/build-all-applications.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: "Cross-compile all firmware applications"
on:
push:
branches:
- "*"
workflow_dispatch:

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

defaults:
run:
working-directory: ot3-firmware

jobs:
name: "Cross-Compile/Check"
runs-on: "ubuntu-20.04"
timeout-minutes: 20
steps:
- name: Checkout ot3-firmware repo
uses: actions/checkout@4
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=cross .

- name: Build all STM32G4 applications
run: cmake --build --preset=firmware-g4 --target firmware-images firmware-applications
31 changes: 0 additions & 31 deletions .github/workflows/build-cmake-targets.yaml

This file was deleted.

144 changes: 39 additions & 105 deletions .github/workflows/build-cross-target.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,108 +17,42 @@ defaults:
working-directory: ot3-firmware

jobs:
get-format-targets:
runs-on: "ubuntu-20.04"
timeout-minutes: 2
outputs:
targets: ${{ steps.get-target.outputs.targets}}
steps:
- name: Checkout github actions directory
uses: actions/checkout@v4
with:
sparse-checkout: |
.github/actions
sparse-checkout-cone-mode: false
path: actions

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

- name: Parse target
id: get-target
uses: ./actions/.github/actions/parse-cmake-preset
with:
name: format-ci

format-ci:
runs-on: "ubuntu-20.04"
timeout-minutes: 20
needs: get-format-targets
strategy:
matrix:
target: ${{ fromJSON(needs.get-format-targets.outputs.targets) }}
fail-fast: false
name: ${{ matrix.target }} format
steps:
- name: Checkout github actions directory
uses: actions/checkout@v4
with:
sparse-checkout: |
.github/actions
sparse-checkout-cone-mode: false
path: actions

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

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

- name: Configure
run: cmake --preset=cross .

- name: Run format-ci
run: |
cd build-cross
make ${{ matrix.target }}
# cross-compile-target:
# runs-on: "ubuntu-20.04"
# timeout-minutes: 20
# strategy:
# matrix:
# target: [ gantry, gripper, head, pipettes, rear-panel]
# fail-fast: false
# name: ${{ matrix.target }} cross-compile build
# steps:
# - name: Checkout github actions directory
# uses: actions/checkout@v4
# with:
# sparse-checkout: |
# .github/actions
# sparse-checkout-cone-mode: false
# path: actions
#
# - name: Checkout ot3-firmware repository
# uses: actions/checkout@v4
# with:
# path: ot3-firmware
#
# - name: Setup main
# uses: ./actions/.github/actions/main-setup
# with:
# cache-version: ${{ secrets.CACHE_VERSION }}
#
# - name: Configure
# run: cmake --preset=cross .
#
# - name: Build applications
# run: |
# cd build-cross
# make ${{ matrix.target }}-applications
#
# - name: Build bootloader applications
# run: |
# cd build-cross
# make bootloader-${{ matrix.target }}-applications
#
# - name: Run format-ci
# run: |
# cd build-cross
# make ${{ matrix.target }}-format-ci
runs-on: "ubuntu-20.04"
timeout-minutes: 20
strategy:
matrix:
target: [
gantry-x,
gantry-y,
gripper,
head,
hepa-uv,
pipettes-single,
pipettes-multi,
pipettes-96,
rear-panel,
]
steps:
- name: Checkout ot3-firmware repo
uses: actions/checkout@4
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=cross .

- name: Build all STM32G4 applications
run: cmake --build --preset=${{ matrix.target }} --target ${{ matrix.target }}-images ${{ matrix.target }}-applications
29 changes: 3 additions & 26 deletions .github/workflows/executable-workflow.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,36 +19,13 @@ defaults:
working-directory: ot3-firmware

jobs:
cross-compile-check:
name: "Cross-Compile/Check"
runs-on: "ubuntu-20.04"
timeout-minutes: 20
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: Cross-Compile/Check
uses: ./actions/.github/actions/cross-compile-check

- name: Cross-Compile/Build
uses: ./actions/.github/actions/cross-compile-build


host-compile-test:
build-all-applications:
name: "Host-Compile/Test"
runs-on: "ubuntu-20.04"
timeout-minutes: 10
steps:


- name: Checkout github actions directory
uses: actions/checkout@v4
with:
Expand Down

0 comments on commit 2acca04

Please sign in to comment.