Skip to content

Commit

Permalink
update non-executable workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
ahiuchingau committed Jan 12, 2024
1 parent bc147c1 commit a00ad12
Show file tree
Hide file tree
Showing 9 changed files with 39 additions and 321 deletions.
4 changes: 4 additions & 0 deletions .github/actions/cross-compile-build/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,7 @@ runs:
shell: bash
working-directory: ${{ env.DEFAULT_DIRECTORY }}

- name: Lint
run: cmake --build ./build-cross --target ${{ inputs.target }}-lint
shell: bash
working-directory: ${{ env.DEFAULT_DIRECTORY }}
5 changes: 0 additions & 5 deletions .github/actions/cross-compile-check/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,3 @@ runs:
run: cmake --build ./build-cross --target ${{ env.TARGET }}-format-ci
shell: bash
working-directory: ${{ env.DEFAULT_DIRECTORY }}

- name: Lint
run: cmake --build ./build-cross --target ${{ env.TARGET }}-lint
shell: bash
working-directory: ${{ env.DEFAULT_DIRECTORY }}
56 changes: 5 additions & 51 deletions .github/workflows/can.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,55 +28,9 @@ on:
- "can@*"
workflow_dispatch:

env:
ci: 1
DEFAULT_DIRECTORY: ot3-firmware
TARGET: can

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

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

host-compile-test:
name: "Host-Compile/Test"
runs-on: "ubuntu-20.04"
timeout-minutes: 10
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: Host-Compile/Test
uses: ./actions/.github/actions/host-compile-test
run-non-executable-workflow:
uses: ./.github/workflows/non-executable-workflow.yaml
with:
target: can
secrets: inherit
56 changes: 5 additions & 51 deletions .github/workflows/common.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,55 +27,9 @@ on:
- "common@*"
workflow_dispatch:

env:
ci: 1
DEFAULT_DIRECTORY: ot3-firmware
TARGET: common

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

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

host-compile-test:
name: "Host-Compile/Test"
runs-on: "ubuntu-20.04"
timeout-minutes: 10
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: Host-Compile/Test
uses: ./actions/.github/actions/host-compile-test
run-non-executable-workflow:
uses: ./.github/workflows/non-executable-workflow.yaml
with:
target: common
secrets: inherit
56 changes: 5 additions & 51 deletions .github/workflows/eeprom.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -39,55 +39,9 @@ on:
- "eeprom@*"
workflow_dispatch:

env:
ci: 1
DEFAULT_DIRECTORY: ot3-firmware
TARGET: eeprom

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

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

host-compile-test:
name: "Host-Compile/Test"
runs-on: "ubuntu-20.04"
timeout-minutes: 10
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: Host-Compile/Test
uses: ./actions/.github/actions/host-compile-test
run-non-executable-workflow:
uses: ./.github/workflows/non-executable-workflow.yaml
with:
target: bootloader
secrets: eeprom
47 changes: 5 additions & 42 deletions .github/workflows/i2c.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,46 +31,9 @@ on:
- "i2c@*"
workflow_dispatch:

env:
ci: 1

defaults:
run:
shell: bash

jobs:
cross-compile-check:
name: "Cross-Compile/Check"
runs-on: "ubuntu-20.04"
timeout-minutes: 10
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=debug
- name: "Format"
run: cmake --build ./build-cross --target i2c-format-ci
host-compile-test:
name: "Host-Compile/Test"
runs-on: "ubuntu-20.04"
timeout-minutes: 10
steps:
- run: |
sudo apt update
sudo apt install gcc-10 g++-10
- 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=host-gcc10 .
- name: 'Build and test'
run: cmake --build ./build-host --target i2c-build-and-test
run-non-executable-workflow:
uses: ./.github/workflows/non-executable-workflow.yaml
with:
target: i2c
secrets: inherit
26 changes: 5 additions & 21 deletions .github/workflows/motorcontrol.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -35,24 +35,8 @@ defaults:
shell: bash

jobs:
host-compile-test:
name: "Host-Compile/Test"
runs-on: "ubuntu-20.04"
timeout-minutes: 10
steps:
- run: |
sudo apt update
sudo apt install gcc-10 g++-10
- 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=host-gcc10 .
- name: "Format check"
run: cmake --build ./build-host --target motor-control-format-ci
- name: "Build and test"
run: cmake --build ./build-host --target motor-control-build-and-test
run-non-executable-workflow:
uses: ./.github/workflows/non-executable-workflow.yaml
with:
target: motor-control
secrets: inherit
63 changes: 5 additions & 58 deletions .github/workflows/sensors.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -41,62 +41,9 @@ on:
- "sensors@*"
workflow_dispatch:

env:
ci: 1

defaults:
run:
shell: bash

jobs:
cross-compile-check:
name: "Cross-Compile/Check"
runs-on: "ubuntu-20.04"
timeout-minutes: 10
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=debug
- name: "Format"
run: cmake --build ./build-cross --target sensors-format-ci
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 sensors-build-and-test
working-directory: ot3-firmware
run-non-executable-workflow:
uses: ./.github/workflows/non-executable-workflow.yaml
with:
target: sensors
secrets: inherit
Loading

0 comments on commit a00ad12

Please sign in to comment.