Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
183 changes: 183 additions & 0 deletions .github/workflows/build-yocto.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,183 @@
name: Build Yocto

on:
workflow_call:
inputs:
sdk:
required: false
type: string
default: "0"
outputs:
artifacts_url:
description: "URL to retrieve build artifacts"
value: ${{ jobs.create-output.outputs.url }}

# Concurrency is used to prevent multiple workflows from running for the same PR
concurrency:
group: ${{ github.workflow }}-${{ github.event_name == 'pull_request' && format('pr-{0}', github.event.pull_request.number) || format('push-{0}', github.sha) }}
cancel-in-progress: true

env:
CACHE_DIR: /efs/qli/meta-qcom
KAS_CLONE_DEPTH: 1

jobs:
kas-setup:
if: github.repository_owner == 'qualcomm-linux'
runs-on: [self-hosted, qcom-u2404, amd64]
steps:
- name: Setting up kas-container
run: |
KAS_CONTAINER=$RUNNER_TEMP/kas-container
echo "KAS_CONTAINER=$KAS_CONTAINER" >> $GITHUB_ENV
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}

- uses: actions/checkout@v4

- name: Run kas lock
run: |
${KAS_CONTAINER} lock --update ci/base.yml:ci/qcom-distro.yml

- name: Upload kas lockfile
uses: actions/upload-artifact@v6
with:
name: kas-lockfile
path: ci/*.lock.yml

- name: Upload kas-container
uses: actions/upload-artifact@v6
with:
name: kas-container
path: ${{ env.KAS_CONTAINER }}

yocto-run-checks:
needs: kas-setup
if: github.repository_owner == 'qualcomm-linux'
runs-on: [self-hosted, qcom-u2404, amd64]
steps:
- uses: actions/checkout@v4

- name: Download kas lockfile
uses: actions/download-artifact@v7
with:
name: kas-lockfile
path: ci

- name: Download kas-container
uses: actions/download-artifact@v7
with:
name: kas-container
path: ${{ runner.temp }}

- name: Setting up kas-container
run: |
KAS_CONTAINER=$RUNNER_TEMP/kas-container
echo "KAS_CONTAINER=$KAS_CONTAINER" >> $GITHUB_ENV
chmod +x $KAS_CONTAINER

- name: Run yocto-check-layer
run: |
ci/kas-container-shell-helper.sh ci/yocto-check-layer.sh

- name: Run Yocto patchreview
run: |
ci/kas-container-shell-helper.sh ci/yocto-patchreview.sh

compile:
needs: [kas-setup, yocto-run-checks]
if: github.repository_owner == 'qualcomm-linux'
runs-on: [self-hosted, qcom-u2404, amd64]
outputs:
url: ${{ steps.compile_kas.outputs.url }}
strategy:
fail-fast: true
matrix:
machine:
- uno-q
distro:
- name: poky-altcfg
yamlfile: ""
- 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

- name: Run kas build
uses: qualcomm-linux/meta-qcom/.github/actions/compile@master
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}
sdk: ${{inputs.sdk}}

publish_summary:
needs: compile
runs-on: [self-hosted, qcom-u2404, amd64]
steps:
- name: 'Download build URLs'
uses: actions/download-artifact@v7
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)
20 changes: 20 additions & 0 deletions .github/workflows/nightly-build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: Nightly Build

on:
schedule:
# NOTE - changes to the cron spec should be pushed by https://github.com/quic-yocto-ci
# so that build notification emails will be sent out properly.
# At 8:22 & 20:22 UTC everyday - picked a random "minute" as top of hour can be busy in github
- cron: "22 8,20 * * *"

permissions:
checks: write
pull-requests: write
contents: read
packages: read

jobs:
build-nightly:
uses: ./.github/workflows/build-yocto.yml
with:
sdk: "1"
28 changes: 28 additions & 0 deletions .github/workflows/pr.yml
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@v6
with:
name: Event File
path: ${{ github.event_path }}
build-pr:
uses: ./.github/workflows/build-yocto.yml

73 changes: 73 additions & 0 deletions .github/workflows/publish-results.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
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@v7
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@v7
with:
path: artifacts
github-token: ${{ github.token }}

- name: "List files"
id: listfiles
run: |
echo $GITHUB_WORKSPACE
ls -R $GITHUB_WORKSPACE
if ! find "${{ github.workspace }}/artifacts/" -name '*.xml' -print -quit | grep -q .; then
echo "Error: no .xml files found"
exit 1
fi

- 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()
&& contains(steps.listfiles.outcome, 'success')
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 }}
16 changes: 16 additions & 0 deletions .github/workflows/push.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
name: Build on push

on:
push:
branches:
- main

permissions:
checks: write
pull-requests: write
contents: read
packages: read

jobs:
build:
uses: ./.github/workflows/build-yocto.yml
31 changes: 31 additions & 0 deletions .github/workflows/repolinter.yml
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"
25 changes: 25 additions & 0 deletions .github/workflows/stales.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: 'Close stale issues and pull requests with no recent activity'
on:
schedule:
- cron: "30 1 * * *"

permissions:
issues: write
pull-requests: write

jobs:
stale:
runs-on: ubuntu-latest
steps:
- uses: actions/stale@v9
with:
stale-issue-message: 'This issue has been marked as stale due to 30 days of inactivity. Please add a comment and close if it is resolved or if it is no longer relevant.'
stale-pr-message: 'This pull request has been marked as stale due to 30 days of inactivity. To prevent automatic closure in 5 days, remove the stale label or add a comment. You can reopen a closed pull request at any time.'
exempt-issue-labels: bug,enhancement
exempt-pr-labels: bug,enhancement
days-before-stale: 30
days-before-close: 5
days-before-issue-close: -1
remove-stale-when-updated: true
remove-issue-stale-when-updated: true
remove-pr-stale-when-updated: true
14 changes: 14 additions & 0 deletions ci/base.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# yaml-language-server: $schema=https://raw.githubusercontent.com/siemens/kas/master/kas/schema-kas.json

header:
version: 14
includes:
- repo: meta-qcom
file: ci/base.yml

repos:
meta-qcom:
url: https://github.com/qualcomm-linux/meta-qcom
branch: master

meta-qcom-3rdparty:
Loading
Loading