diff --git a/.github/actions/cross-compile-build/action.yaml b/.github/actions/cross-compile-build/action.yaml index a4edb5fcc..5706431c5 100644 --- a/.github/actions/cross-compile-build/action.yaml +++ b/.github/actions/cross-compile-build/action.yaml @@ -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 }} diff --git a/.github/actions/cross-compile-check/action.yaml b/.github/actions/cross-compile-check/action.yaml index cee530944..402f27833 100644 --- a/.github/actions/cross-compile-check/action.yaml +++ b/.github/actions/cross-compile-check/action.yaml @@ -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 }} diff --git a/.github/workflows/can.yaml b/.github/workflows/can.yaml index 1748e35ad..66dc36623 100644 --- a/.github/workflows/can.yaml +++ b/.github/workflows/can.yaml @@ -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 \ No newline at end of file + run-non-executable-workflow: + uses: ./.github/workflows/non-executable-workflow.yaml + with: + target: can + secrets: inherit diff --git a/.github/workflows/common.yaml b/.github/workflows/common.yaml index f0556b650..6d3b3b2f6 100644 --- a/.github/workflows/common.yaml +++ b/.github/workflows/common.yaml @@ -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 \ No newline at end of file diff --git a/.github/workflows/eeprom.yaml b/.github/workflows/eeprom.yaml index 3f108f46e..dda98fe97 100644 --- a/.github/workflows/eeprom.yaml +++ b/.github/workflows/eeprom.yaml @@ -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 \ No newline at end of file + run-non-executable-workflow: + uses: ./.github/workflows/non-executable-workflow.yaml + with: + target: bootloader + secrets: eeprom diff --git a/.github/workflows/i2c.yaml b/.github/workflows/i2c.yaml index 0a3e51c1f..e577c7ff0 100644 --- a/.github/workflows/i2c.yaml +++ b/.github/workflows/i2c.yaml @@ -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 diff --git a/.github/workflows/motorcontrol.yaml b/.github/workflows/motorcontrol.yaml index 97199e352..705e0bd6f 100644 --- a/.github/workflows/motorcontrol.yaml +++ b/.github/workflows/motorcontrol.yaml @@ -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 \ No newline at end of file diff --git a/.github/workflows/sensors.yaml b/.github/workflows/sensors.yaml index eeb4eb2e5..dd0bdc61d 100644 --- a/.github/workflows/sensors.yaml +++ b/.github/workflows/sensors.yaml @@ -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 \ No newline at end of file diff --git a/.github/workflows/spi.yaml b/.github/workflows/spi.yaml index ed1d51247..71a655713 100644 --- a/.github/workflows/spi.yaml +++ b/.github/workflows/spi.yaml @@ -30,46 +30,9 @@ on: - "spi@*" 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 spi-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 spi-build-and-test + run-non-executable-workflow: + uses: ./.github/workflows/non-executable-workflow.yaml + with: + target: spi + secrets: inherit \ No newline at end of file