-
Notifications
You must be signed in to change notification settings - Fork 39
Add CI workflows by copy/pasting the meta-qcom ones #118
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
f819b9d
23b0598
9482396
68410cd
f35ecaa
4690ba3
c2edbc5
d380fbe
5cf71f9
d60b707
cf9c932
400b0d0
a3b5a03
882b77f
ab0e977
9fa9b0a
a255e43
6f18f62
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,216 @@ | ||
| name: Build Yocto | ||
|
|
||
| on: | ||
| workflow_call: | ||
| outputs: | ||
| artifacts_url: | ||
| description: "URL to retrieve build artifacts" | ||
| value: ${{ jobs.create-output.outputs.url }} | ||
|
|
||
| env: | ||
| CACHE_DIR: /efs/qli/meta-qcom | ||
| KAS_REPO_REF_DIR: /efs/qli/meta-qcom/kas-mirrors | ||
| KAS_CONTAINER: /efs/qli/meta-qcom/kas-mirrors/kas-container | ||
|
|
||
| jobs: | ||
| kas-setup: | ||
| if: github.repository_owner == 'qualcomm-linux' | ||
| runs-on: [self-hosted, qcom-u2404, amd64-ssd] | ||
| steps: | ||
| - name: Update kas-container | ||
| run: | | ||
| LATEST=$(git ls-remote --tags --refs --sort="v:refname" https://github.com/siemens/kas | tail -n1 | sed 's/.*\///') | ||
| wget -qO ${KAS_CONTAINER} https://raw.githubusercontent.com/siemens/kas/refs/tags/$LATEST/kas-container | ||
| chmod +x ${KAS_CONTAINER} | ||
|
|
||
| - name: Update kas mirrors | ||
| run: | | ||
| for r in $(find ${KAS_REPO_REF_DIR}/* -maxdepth 0 -type d); do | ||
| echo "pre-fetch: $r" | ||
| git -C $r fetch --prune origin '+refs/*:refs/*' | ||
| done | ||
|
|
||
| - uses: actions/checkout@v4 | ||
| with: | ||
| repository: qualcomm-linux/meta-qcom | ||
| ref: master | ||
|
|
||
| - name: Run kas lock | ||
| run: | | ||
| ${KAS_CONTAINER} lock --update ci/base.yml:ci/qcom-distro.yml | ||
|
|
||
| - uses: actions/upload-artifact@v4 | ||
| with: | ||
| name: kas-lock | ||
| path: ci/*.lock.yml | ||
|
|
||
| yocto-run-checks: | ||
| needs: kas-setup | ||
| if: github.repository_owner == 'qualcomm-linux' | ||
| runs-on: [self-hosted, qcom-u2404, amd64-ssd] | ||
| steps: | ||
| - uses: actions/checkout@v4 | ||
| with: | ||
| repository: qualcomm-linux/meta-qcom | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. don't you need to say master here? or is it the default? perhaps better to say it though, so that we have less chances to make a mistake when we branch for LTS!
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. done
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Should the branch name be extracted as a param? We can do that later, of course. Or maybe we should use |
||
| path: meta-qcom | ||
| ref: master | ||
|
|
||
| - uses: actions/checkout@v4 | ||
| with: | ||
| path: meta-qcom-distro | ||
|
|
||
| - uses: actions/download-artifact@v6 | ||
| with: | ||
| name: kas-lock | ||
| path: meta-qcom/ci/ | ||
|
|
||
| - name: Run yocto-check-layer | ||
| run: | | ||
| cd meta-qcom-distro | ||
| ../meta-qcom/ci/kas-container-shell-helper.sh ci/yocto-check-layer.sh ../meta-qcom-distro | ||
|
|
||
| - name: Run Yocto patchreview | ||
| run: | | ||
| cd meta-qcom | ||
| ci/kas-container-shell-helper.sh ci/yocto-patchreview.sh ../meta-qcom-distro | ||
|
|
||
| compile: | ||
| needs: [kas-setup, yocto-run-checks] | ||
| if: github.repository_owner == 'qualcomm-linux' | ||
| runs-on: [self-hosted, qcom-u2404, amd64-ssd] | ||
| outputs: | ||
| url: ${{ steps.compile_kas.outputs.url }} | ||
| strategy: | ||
| fail-fast: true | ||
| matrix: | ||
| machine: | ||
| - iq-8275-evk | ||
| - iq-9075-evk | ||
| - iq-x7181-evk | ||
| - kaanapali-mtp | ||
| - qcm6490-idp | ||
| - qcs615-ride | ||
| - qcs8300-ride-sx | ||
| - qcs9100-ride-sx | ||
| - qcom-armv8a | ||
| - rb1-core-kit | ||
| - rb3gen2-core-kit | ||
| - sm8750-mtp | ||
| distro: | ||
| - name: qcom-distro | ||
| yamlfile: ':ci/qcom-distro-prop-image.yml' | ||
| - name: qcom-distro-sota | ||
| yamlfile: ':ci/qcom-distro-sota.yml' | ||
| kernel: | ||
| - type: default | ||
| dirname: "" | ||
| yamlfile: "" | ||
| - type: 6.18 | ||
| dirname: "+linux-qcom-6.18" | ||
| yamlfile: ":ci/linux-qcom-6.18.yml" | ||
| include: | ||
| # Additional builds for specific machines | ||
| - machine: qcom-armv8a | ||
| distro: | ||
| name: qcom-distro | ||
| yamlfile: ':ci/qcom-distro-prop-image.yml' | ||
| kernel: | ||
| type: additional | ||
| dirname: "+linux-yocto-dev" | ||
koenkooi marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| yamlfile: ":ci/linux-yocto-dev.yml" | ||
| # include kvm compatible machines for the builds | ||
| - machine: qcom-armv8a | ||
| distro: | ||
| name: qcom-distro-kvm | ||
| yamlfile: ':ci/qcom-distro-kvm.yml' | ||
| kernel: | ||
| type: default | ||
| dirname: "" | ||
| yamlfile: "" | ||
| - machine: qcom-armv7a | ||
| distro: | ||
| name: qcom-distro | ||
| yamlfile: ':ci/qcom-distro.yml' | ||
| kernel: | ||
| type: default | ||
| dirname: "" | ||
| yamlfile: "" | ||
| name: ${{ matrix.machine }}/${{ matrix.distro.name }}${{ matrix.kernel.dirname }} | ||
| steps: | ||
| - uses: actions/checkout@v4 | ||
| with: | ||
| repository: qualcomm-linux/meta-qcom | ||
| ref: master | ||
|
|
||
| - name: Run kas build | ||
| uses: ./.github/actions/compile | ||
| id: compile_kas | ||
| with: | ||
| machine: ${{matrix.machine}} | ||
| distro_yaml: ${{matrix.distro.yamlfile}} | ||
| distro_name: ${{matrix.distro.name}} | ||
| kernel_yaml: ${{matrix.kernel.yamlfile}} | ||
| kernel_dirname: ${{matrix.kernel.dirname}} | ||
| cache_dir: ${CACHE_DIR} | ||
| kas: ${KAS_CONTAINER} | ||
|
|
||
| publish_summary: | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. not for this PR, but we need to figure out how not to duplicate this one, and turn it into a reusable action. can you make a note for it?
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Sure |
||
| needs: compile | ||
| runs-on: [self-hosted, qcom-u2404, amd64-ssd] | ||
| steps: | ||
| - name: 'Download build URLs' | ||
| uses: actions/download-artifact@v6 | ||
| with: | ||
| github-token: ${{ secrets.GITHUB_TOKEN }} | ||
| pattern: build-url* | ||
| path: urlfiles | ||
| merge-multiple: true | ||
|
|
||
| - name: "Print output" | ||
| shell: python | ||
| id: print-output | ||
| run: | | ||
| import os | ||
| ftable = {} | ||
| oslist = set() | ||
| machinelist = set() | ||
| for fname in os.listdir("./urlfiles"): | ||
| if fname.startswith("build-url"): | ||
| b, m, o = fname.split("_", 2) | ||
| oslist.add(o) | ||
| machinelist.add(m) | ||
| url = "" | ||
| with open(f"./urlfiles/{fname}", "r") as urlfile: | ||
| url = urlfile.read() | ||
| if not o in ftable: | ||
| ftable.update({o:{m: url}}) | ||
| else: | ||
| ftable[o].update({m: url}) | ||
|
|
||
| table_str = "| |" | ||
|
|
||
| for m in sorted(machinelist): | ||
| table_str += f" {m} |" | ||
|
|
||
| table_str += "\n|" | ||
| for i in range(len(machinelist) + 1): | ||
| table_str += " ---- |" | ||
|
|
||
| table_str += "\n" | ||
|
|
||
| for o in sorted(ftable.keys()): | ||
| table_str += f"| {o} |" | ||
| for m in sorted(machinelist): | ||
| url = ftable[o].get(m) | ||
| if url: | ||
| url = url.strip() | ||
| table_str += f" [Files]({url}/{o}/{m}/) |" | ||
| else: | ||
| table_str += " |" | ||
| table_str += "\n" | ||
| summary_file_name = os.environ.get("GITHUB_STEP_SUMMARY") | ||
| if summary_file_name: | ||
| with open(summary_file_name, "a") as summaryfile: | ||
| summaryfile.write("## Download URLs\n") | ||
| summaryfile.write(table_str) | ||
| print(table_str) | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,28 @@ | ||
| name: Build on PR | ||
|
|
||
| on: | ||
| pull_request: | ||
| paths-ignore: | ||
| - 'README.md' | ||
| - 'README' | ||
| - 'SECURITY.md' | ||
|
|
||
| permissions: | ||
| checks: write | ||
| pull-requests: write | ||
| contents: read | ||
| packages: read | ||
|
|
||
| jobs: | ||
| event-file: | ||
| name: "Upload event file" | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - name: Upload | ||
| uses: actions/upload-artifact@v4 | ||
| with: | ||
| name: Event File | ||
| path: ${{ github.event_path }} | ||
| build-pr: | ||
| uses: ./.github/workflows/build-yocto.yml | ||
|
|
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,66 @@ | ||
| name: Publish test results | ||
|
|
||
| on: | ||
| workflow_call: | ||
| inputs: | ||
| workflow_id: | ||
| required: true | ||
| type: string | ||
| event_name: | ||
| required: true | ||
| type: string | ||
| event_file: | ||
| required: true | ||
| type: string | ||
| commit: | ||
| required: true | ||
| type: string | ||
|
|
||
| permissions: | ||
| checks: write | ||
| pull-requests: write | ||
| contents: read | ||
| packages: read | ||
|
|
||
| jobs: | ||
| publish-test-results: | ||
| name: "Publish Tests Results" | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - name: Download result files | ||
| uses: actions/download-artifact@v6 | ||
| with: | ||
| run-id: ${{ inputs.workflow_id }} | ||
| path: artifacts | ||
| github-token: ${{ github.token }} | ||
|
|
||
| - name: Download result files PR | ||
| if: ${{ github.run_id != inputs.workflow_id }} | ||
| uses: actions/download-artifact@v6 | ||
| with: | ||
| path: artifacts | ||
| github-token: ${{ github.token }} | ||
|
|
||
| - name: "List files" | ||
| run: | | ||
| echo $GITHUB_WORKSPACE | ||
| ls -R $GITHUB_WORKSPACE | ||
|
|
||
| - id: app_token | ||
| uses: actions/create-github-app-token@v2 | ||
| if: always() | ||
| with: | ||
| app-id: 2291458 | ||
| private-key: ${{ secrets.TEST_REPORTING_APP_TOKEN }} | ||
|
|
||
| - name: Publish Test Results | ||
| uses: EnricoMi/publish-unit-test-result-action@v2 | ||
| if: always() | ||
| with: | ||
| commit: ${{ inputs.commit }} | ||
| event_file: ${{ inputs.event_file}} | ||
| event_name: ${{ inputs.event_name }} | ||
| files: "${{ github.workspace }}/artifacts/**/*.xml" | ||
| action_fail: true | ||
| action_fail_on_inconclusive: true | ||
| github_token: ${{ steps.app_token.outputs.token }} |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,31 @@ | ||
| name: Build on push | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. please update README to show the status of HEAD.
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Done, not sure how to check that. |
||
|
|
||
| on: | ||
| push: | ||
| branches: | ||
| - main | ||
|
|
||
| permissions: | ||
| checks: write | ||
| pull-requests: write | ||
| contents: read | ||
| packages: read | ||
|
|
||
| jobs: | ||
| build: | ||
| uses: ./.github/workflows/build-yocto.yml | ||
| test: | ||
| uses: ./.github/workflows/test.yml | ||
| needs: [build] | ||
| secrets: inherit | ||
| with: | ||
| build_id: ${{ github.run_id }} | ||
| publish-test-results: | ||
| uses: ./.github/workflows/publish-results.yml | ||
| needs: test | ||
| secrets: inherit | ||
| with: | ||
| workflow_id: ${{ github.run_id }} | ||
| event_name: ${{ github.event_name }} | ||
| event_file: ${{ github.event_path }} | ||
| commit: ${{ github.sha }} | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,31 @@ | ||
| name: QuIC Organization Repolinter | ||
|
|
||
| on: | ||
| push: | ||
| branches: [ main ] | ||
| pull_request: | ||
| branches: [ main ] | ||
| workflow_dispatch: | ||
|
|
||
| jobs: | ||
| repolinter: | ||
| if: github.repository_owner == 'qualcomm-linux' | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - name: Checkout Repo | ||
| uses: actions/checkout@v4 | ||
| - name: Verify repolinter config file is present | ||
| id: check_files | ||
| uses: andstor/file-existence-action@v3 | ||
| with: | ||
| files: "repolint.json" | ||
| - name: Run Repolinter with local repolint.json | ||
| if: steps.check_files.outputs.files_exists == 'true' | ||
| uses: todogroup/repolinter-action@v1 | ||
| with: | ||
| config_file: "repolint.json" | ||
| - name: Run Repolinter with default ruleset | ||
| if: steps.check_files.outputs.files_exists == 'false' | ||
| uses: todogroup/repolinter-action@v1 | ||
| with: | ||
| config_url: "https://raw.githubusercontent.com/quic/.github/main/repolint.json" |
Uh oh!
There was an error while loading. Please reload this page.