Skip to content

Commit

Permalink
save artifact env in generate and build, restore sqa-build
Browse files Browse the repository at this point in the history
  • Loading branch information
stefan-silabs committed Jan 17, 2025
1 parent 742ec72 commit 2b2999a
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 21 deletions.
11 changes: 7 additions & 4 deletions .github/workflows/generate-and-build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,10 @@ on:
technology:
required: false
type: string
workflow_name:
workflowName:
required: false
type: string
artifact_path:
artifactPath:
required: false
type: string

Expand Down Expand Up @@ -137,14 +137,17 @@ jobs:
make all -C ${MATTER_EXTN_ROOT}/${{ inputs.board }}/${{ inputs.app }}-${{ inputs.suffix }} -f ${WORKSPACE_PATH}.solution.Makefile -j8
- name: Upload SQA Build Artifact
if: ${{ inputs.workflow_name == 'SQA Build' }}
if: ${{ inputs.workflowName == 'SQA Build' }}
uses: actions/upload-artifact@v4
with:
name: ${{ inputs.artifact_path }}
path: ${{ env.MATTER_EXTN_ROOT }}/${{ inputs.board }}/${{ inputs.app }}-${{ inputs.suffix }}/${{ inputs.app }}-${{ inputs.suffix }}/build/debug/${{ inputs.app }}-${{ inputs.suffix }}.s37

- name: Save Artifact Name
run: echo "ARTIFACT_${{ inputs.artifactPath }}}=${{ inputs.artifactPath }}" >> $GITHUB_ENV

- name: Upload Artifactory
if: ${{ inputs.workflow_name != 'SQA Build' }}
if: ${{ inputs.workflowName != 'SQA Build' }}
uses: actions/upload-artifact@v4
with:
name: ${{ inputs.addAppComponent }} ${{ inputs.optionalSlcParams }} ${{ inputs.app }}-${{ inputs.suffix }} ${{ inputs.board }}
Expand Down
30 changes: 13 additions & 17 deletions .github/workflows/sqa-build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ jobs:
lto:
# Job triggered either automatically by release_ or main branch, or manual trigger (if needed)
# if: ${{ github.event_name == 'workflow_run' && (startsWith(github.event.workflow_run.head_branch, 'release_' || github.event.workflow_run.head_branch == 'main')) || github.event_name == 'workflow_dispatch' }}
runs-on: ubuntu-latest
strategy:
matrix:
# Every app builds for every board and suffix
Expand All @@ -21,23 +20,20 @@ jobs:
appType: [ lto ]
family: [ series-2 ]
addAppComponent: [ ', toolchain_gcc_lto' ]
steps:
- name: ${{ matrix.app }}-${{ matrix.suffix }} ${{ matrix.addAppComponent}} ${{ matrix.board }} ${{ matrix.appType }}
uses: ./.github/workflows/generate-and-build.yaml
with:
app: ${{ matrix.app }}
board: ${{ matrix.board }}
suffix: ${{ matrix.suffix }}
addAppComponent: ${{ matrix.addAppComponent }}
removeAppComponent: ${{ matrix.removeAppComponent }}
family: ${{ matrix.family }}
appType: ${{ matrix.appType }}
technology: OpenThread
workflow_name: 'SQA Build'
artifact_path: ${{ matrix.appType }}_${{ matrix.board }}_${{ matrix.technology }}_${{ matrix.app }}

- name: Save Artifact Name
run: echo "ARTIFACT_${{ matrix.appType }}_${{ matrix.board }}_${{ matrix.technology }}_${{ matrix.app }}=${{ matrix.appType }}_${{ matrix.board }}_${{ matrix.technology }}_${{ matrix.app }}" >> $GITHUB_ENV
name: ${{ matrix.app }}-${{ matrix.suffix }} ${{ matrix.addAppComponent}} ${{ matrix.board }} ${{ matrix.appType }}
uses: ./.github/workflows/generate-and-build.yaml
with:
app: ${{ matrix.app }}
board: ${{ matrix.board }}
suffix: ${{ matrix.suffix }}
addAppComponent: ${{ matrix.addAppComponent }}
removeAppComponent: ${{ matrix.removeAppComponent }}
family: ${{ matrix.family }}
appType: ${{ matrix.appType }}
technology: OpenThread
workflowName: 'SQA Build'
artifactPath: ${{ matrix.appType }}_${{ matrix.board }}_${{ matrix.technology }}_${{ matrix.app }}

zip_artifacts:
runs-on: ubuntu-latest
Expand Down

0 comments on commit 2b2999a

Please sign in to comment.