Skip to content

Commit

Permalink
what are we doing
Browse files Browse the repository at this point in the history
  • Loading branch information
ahiuchingau committed Jan 12, 2024
1 parent 0b0cfbb commit 63d7afc
Show file tree
Hide file tree
Showing 8 changed files with 174 additions and 108 deletions.
15 changes: 15 additions & 0 deletions .github/actions/build-simulator/action.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
name: Simulate
description: Build Target Simulator

inputs:
target:
description: simulator target
required: true

runs:
using: composite
steps:
- name: Build and test
run: cmake --build ./build-host --target ${{ inputs.target }}-simulator
shell: bash
working-directory: ${{ env.DEFAULT_DIRECTORY }}
16 changes: 16 additions & 0 deletions .github/actions/host-compile-test/action.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
name: Host-Compile/Test
description: Build and Test Target


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

- name: Build and test
run: cmake --build ./build-host --target ${{ env.TARGET }}-build-and-test
shell: bash
working-directory: ${{ env.DEFAULT_DIRECTORY }}
43 changes: 3 additions & 40 deletions .github/workflows/bootloader.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -42,43 +42,6 @@ defaults:
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:
- 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 bootloader-build-and-test
run-non-executable-workflow:
uses: ./.github/workflows/non-executable-workflow.yaml
secrets: inherit
53 changes: 30 additions & 23 deletions .github/workflows/can.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,46 +30,53 @@ on:

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:
- uses: "actions/checkout@v2"
- name: Checkout github actions directory
uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: "actions/cache@v3"
sparse-checkout: |
.github/actions
sparse-checkout-cone-mode: false
path: actions

- name: Setup main
uses: ./actions/.github/actions/main-setup
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 can-format-ci
- name: "Build"
run: cmake --build ./build-cross --target can
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:
- run: |
sudo apt update
sudo apt install gcc-10 g++-10
- uses: "actions/checkout@v2"
- name: Checkout github actions directory
uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: "actions/cache@v3"
sparse-checkout: |
.github/actions
sparse-checkout-cone-mode: false
path: actions

- name: Setup main
uses: ./actions/.github/actions/main-setup
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 can-build-and-test
cache-version: ${{ secrets.CACHE_VERSION }}

- name: Host-Compile/Test
uses: ./actions/.github/actions/host-compile-test
54 changes: 30 additions & 24 deletions .github/workflows/common.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,47 +29,53 @@ on:

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:
- uses: "actions/checkout@v2"
- name: Checkout github actions directory
uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: "actions/cache@v3"
sparse-checkout: |
.github/actions
sparse-checkout-cone-mode: false
path: actions

- name: Setup main
uses: ./actions/.github/actions/main-setup
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 common-format-ci
# TODO (AL 2021-07-09) - uncomment when adding common-lint is added
- name: "Build"
run: cmake --build ./build-cross --target common
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:
- run: |
sudo apt update
sudo apt install gcc-10 g++-10
- uses: "actions/checkout@v2"
- name: Checkout github actions directory
uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: "actions/cache@v3"
sparse-checkout: |
.github/actions
sparse-checkout-cone-mode: false
path: actions

- name: Setup main
uses: ./actions/.github/actions/main-setup
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 common-build-and-test
cache-version: ${{ secrets.CACHE_VERSION }}

- name: Host-Compile/Test
uses: ./actions/.github/actions/host-compile-test
51 changes: 30 additions & 21 deletions .github/workflows/eeprom.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -41,44 +41,53 @@ on:

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:
- uses: "actions/checkout@v2"
- name: Checkout github actions directory
uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: "actions/cache@v3"
sparse-checkout: |
.github/actions
sparse-checkout-cone-mode: false
path: actions

- name: Setup main
uses: ./actions/.github/actions/main-setup
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 eeprom-format-ci
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:
- run: |
sudo apt update
sudo apt install gcc-10 g++-10
- uses: "actions/checkout@v2"
- name: Checkout github actions directory
uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: "actions/cache@v3"
sparse-checkout: |
.github/actions
sparse-checkout-cone-mode: false
path: actions

- name: Setup main
uses: ./actions/.github/actions/main-setup
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 eeprom-build-and-test
cache-version: ${{ secrets.CACHE_VERSION }}

- name: Host-Compile/Test
uses: ./actions/.github/actions/host-compile-test
3 changes: 3 additions & 0 deletions .github/workflows/gantry.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,13 @@ on:

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

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

jobs:
cross-compile-check:
Expand Down
47 changes: 47 additions & 0 deletions .github/workflows/non-executable-workflow.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
name: Workflow for Non-executable Targets

on:
workflow_call:

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

0 comments on commit 63d7afc

Please sign in to comment.