diff --git a/.github/workflows/build-boards.yml b/.github/workflows/build-boards.yml new file mode 100644 index 000000000..a2f861671 --- /dev/null +++ b/.github/workflows/build-boards.yml @@ -0,0 +1,264 @@ +name: build-gimlet +on: + workflow_call: + inputs: + board-set: + description: "Which set to build" + required: true + type: string + os: + description: "OS to build for" + required: true + type: string + +jobs: + build-sidecar: + if: ${{ inputs.board-set == 'sidecar' || inputs.board-set == 'all' }} + name: build-sidecar + strategy: + matrix: + build: [sidecar-b, sidecar-b-lab, sidecar-b-dev, sidecar-c, sidecar-c-lab, sidecar-c-dev] + include: + - build: sidecar-b + app_name: sidecar-b + app_toml: app/sidecar/rev-b.toml + target: thumbv7em-none-eabihf + image: default + - build: sidecar-b-lab + app_name: sidecar-b-lab + app_toml: app/sidecar/rev-b-lab.toml + target: thumbv7em-none-eabihf + image: default + - build: sidecar-b-dev + app_name: sidecar-b-dev + app_toml: app/sidecar/rev-b-dev.toml + target: thumbv7em-none-eabihf + image: default + - build: sidecar-c + app_name: sidecar-c + app_toml: app/sidecar/rev-c.toml + target: thumbv7em-none-eabihf + image: default + - build: sidecar-c-lab + app_name: sidecar-c-lab + app_toml: app/sidecar/rev-c-lab.toml + target: thumbv7em-none-eabihf + image: default + - build: sidecar-c-dev + app_name: sidecar-c-dev + app_toml: app/sidecar/rev-c-dev.toml + target: thumbv7em-none-eabihf + image: default + uses: ./.github/workflows/build-one.yml + with: + build: ${{ matrix.build }} + app_name: ${{ matrix.app_name }} + app_toml: ${{ matrix.app_toml }} + target: ${{ matrix.target }} + image: ${{ matrix.image }} + os: ${{ inputs.os }} + + build-psc: + if: ${{ inputs.board-set == 'psc' || inputs.board-set == 'all' }} + name: build-psc + strategy: + matrix: + build: [psc-b, psc-b-dev, psc-c, psc-c-dev] + include: + - build: psc-b + app_name: psc-b + app_toml: app/psc/rev-b.toml + target: thumbv7em-none-eabihf + image: default + - build: psc-b-dev + app_name: psc-b-dev + app_toml: app/psc/rev-b-dev.toml + target: thumbv7em-none-eabihf + image: default + - build: psc-c + app_name: psc-c + app_toml: app/psc/rev-c.toml + target: thumbv7em-none-eabihf + image: default + - build: psc-c-dev + app_name: psc-c-dev + app_toml: app/psc/rev-c-dev.toml + target: thumbv7em-none-eabihf + image: default + uses: ./.github/workflows/build-one.yml + with: + build: ${{ matrix.build }} + app_name: ${{ matrix.app_name }} + app_toml: ${{ matrix.app_toml }} + target: ${{ matrix.target }} + image: ${{ matrix.image }} + os: ${{ inputs.os }} + + build-rot: + if: ${{ inputs.board-set == 'rot' || inputs.board-set == 'all' }} + name: build-rot + strategy: + matrix: + build: [oxide-rot-1, oxide-rot-1-dev] + include: + - build: oxide-rot-1 + app_name: oxide-rot-1 + app_toml: app/oxide-rot-1/app.toml + target: thumbv8m.main-none-eabihf + image: "a, b" + - build: oxide-rot-1-dev + app_name: oxide-rot-1-dev + app_toml: app/oxide-rot-1/app-dev.toml + target: thumbv8m.main-none-eabihf + image: "a, b" + uses: ./.github/workflows/build-one.yml + with: + build: ${{ matrix.build }} + app_name: ${{ matrix.app_name }} + app_toml: ${{ matrix.app_toml }} + target: ${{ matrix.target }} + image: ${{ matrix.image }} + os: ${{ inputs.os }} + + build-gimlet: + if: ${{ inputs.board-set == 'gimlet' || inputs.board-set == 'all' }} + name: build-gimlet + strategy: + matrix: + build: [gimlet-b, gimlet-b-lab, gimlet-b-dev, gimlet-c, gimlet-c-lab, gimlet-c-dev, gimlet-d, gimlet-d-lab, gimlet-d-dev, gimlet-e, gimlet-e-lab, gimlet-e-dev] + include: + - build: gimlet-b + app_name: gimlet-b + app_toml: app/gimlet/rev-b.toml + target: thumbv7em-none-eabihf + image: default + - build: gimlet-b-lab + app_name: gimlet-b-lab + app_toml: app/gimlet/rev-b-lab.toml + target: thumbv7em-none-eabihf + image: default + - build: gimlet-b-dev + app_name: gimlet-b-dev + app_toml: app/gimlet/rev-b-dev.toml + target: thumbv7em-none-eabihf + image: default + - build: gimlet-c + app_name: gimlet-c + app_toml: app/gimlet/rev-c.toml + target: thumbv7em-none-eabihf + image: default + - build: gimlet-c-lab + app_name: gimlet-c-lab + app_toml: app/gimlet/rev-c-lab.toml + target: thumbv7em-none-eabihf + image: default + - build: gimlet-c-dev + app_name: gimlet-c-dev + app_toml: app/gimlet/rev-c-dev.toml + target: thumbv7em-none-eabihf + image: default + - build: gimlet-d + app_name: gimlet-d + app_toml: app/gimlet/rev-d.toml + target: thumbv7em-none-eabihf + image: default + - build: gimlet-d-lab + app_name: gimlet-d-lab + app_toml: app/gimlet/rev-d-lab.toml + target: thumbv7em-none-eabihf + image: default + - build: gimlet-d-dev + app_name: gimlet-d-dev + app_toml: app/gimlet/rev-d-dev.toml + target: thumbv7em-none-eabihf + image: default + - build: gimlet-e + app_name: gimlet-e + app_toml: app/gimlet/rev-e.toml + target: thumbv7em-none-eabihf + image: default + - build: gimlet-e-lab + app_name: gimlet-e-lab + app_toml: app/gimlet/rev-e-lab.toml + target: thumbv7em-none-eabihf + image: default + - build: gimlet-e-dev + app_name: gimlet-e-dev + app_toml: app/gimlet/rev-e-dev.toml + target: thumbv7em-none-eabihf + image: default + uses: ./.github/workflows/build-one.yml + with: + build: ${{ matrix.build }} + app_name: ${{ matrix.app_name }} + app_toml: ${{ matrix.app_toml }} + target: ${{ matrix.target }} + image: ${{ matrix.image }} + os: ${{ inputs.os }} + + build-devboards: + if: ${{ inputs.board-set == 'devboards' || inputs.board-set == 'all' }} + name: build-devboards + strategy: + matrix: + build: [stm32f3, stm32f4, lpc55, stm32h743, stm32h753, gemini, rot-carrier, gimletlet, donglet-g031] + include: + - build: stm32g0 + app_name: demo-stm32g070-nucleo + app_toml: app/demo-stm32g0-nucleo/app-g070.toml + target: thumbv6m-none-eabi + image: default + - build: stm32f3 + app_name: demo-stm32f3-discovery + app_toml: app/demo-stm32f4-discovery/app-f3.toml + target: thumbv7em-none-eabihf + image: default + - build: stm32f4 + app_name: demo-stm32f4-discovery + app_toml: app/demo-stm32f4-discovery/app.toml + target: thumbv7em-none-eabihf + image: default + - build: lpc55 + app_name: lpc55xpresso + app_toml: app/lpc55xpresso/app.toml + target: thumbv8m.main-none-eabihf + image: "a, b" + - build: stm32h743 + app_name: demo-stm32h743-nucleo + app_toml: app/demo-stm32h7-nucleo/app-h743.toml + target: thumbv7em-none-eabihf + image: default + - build: stm32h753 + app_name: demo-stm32h753-nucleo + app_toml: app/demo-stm32h7-nucleo/app-h753.toml + target: thumbv7em-none-eabihf + image: default + - build: gemini + app_name: gemini-bu + app_toml: app/gemini-bu/app.toml + target: thumbv7em-none-eabihf + image: default + - build: rot-carrier + app_name: rot-carrier + app_toml: app/rot-carrier/app.toml + target: thumbv8m.main-none-eabihf + image: "a, b" + - build: gimletlet + app_name: gimletlet + app_toml: app/gimletlet/app.toml + target: thumbv7em-none-eabihf + image: default + - build: donglet-g031 + app_name: donglet-g031 + app_toml: app/donglet/app-g031.toml + target: thumbv6m-none-eabi + image: default + uses: ./.github/workflows/build-one.yml + with: + build: ${{ matrix.build }} + app_name: ${{ matrix.app_name }} + app_toml: ${{ matrix.app_toml }} + target: ${{ matrix.target }} + image: ${{ matrix.image }} + os: ${{ inputs.os }} + diff --git a/.github/workflows/dist.yml b/.github/workflows/dist.yml index 9c43ba76b..e79ba7bec 100644 --- a/.github/workflows/dist.yml +++ b/.github/workflows/dist.yml @@ -10,185 +10,7 @@ jobs: strategy: matrix: os: [ubuntu-latest, windows-latest] - build: [stm32f3, stm32f4, lpc55, stm32h743, stm32h753, gemini, rot-carrier, gimletlet, gimlet-b, gimlet-b-lab, gimlet-b-dev, gimlet-c, gimlet-c-lab, gimlet-c-dev, gimlet-d, gimlet-d-lab, gimlet-d-dev, gimlet-e, gimlet-e-lab, gimlet-e-dev, sidecar-b, sidecar-b-lab, sidecar-b-dev, sidecar-c, sidecar-c-lab, sidecar-c-dev, psc-b, psc-b-dev, psc-c, psc-c-dev, stm32g0, oxide-rot-1, oxide-rot-1-dev, donglet-g031] - include: - - build: stm32g0 - app_name: demo-stm32g070-nucleo - app_toml: app/demo-stm32g0-nucleo/app-g070.toml - target: thumbv6m-none-eabi - image: default - - build: stm32f3 - app_name: demo-stm32f3-discovery - app_toml: app/demo-stm32f4-discovery/app-f3.toml - target: thumbv7em-none-eabihf - image: default - - build: stm32f4 - app_name: demo-stm32f4-discovery - app_toml: app/demo-stm32f4-discovery/app.toml - target: thumbv7em-none-eabihf - image: default - - build: lpc55 - app_name: lpc55xpresso - app_toml: app/lpc55xpresso/app.toml - target: thumbv8m.main-none-eabihf - image: "a, b" - - build: stm32h743 - app_name: demo-stm32h743-nucleo - app_toml: app/demo-stm32h7-nucleo/app-h743.toml - target: thumbv7em-none-eabihf - image: default - - build: stm32h753 - app_name: demo-stm32h753-nucleo - app_toml: app/demo-stm32h7-nucleo/app-h753.toml - target: thumbv7em-none-eabihf - image: default - - build: gemini - app_name: gemini-bu - app_toml: app/gemini-bu/app.toml - target: thumbv7em-none-eabihf - image: default - - build: rot-carrier - app_name: rot-carrier - app_toml: app/rot-carrier/app.toml - target: thumbv8m.main-none-eabihf - image: "a, b" - - build: gimletlet - app_name: gimletlet - app_toml: app/gimletlet/app.toml - target: thumbv7em-none-eabihf - image: default - - build: gimlet-b - app_name: gimlet-b - app_toml: app/gimlet/rev-b.toml - target: thumbv7em-none-eabihf - image: default - - build: gimlet-b-lab - app_name: gimlet-b-lab - app_toml: app/gimlet/rev-b-lab.toml - target: thumbv7em-none-eabihf - image: default - - build: gimlet-b-dev - app_name: gimlet-b-dev - app_toml: app/gimlet/rev-b-dev.toml - target: thumbv7em-none-eabihf - image: default - - build: gimlet-c - app_name: gimlet-c - app_toml: app/gimlet/rev-c.toml - target: thumbv7em-none-eabihf - image: default - - build: gimlet-c-lab - app_name: gimlet-c-lab - app_toml: app/gimlet/rev-c-lab.toml - target: thumbv7em-none-eabihf - image: default - - build: gimlet-c-dev - app_name: gimlet-c-dev - app_toml: app/gimlet/rev-c-dev.toml - target: thumbv7em-none-eabihf - image: default - - build: gimlet-d - app_name: gimlet-d - app_toml: app/gimlet/rev-d.toml - target: thumbv7em-none-eabihf - image: default - - build: gimlet-d-lab - app_name: gimlet-d-lab - app_toml: app/gimlet/rev-d-lab.toml - target: thumbv7em-none-eabihf - image: default - - build: gimlet-d-dev - app_name: gimlet-d-dev - app_toml: app/gimlet/rev-d-dev.toml - target: thumbv7em-none-eabihf - image: default - - build: gimlet-e - app_name: gimlet-e - app_toml: app/gimlet/rev-e.toml - target: thumbv7em-none-eabihf - image: default - - build: gimlet-e-lab - app_name: gimlet-e-lab - app_toml: app/gimlet/rev-e-lab.toml - target: thumbv7em-none-eabihf - image: default - - build: gimlet-e-dev - app_name: gimlet-e-dev - app_toml: app/gimlet/rev-e-dev.toml - target: thumbv7em-none-eabihf - image: default - - build: sidecar-b - app_name: sidecar-b - app_toml: app/sidecar/rev-b.toml - target: thumbv7em-none-eabihf - image: default - - build: sidecar-b-lab - app_name: sidecar-b-lab - app_toml: app/sidecar/rev-b-lab.toml - target: thumbv7em-none-eabihf - image: default - - build: sidecar-b-dev - app_name: sidecar-b-dev - app_toml: app/sidecar/rev-b-dev.toml - target: thumbv7em-none-eabihf - image: default - - build: sidecar-c - app_name: sidecar-c - app_toml: app/sidecar/rev-c.toml - target: thumbv7em-none-eabihf - image: default - - build: sidecar-c-lab - app_name: sidecar-c-lab - app_toml: app/sidecar/rev-c-lab.toml - target: thumbv7em-none-eabihf - image: default - - build: sidecar-c-dev - app_name: sidecar-c-dev - app_toml: app/sidecar/rev-c-dev.toml - target: thumbv7em-none-eabihf - image: default - - build: psc-b - app_name: psc-b - app_toml: app/psc/rev-b.toml - target: thumbv7em-none-eabihf - image: default - - build: psc-b-dev - app_name: psc-b-dev - app_toml: app/psc/rev-b-dev.toml - target: thumbv7em-none-eabihf - image: default - - build: psc-c - app_name: psc-c - app_toml: app/psc/rev-c.toml - target: thumbv7em-none-eabihf - image: default - - build: psc-c-dev - app_name: psc-c-dev - app_toml: app/psc/rev-c-dev.toml - target: thumbv7em-none-eabihf - image: default - - build: oxide-rot-1 - app_name: oxide-rot-1 - app_toml: app/oxide-rot-1/app.toml - target: thumbv8m.main-none-eabihf - image: "a, b" - - build: oxide-rot-1-dev - app_name: oxide-rot-1-dev - app_toml: app/oxide-rot-1/app-dev.toml - target: thumbv8m.main-none-eabihf - image: "a, b" - - build: donglet-g031 - app_name: donglet-g031 - app_toml: app/donglet/app-g031.toml - target: thumbv6m-none-eabi - image: default - - os: ubuntu-latest - - os: windows-latest - uses: ./.github/workflows/build-one.yml + uses: ./.github/workflows/build-boards.yml with: - build: ${{ matrix.build }} - app_name: ${{ matrix.app_name }} - app_toml: ${{ matrix.app_toml }} - target: ${{ matrix.target }} - image: ${{ matrix.image }} + board-set: all os: ${{ matrix.os }} diff --git a/.github/workflows/release-builds.yml b/.github/workflows/release-builds.yml index 638dfc8d9..8fa589ebb 100644 --- a/.github/workflows/release-builds.yml +++ b/.github/workflows/release-builds.yml @@ -6,44 +6,37 @@ on: - "gimlet-*" - "psc-*" - "sidecar-*" + - "devboards-*" jobs: release-rot: if: startsWith(github.ref, 'refs/tags/oxide-rot-1') uses: ./.github/workflows/release.yml with: - build: oxide-rot-1 - app_name: oxide-rot-1 - app_toml: app/oxide-rot-1/app.toml - target: thumbv8m.main-none-eabihf - image: "a, b" + board-set: rot + + release-sidecar: + if: startsWith(github.ref, 'refs/tags/sidecar') + uses: ./.github/workflows/release.yml + with: + board-set: sidecar release-gimlet: if: startsWith(github.ref, 'refs/tags/gimlet') uses: ./.github/workflows/release.yml with: - build: gimlet - app_name: gimlet-d - app_toml: app/gimlet/rev-d.toml - target: thumbv7em.main-none-eabihf - image: default + board-set: gimlet release-psc: if: startsWith(github.ref, 'refs/tags/psc') uses: ./.github/workflows/release.yml with: - build: psc - app_name: psc-c - app_toml: app/psc/rev-c.toml - target: thumbv7em.main-none-eabihf - image: default + board-set: psc - release-sidecar: - if: startsWith(github.ref, 'refs/tags/sidecar') + release-devboards: + if: startsWith(github.ref, 'refs/tags/devboards') uses: ./.github/workflows/release.yml with: - build: sidecar - app_name: sidecar-c - app_toml: app/sidecar/rev-c.toml - target: thumbv7em.main-none-eabihf - image: default + board-set: psc + + diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 6d7911931..9bd152d7d 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -2,37 +2,17 @@ name: release on: workflow_call: inputs: - build: - description: "Name output for the build" - required: true - type: string - app_name: - description: "Application directory name" - required: true - type: string - app_toml: - description: "TOML file name (must be app directory)" - required: true - type: string - target: - description: "Compilation target triplet" - required: true - type: string - image: - description: "Comma separated string of image names to build" + board-set: + description: "Which set to build" required: true type: string jobs: do-build: - uses: ./.github/workflows/build-one.yml + uses: ./.github/workflows/build-boards.yml with: - build: ${{ inputs.build }} - app_name: ${{ inputs.app_name }} - app_toml: ${{ inputs.app_toml }} - target: ${{ inputs.target }} - image: ${{ inputs.image }} os: ubuntu-latest + board-set: ${{ inputs.board-set }} release-build: needs: do-build @@ -42,7 +22,6 @@ jobs: id: grab uses: actions/download-artifact@v3 with: - name: dist-ubuntu-latest-${{ inputs.build }} path: out - name: prep run: | @@ -50,12 +29,15 @@ jobs: VERSION=`echo $VERSION | awk -F- '{print $NF}'` OUT=${{ steps.grab.outputs.download-path }} for build in `ls $OUT`; do - mv $OUT/$build $OUT/`basename $build .zip`-$VERSION.zip + for f in `ls $OUT/$build`; do + mv $OUT/$build/$f $OUT/`basename $f .zip`-$VERSION.zip + done done - name: cut release uses: softprops/action-gh-release@v1 with: + name: "${{ inputs.board-set }} release" draft: true fail_on_unmatched_files: true files: |