diff --git a/.github/labeler.yml b/.github/labeler.yml new file mode 100644 index 00000000..d7b6a02d --- /dev/null +++ b/.github/labeler.yml @@ -0,0 +1,19 @@ +aarch64: +- changed-files: + - any-glob-to-any-file: src/arch/aarch64/**/* + +loongarch64: +- changed-files: + - any-glob-to-any-file: src/arch/loongarch64/**/* + +riscv64: +- changed-files: + - any-glob-to-any-file: src/arch/riscv64/**/* + +x86_64: +- changed-files: + - any-glob-to-any-file: src/arch/x86_64/**/* + + + + diff --git a/.github/workflows/issue-labeler.yml b/.github/workflows/issue-labeler.yml new file mode 100644 index 00000000..9f93b586 --- /dev/null +++ b/.github/workflows/issue-labeler.yml @@ -0,0 +1,106 @@ +--- +name: Issue Labeler + +on: + issues: + types: [opened, edited] + +jobs: + triage: + name: Issue triage + permissions: + contents: read + issues: write + runs-on: ubuntu-latest + steps: + - uses: actions/github-script@v7 + with: + github-token: ${{ secrets.GITHUB_TOKEN }} + script: | + const title = context.payload.issue.title.toLowerCase(); + const body = context.payload.issue.body?.toLowerCase() || ''; + const labels = []; + + // Feature requests + if (title.includes('feat') || title.includes('feature') || + body.includes('feat') || body.includes('feature')) { + labels.push('feature'); + } + + // Bug reports + if (title.includes('fix') || title.includes('bug') || + body.includes('fix') || body.includes('bug')) { + labels.push('bug'); + } + + // Documentation + if (title.includes('docs') || title.includes('documentation') || + body.includes('docs') || body.includes('documentation')) { + labels.push('documentation'); + } + + // CI/CD + if (title.includes('ci') || body.includes('ci')) { + labels.push('ci'); + } + + // Architecture specific + if (title.includes('aarch64') || body.includes('aarch64')) { + labels.push('aarch64'); + } + if (title.includes('aarch') || body.includes('aarch')) { + labels.push('aarch64'); + } + + if (title.includes('loongarch64') || body.includes('loongarch64')) { + labels.push('loongarch64'); + } + if (title.includes('loongarch') || body.includes('loongarch')) { + labels.push('loongarch64'); + } + + if (title.includes('riscv64') || body.includes('riscv64')) { + labels.push('riscv64'); + } + + if (title.includes('x86_64') || body.includes('x86_64')) { + labels.push('x86_64'); + } + + // Good first issue + if (title.includes('good first issue') || body.includes('good first issue') || + title.includes('beginner') || body.includes('beginner') || + title.includes('starter') || body.includes('starter')) { + labels.push('good first issue'); + } + + // Help wanted + if (title.includes('help wanted') || body.includes('help wanted') || + title.includes('help') || body.includes('help') || + title.includes('help needed') || body.includes('help needed')) { + labels.push('help wanted'); + } + + // Question + if (title.includes('question') || body.includes('question') || + title.includes('how to') || body.includes('how to') || + title.includes('how do') || body.includes('how do')) { + labels.push('question'); + } + + // Security + if (title.includes('security') || body.includes('security') || + title.includes('vulnerability') || body.includes('vulnerability') || + title.includes('cve') || body.includes('cve')) { + labels.push('security'); + } + + // Add labels if any were found + if (labels.length > 0) { + await github.rest.issues.addLabels({ + owner: context.repo.owner, + repo: context.repo.repo, + issue_number: context.issue.number, + labels: labels + }); + } \ No newline at end of file diff --git a/.github/workflows/labeler.yml b/.github/workflows/labeler.yml new file mode 100644 index 00000000..e8924310 --- /dev/null +++ b/.github/workflows/labeler.yml @@ -0,0 +1,64 @@ +--- + name: Pull Request Labeler + + on: + pull_request_target: + + jobs: + triage: + name: Label triage + permissions: + contents: read + pull-requests: write + issues: write + runs-on: ubuntu-latest + steps: + - uses: actions/labeler@v5 + with: + sync-labels: true + - uses: actions/github-script@v7 + with: + github-token: ${{ secrets.GITHUB_TOKEN }} + script: | + const title = context.payload.pull_request.title.toLowerCase(); + const labels = []; + + if (title.includes('feat') || title.includes('feature')) { + labels.push('feature'); + } + + if (title.includes('fix') || title.includes('bug')) { + labels.push('bug'); + } + + if (title.includes('docs') || title.includes('documentation')) { + labels.push('documentation'); + } + + if (title.includes('ci')) { + labels.push('ci'); + } + + if (title.includes('aarch64')) { + labels.push('aarch64'); + } + + if (title.includes('loongarch64')) { + labels.push('loongarch64'); + } + + if (title.includes('riscv64')) { + labels.push('riscv64'); + } + + if (title.includes('x86_64')) { + labels.push('x86_64'); + } + + await github.rest.issues.addLabels({ + owner: context.repo.owner, + repo: context.repo.repo, + issue_number: context.issue.number, + labels: labels + }); + \ No newline at end of file diff --git a/Cargo.toml b/Cargo.toml index 4920c3c3..2f39c1c3 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -48,6 +48,9 @@ x2apic = "0.4.3" raw-cpuid = "10.7.0" [features] +############# general ############## +iommu = [] # supported by: aarch64 +pci = [] # supported by: aarch64 ############# aarch64 ############## # irqchip driver gicv2 = [] @@ -57,15 +60,13 @@ pl011 = [] xuartps = [] imx_uart = [] uart_16550 = [] -# functionality -iommu = [] -pci = [] # pagetable layout pt_layout_qemu = [] pt_layout_rk3568 = [] # cpu a55 = [] a53 = [] +# uart infos rk3568_uart_base = [] ############## riscv64 ############# # irqchip driver