forked from torvalds/linux
-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Currently supported: - Github Actions: - build-validation: check different combinations of validation - IRC: send notifications to the IRC channel - Update TopGit tree: run build tests and then override the export branch. - Cirrus: - Run tests in a KVM: selftests, kunit, packetdrill, etc. Signed-off-by: Matthieu Baerts <matthieu.baerts@tessares.net>
- Loading branch information
1 parent
4e180bc
commit 43dc8f3
Showing
4 changed files
with
227 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
|
||
# Launch 2 jobs in //: with and without debug | ||
task: | ||
name: KVM validation | ||
only_if: $CIRRUS_TAG != '' ## only tags | ||
|
||
container: | ||
image: mptcp/mptcp-upstream-virtme-docker | ||
kvm: true ## Needed for the tests | ||
cpu: 8 ## Max 16 per project, even number with kvm | ||
memory: 8G ## Max 4 per CPU | ||
|
||
env: | ||
CIRRUS_CLONE_DEPTH: 1 ## no need to have a full clone | ||
CIRRUS_LOG_TIMESTAMP: true ## useful | ||
INPUT_CCACHE_MAXSIZE: 1G | ||
matrix: | ||
MATRIX_JOB: normal | ||
MATRIX_JOB: debug | ||
|
||
ccache_cache: | ||
folder: ".virtme/ccache" | ||
reupload_on_changes: true | ||
fingerprint_script: | ||
- echo ${MATRIX_JOB} | ||
|
||
test_script: /entrypoint.sh expect-${MATRIX_JOB} | ||
|
||
on_failure: | ||
vmlinux_artifacts: | ||
path: "vmlinux.zstd" | ||
|
||
always: | ||
conclusion_artifacts: | ||
path: "conclusion.txt" | ||
type: text/plain | ||
summary_artifacts: | ||
path: "summary.txt" | ||
type: text/plain | ||
tap_result_artifacts: | ||
path: "*.tap" | ||
type: text/plain | ||
# JUnit format is for the moment only useful for PR but publish them just in case for later | ||
junit_artifacts: | ||
path: "*.tap.xml" | ||
type: text/xml | ||
format: junit |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
name: "MPTCP Upstream Build Validation" | ||
on: | ||
push: | ||
branches-ignore: | ||
- 'archived/**' # previous branches | ||
- 't/**' # TopGit tree | ||
- 'net-next' # part of the TopGit tree | ||
- 'for-review' # part of the TopGit tree | ||
- 'export' # part of the TopGit tree | ||
tags: | ||
- 'export/**' # the CI create a new tag once there is a new export | ||
- 'patchew/**' # patchew is using tags | ||
|
||
jobs: | ||
build: | ||
name: "Build (matrix)" | ||
runs-on: ubuntu-latest | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
defconfig: ['x86_64', 'i386'] | ||
ipv6: ['with_ipv6', 'without_ipv6'] | ||
mptcp: ['with_mptcp', 'without_mptcp'] | ||
steps: | ||
- name: "Checkout" | ||
uses: actions/checkout@v2 | ||
with: | ||
fetch-depth: 100 # we should not have more commits on top of net-next/export | ||
- name: "Setup cache for CCache" | ||
uses: actions/cache@v2 | ||
with: | ||
path: ${{ github.workspace }}/.ccache | ||
key: ${{ runner.os }}-build-${{ matrix.defconfig }}-${{ matrix.ipv6 }}-${{ matrix.mptcp }}-${{ github.run_id }}-${{ github.sha }} | ||
restore-keys: ${{ runner.os }}-build-${{ matrix.defconfig }}-${{ matrix.ipv6 }}-${{ matrix.mptcp }}- | ||
- name: "Build Validation" | ||
uses: multipath-tcp/mptcp-upstream-validate-export-action@main | ||
with: | ||
# we want to validate each commits on top of net-next/export except for stable | ||
each_commit: ${{ ! startswith(github.ref, 'refs/heads/stable/') }} | ||
ccache_maxsize: 620M ## 5/2^3=625: 5GB = project limit ; 2^3 = matrix | ||
defconfig: ${{ matrix.defconfig }} | ||
ipv6: ${{ matrix.ipv6 }} | ||
mptcp: ${{ matrix.mptcp }} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,105 @@ | ||
name: "IRC Notifications" | ||
on: | ||
create: | ||
issues: | ||
types: [opened, reopened, closed, assigned, unassigned] | ||
workflow_run: | ||
workflows: ["MPTCP Upstream Build Validation", "Update TopGit tree"] | ||
types: | ||
- completed | ||
check_suite: | ||
types: | ||
- completed | ||
|
||
jobs: | ||
irc-tag: | ||
name: "IRC Tag" | ||
if: github.repository_owner == 'multipath-tcp' && github.event_name == 'create' && github.event.ref_type == 'tag' | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: irc tag | ||
uses: rectalogic/notify-irc@v1 | ||
with: | ||
channel: "#MPTCPUpstream" | ||
nickname: gh-tag-bot | ||
message: "New tag available: ${{ github.event.ref }} (by ${{ github.actor }})" | ||
|
||
irc-issues: | ||
name: "IRC Issues" | ||
if: github.repository_owner == 'multipath-tcp' && github.event_name == 'issues' | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: irc issues | ||
uses: rectalogic/notify-irc@v1 | ||
with: | ||
channel: "#MPTCPUpstream" | ||
nickname: gh-issues-bot | ||
message: |- | ||
Issue #${{ github.event.issue.number }} has been ${{ github.event.action }} by ${{ github.actor }}. | ||
Issue title: "${{ github.event.issue.title }}" | ||
Issue opened by: ${{ github.event.issue.user.login }} | ||
Assignee (if any): ${{ github.event.assignee.login }} | ||
URL: ${{ github.event.issue.html_url }} | ||
irc-build: | ||
name: "IRC Build" | ||
if: github.repository_owner == 'multipath-tcp' && github.event_name == 'workflow_run' && github.event.workflow_run.name == 'MPTCP Upstream Build Validation' | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: irc build | ||
uses: rectalogic/notify-irc@v1 | ||
with: | ||
channel: "#MPTCPUpstream" | ||
nickname: gh-build-bot | ||
message: |- | ||
New build validating ${{ github.event.workflow_run.head_branch }} (by ${{ github.actor }}) ended with ${{ github.event.workflow_run.conclusion }} | ||
${{ github.event.workflow_run.html_url }} | ||
irc-topgit: | ||
name: "IRC TopGit" | ||
if: github.repository_owner == 'multipath-tcp' && github.event_name == 'workflow_run' && github.event.workflow_run.name == 'Update TopGit tree' && github.event.workflow_run.conclusion != 'success' | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: irc topgit | ||
uses: rectalogic/notify-irc@v1 | ||
with: | ||
channel: "#MPTCPUpstream" | ||
nickname: gh-topgit-bot | ||
message: |- | ||
New sync with latest net-next failed (initiated by ${{ github.actor }}): ${{ github.event.workflow_run.conclusion }} | ||
${{ github.event.workflow_run.html_url }} | ||
irc-tests: | ||
name: "IRC Tests" | ||
if: github.repository_owner == 'multipath-tcp' && github.event_name == 'check_suite' && github.event.check_suite.app.name == 'Cirrus CI' | ||
runs-on: ubuntu-latest | ||
steps: | ||
# from: https://cirrus-ci.org/guide/notifications/ | ||
- name: get status | ||
uses: octokit/request-action@v2.x | ||
id: get_status_check_run | ||
with: | ||
route: GET /repos/${{ github.repository }}/check-suites/${{ github.event.check_suite.id }}/check-runs?status=completed | ||
mediaType: '{"previews": ["antiope"]}' | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
- name: get conclusion | ||
id: get_conclusion_cirrus | ||
run: | | ||
echo "::set-output name=conclusion_0::$(curl ${CHECK_0_URL} || echo "0: Unable to get the conclusion")" | ||
echo "::set-output name=conclusion_1::$(curl ${CHECK_1_URL} || echo "1: Unable to get the conclusion")" | ||
env: | ||
CHECK_0_URL: "https://api.cirrus-ci.com/v1/artifact/task/${{ fromJson(steps.get_status_check_run.outputs.data).check_runs[0].external_id }}/conclusion/conclusion.txt" | ||
CHECK_1_URL: "https://api.cirrus-ci.com/v1/artifact/task/${{ fromJson(steps.get_status_check_run.outputs.data).check_runs[1].external_id }}/conclusion/conclusion.txt" | ||
- name: irc tests | ||
uses: rectalogic/notify-irc@v1 | ||
with: | ||
channel: "#MPTCPUpstream" | ||
nickname: gh-tests-bot | ||
message: |- | ||
New Tests job validating ${{ github.event.check_suite.head_branch }} (by ${{ github.actor }}) just ended: | ||
- ${{ steps.get_conclusion_cirrus.outputs.conclusion_0 }}: ${{ env.CHECK_0_URL }} | ||
- ${{ steps.get_conclusion_cirrus.outputs.conclusion_1 }}: ${{ env.CHECK_1_URL }} | ||
env: | ||
CHECK_0_URL: ${{ fromJson(steps.get_status_check_run.outputs.data).check_runs[0].details_url }} | ||
CHECK_1_URL: ${{ fromJson(steps.get_status_check_run.outputs.data).check_runs[1].details_url }} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
name: "Update TopGit tree" | ||
|
||
on: | ||
workflow_dispatch: | ||
inputs: | ||
keep_base_untouched: | ||
description: 'Set it to 1 to force a sync without updating the base from upstream' | ||
required: true | ||
default: '0' | ||
force_sync: | ||
description: 'Set it to 1 to force a sync even if net-next is not updated' | ||
required: true | ||
default: '0' | ||
|
||
schedule: | ||
- cron: '33 5 * * *' # in UTC: after US West coast's work day | ||
|
||
jobs: | ||
export: | ||
if: github.repository_owner == 'multipath-tcp' | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: "Checkout" | ||
uses: actions/checkout@v2 | ||
with: | ||
fetch-depth: 0 # we need all commits for TopGit | ||
token: '${{ secrets.PAT_JENKINS_TESSARES }}' | ||
- name: "Update TG tree" | ||
uses: multipath-tcp/mptcp-upstream-topgit-action@main | ||
with: | ||
not_base: "${{ github.event.inputs.keep_base_untouched || '0' }}" | ||
force_sync: "${{ github.event.inputs.force_sync || '0' }}" |