add actions/checkout #30
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: SQA Build | |
on: | |
push: # To be removed once testing is finished | |
workflow_dispatch: | |
workflow_run: | |
workflows: ["Full Build"] | |
types: | |
- completed | |
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' }} | |
strategy: | |
matrix: | |
# Every app builds for every board and suffix | |
app: [ lock-app, lighting-app ] | |
board: [ brd4187c, brd4116a ] | |
suffix: [ thread ] | |
appType: [ lto ] | |
family: [ series-2 ] | |
addAppComponent: [ ', toolchain_gcc_lto' ] | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: ${{ matrix.app }}-${{ matrix.suffix }} ${{ matrix.addAppComponent}} ${{ matrix.board }} ${{ matrix.appType }} | |
id: build_binary | |
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 | |
zip_artifacts: | |
runs-on: ubuntu-latest | |
# needs: [ota_thread_v2, ota_thread_v3, ota_thread_lz4_v2, ota_thread_lz4_v3, m_ota_thread, m_ota_enc_thread, low_power, lto, icd_idm, icd_sync ] | |
needs: [ lto ] | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Download artifacts into proper folder path | |
run: | | |
for artifact in $(printenv | grep ARTIFACT_ | sed 's/.*=//'); do | |
base_name=$(echo $artifact | sed 's/_[^_]*$//') | |
folder_structure=$(echo base_name | tr '_' '/') | |
mkdir -p out/$folder_structure | |
gh run download -n $artifact -D out/$folder_structure ; | |
done | |
- name: Create SQA Build Binaries Top Folder | |
run: mkdir -p sqa-build-binaries | |
- name: Move Artifacts to New Folder | |
run: | | |
find out -type f -exec mv {} sqa_build_binaries/ \; | |
- name: List Directory Contents | |
run: ls -R sqa-build-binaries | |
- name: Zip Artifacts into SQA Build Binaries | |
run: zip -r sqa-build-binaries.zip sqa-build-binaries | |
- name: Upload SQA Build Binaries | |
uses: actions/upload-artifact@v4 | |
with: | |
name: sqa_build_binaries_zip | |
path: sqa-build-binaries.zip |