Skip to content

Tmp ci

Tmp ci #930

Workflow file for this run

name: Package, test and upload core

Check failure on line 1 in .github/workflows/package_core.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/package_core.yml

Invalid workflow file

(Line: 8, Col: 3): The workflow must contain at least one job with no dependencies.
on:
- push
- pull_request
jobs:
inspect-logs:
name: Analyze logs
runs-on: ubuntu-latest
needs:
- build-env
- package-core
- test-core
if: ${{ !cancelled() && needs.build-env.result == 'success' }}
env:
ALL_BOARD_DATA: ${{ needs.build-env.outputs.ALL_BOARD_DATA }}
steps:
# Collect and summarize logs
- run: |
extra/ci_inspect_logs.py result summary full_log
if [ "${{ github.event_name }}" == "pull_request" ]; then
mkdir -p comment-request
echo "${{ github.event.pull_request.number }}" > comment-request/pr_number
cp summary comment-request/comment_body
echo "delete-existing" > comment-request/update_mode
else
cat summary >> $GITHUB_STEP_SUMMARY
fi
cat full_log >> $GITHUB_STEP_SUMMARY
echo "CI_RESULT=$(cat result)" > $GITHUB_OUTPUT
- name: Archive comment information
uses: actions/upload-artifact@v4
if: ${{ github.event_name == 'pull_request' }}
with:
name: comment-request
path: comment-request/
- name: Clean up intermediate artifacts
uses: geekyeggo/[email protected]
with:
name: |
build-report-*
test-report-*
failOnError: false
verify-core:
runs-on: ubuntu-latest
needs:
- inspect-logs
if: ${{ !cancelled() }}
steps:
- name: CI run result
run: |
echo ${{ needs.inspect-logs.outputs.CI_RESULT }}
exit ${{ ((needs.inspect-logs.outputs.CI_RESULT == 'PASSED') && !contains(needs.*.result, 'failure')) && '0' || '1' }}
publish-core:
name: Publish core
runs-on: ubuntu-latest
if: ${{ github.event_name == 'push' && github.repository == 'arduino/ArduinoCore-zephyr' }}
needs:
- build-env
- package-core
- inspect-logs
environment: production
permissions:
id-token: write
contents: read
steps:
- uses: actions/download-artifact@v4
with:
path: .
pattern: ArduinoCore-*
merge-multiple: true
- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v4
with:
role-to-assume: ${{ secrets.IAM_ROLE }}
aws-region: ${{ secrets.AWS_REGION }}
- name: Upload artifact
run: |
for f in ArduinoCore-*.tar.bz2 ; do
aws s3 cp $f s3://${{ secrets.S3_BUCKET }}/
done
prepare-json:
name: Prepare jsons
runs-on: ubuntu-latest
needs:
- build-env
- package-core
- inspect-logs
env:
CORE_TAG: ${{ needs.build-env.outputs.CORE_TAG }}
CORE_HASH: ${{ needs.build-env.outputs.CORE_HASH }}
ARTIFACTS: ${{ needs.build-env.outputs.ARTIFACTS }}
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
persist-credentials: false
fetch-tags: true
- uses: actions/download-artifact@v4
with:
path: .
pattern: ArduinoCore-*
merge-multiple: true
- name: Prepare package index snippets
run: |
jq -cr '.[]' <<< ${ARTIFACTS} | while read -r artifact; do
ARTIFACT_FILE=ArduinoCore-${artifact}-${CORE_HASH}.tar.bz2
PACKAGE_JSON=ArduinoCore-${artifact}-${CORE_TAG}.json
./extra/gen_package_index_json.sh ${artifact} ${ARTIFACT_FILE} ${PACKAGE_JSON}
done
- name: Archive package index snippets
uses: actions/upload-artifact@v4
with:
name: ArduinoCore-zephyr-${{ env.CORE_TAG }}-jsons
path: ArduinoCore-*-${{ env.CORE_TAG }}.json