From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from NAM04-MW2-obe.outbound.protection.outlook.com (NAM04-MW2-obe.outbound.protection.outlook.com [40.107.101.64]) by mx.groups.io with SMTP id smtpd.web10.62498.1686582946740758603 for ; Mon, 12 Jun 2023 08:15:46 -0700 Authentication-Results: mx.groups.io; dkim=fail reason="body hash did not verify" header.i=@nvidia.com header.s=selector2 header.b=M45b83/7; spf=permerror, err=parse error for token &{10 18 %{i}._ip.%{h}._ehlo.%{d}._spf.vali.email}: invalid domain name (domain: nvidia.com, ip: 40.107.101.64, mailfrom: nicklew@nvidia.com) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=G/FY3csfhUUYWNRCHdScHs013T+Ghs3qejmChbBx3VAg0qmN6+ACID0Dp30JaeE/19NxKWTsNb6FCn7Z514EkowBry/P9ggzLJHWECGV1E/8kgfibgmMqdpRLzrJXYKBWmIy1H3aeuL+GD4ORs6UPHUuDqoQdbfvcatSGdeoaD1luHtW+qT2u9Nc8PBAANTFTSZyrjWijCFI7mnAeiAzdTWdhraK0TZJczWv9omTlR5c31sFTxJaFXOD/Ox4zlRkJpweWsV6wYksS9B415WxBjVmZ1FJJPPLDpC3nwpGL+22OSadhHybLLt6zRkA6rDeleNV6s+b5H2o7sW9Pr1pKA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=P1QU3sUhv1c8hBsU2nxvhy0Y9Esk00UTFXFXAtRCDl0=; b=CYX7JWIVDNr8YOvankF21JoApCGRsubw/kE+kmJS0XjIqjfLas3Y2zVmlU6pBCJGoGrGKrJ0nCRXBZP3XS7IPYZu86suXTC14JO2wTSmPiftuEJNBUYMulfJE0dz/SUxs/qTa9HAL7sYLHay1XILcoIQNaMJTwkHPy+0g+g1QJRmBZucm4TSufOuh3qfhok2tA3KAlT1sJMt7Ob0S95NDc2HcspUqWlppEg+IiTysEAojDG9iVUiTDJ4TlEAmMFA4HwTMGG/500Bvmc/6NoPKQu5Z5pJE2pl7CNH+BfGsVXtmgb3BjsFWH1XDsxJZ8gR02FQrDApE8Pz4AKa6vgC6A== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.117.160) smtp.rcpttodomain=edk2.groups.io smtp.mailfrom=nvidia.com; dmarc=pass (p=reject sp=reject pct=100) action=none header.from=nvidia.com; dkim=none (message not signed); arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Nvidia.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=P1QU3sUhv1c8hBsU2nxvhy0Y9Esk00UTFXFXAtRCDl0=; b=M45b83/7eYwBqvs5CvFSXigNM6c0e2Wz9F7Bu+jipTVbBN6zqkIFnEq9DGXm/BE1z6B4DaHIsVpZgLM7+Ql42aNnKvmN1k92mQU1rnP74La1HimJfOWOR189a5K70udSE/51/6Kd6DMRpzxBWxUqtx5GQql9cjvIImef7DVRdPNut5VDAKLJ9msiTFXEO6xrPY4iGt6MYCwHpP39nIA4D537Mabki9uj6RI24XjG8iaDFMUm//wF7jmsUj4nmstg+NXQtllcAuzAK3GrEXTsxOMS/6QwMxTUCAON9SXe/A77UfcB1sMjCilB1XpWxR0Unyb2uu+x67XayOB06bIsgw== Received: from SJ0PR13CA0041.namprd13.prod.outlook.com (2603:10b6:a03:2c2::16) by PH8PR12MB8432.namprd12.prod.outlook.com (2603:10b6:510:25b::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6455.33; Mon, 12 Jun 2023 15:15:42 +0000 Received: from MWH0EPF000989EC.namprd02.prod.outlook.com (2603:10b6:a03:2c2:cafe::b9) by SJ0PR13CA0041.outlook.office365.com (2603:10b6:a03:2c2::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6500.22 via Frontend Transport; Mon, 12 Jun 2023 15:15:42 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 216.228.117.160) smtp.mailfrom=nvidia.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=nvidia.com; Received-SPF: Pass (protection.outlook.com: domain of nvidia.com designates 216.228.117.160 as permitted sender) receiver=protection.outlook.com; client-ip=216.228.117.160; helo=mail.nvidia.com; pr=C Received: from mail.nvidia.com (216.228.117.160) by MWH0EPF000989EC.mail.protection.outlook.com (10.167.241.139) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6500.22 via Frontend Transport; Mon, 12 Jun 2023 15:15:41 +0000 Received: from rnnvmail201.nvidia.com (10.129.68.8) by mail.nvidia.com (10.129.200.66) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.5; Mon, 12 Jun 2023 08:15:22 -0700 Received: from rnnvmail205.nvidia.com (10.129.68.10) by rnnvmail201.nvidia.com (10.129.68.8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.37; Mon, 12 Jun 2023 08:15:21 -0700 Received: from NV-CL38DL3.nvidia.com (10.127.8.9) by mail.nvidia.com (10.129.68.10) with Microsoft SMTP Server id 15.2.986.37 via Frontend Transport; Mon, 12 Jun 2023 08:15:20 -0700 From: "Nickle Wang" To: CC: Abner Chang , Igor Kulchytskyy Subject: [edk2-redfish-client][PATCH] RedfishClientPkg/.github: add patch check Date: Mon, 12 Jun 2023 23:15:20 +0800 Message-ID: <20230612151520.11496-1-nicklew@nvidia.com> X-Mailer: git-send-email 2.17.1 MIME-Version: 1.0 Return-Path: nicklew@nvidia.com X-NV-OnPremToCloud: ExternallySecured X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: MWH0EPF000989EC:EE_|PH8PR12MB8432:EE_ X-MS-Office365-Filtering-Correlation-Id: 88fd96db-672e-411c-1ae7-08db6b57e321 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: +uc9M/M55euwD31jRLpLau7hpx6M5GdGfOoUR2x/3DzA0TSAAQ9tcxR258P7eI3Vy3DT19teP5xSHT//oGCAWIWsO9w0/RyNvbRXib9QV9ZupExldVTHOj1zKuZhEq2D0F5l2hE22Xw49ETsH+IkM/6wJr/9ZjDaFa1Nxx9JStPzYEWXvjWlzcSvhUqKQPBFzTucfIxp6h8sLPZKCTebd4a3Vd7STtM97EWR/Jp/hJSKtF2Y8whvI6w0TpI/IffuSpInZGVWFR9+oKl8QZS7BkDU1UjAVsp9q7WaeItaPqJJ9/zxaLtCI9RE9zxnjmrR6a1iUee8WjGIK0TCSbAIevOnvh7G/nGqH2DjBOGOUZpTQGUyxaCIpup+XlcaSnmv0uwgR7WZ+sxe12PFp99ozSrAjl+eyv0eE65TW93mPmtlofmEzPPqolhPs/KFx8Fhekhxd/fAOCUqjioQXdB+qqQEbYbdcwN0t1ogcXx/8feD5A2HY5TCYY+otzT1TdU2XFhEugyg+FkWh5EECBEO0p7+tqL0zjshSw/xY59yf980MRHKOA9xQqPheZgwLR0ZFsbIcQFejjUxVzHzfEUTn/3BcVMA11qKhwjBd0dkRBgMpZgSFzz6VdNg44LXQ2GOEBtfoGL66IZXa+bvIOpmYqOOsmJpGJDG6PoZJoVmR4NQ6tQnxZJe0FQeUAWkNthqDQIEmF/n7qa1lzD/fkZtolviedr5ilayWviny9u6n1WAg0HYd0NdBYz8h+oYC7UN6tI3nyDgSoiv3RB60xh/El6+Z+C8UVzg3MwoHXWZTqeoElvrrJ9fFNQmdKfGKhSl X-Forefront-Antispam-Report: CIP:216.228.117.160;CTRY:US;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:mail.nvidia.com;PTR:dc6edge1.nvidia.com;CAT:NONE;SFS:(13230028)(4636009)(376002)(346002)(136003)(396003)(39860400002)(451199021)(46966006)(36840700001)(40470700004)(186003)(8676002)(8936002)(7696005)(54906003)(478600001)(19627235002)(84970400001)(5660300002)(316002)(41300700001)(26005)(1076003)(70206006)(6916009)(70586007)(4326008)(2616005)(40480700001)(83380400001)(40460700003)(2906002)(426003)(336012)(47076005)(82740400003)(7636003)(356005)(36860700001)(86362001)(82310400005)(36756003);DIR:OUT;SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 12 Jun 2023 15:15:41.8575 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 88fd96db-672e-411c-1ae7-08db6b57e321 X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=43083d15-7273-40c1-b7db-39efd9ccc17a;Ip=[216.228.117.160];Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: MWH0EPF000989EC.namprd02.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH8PR12MB8432 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain - Run /BaseTools/Scripts/PatchCheck.py to check changes on pull request. - Create main.yml to handle push check on main branch. And show the status of RedfishClientPkg on README.md Signed-off-by: Nickle Wang Cc: Abner Chang Cc: Igor Kulchytskyy --- .github/workflows/build.yml | 3 -- .github/workflows/main.yml | 58 +++++++++++++++++++++++++++++++ .github/workflows/patch-check.sh | 47 +++++++++++++++++++++++++ .github/workflows/patch-check.yml | 39 +++++++++++++++++++++ README.md | 3 ++ 5 files changed, 147 insertions(+), 3 deletions(-) create mode 100644 .github/workflows/main.yml create mode 100755 .github/workflows/patch-check.sh create mode 100644 .github/workflows/patch-check.yml diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index f44184b3..e5a61992 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -7,9 +7,6 @@ ## name: "RedfishClientPkg Build" on: - push: - branches: - - main pull_request: branches: - main diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml new file mode 100644 index 00000000..4bfd5e8f --- /dev/null +++ b/.github/workflows/main.yml @@ -0,0 +1,58 @@ +# @file +# GitHub Workflow for build checks +# +# Copyright (c) 2023, NVIDIA CORPORATION & AFFILIATES. All rights reserved= . +# +# SPDX-License-Identifier: BSD-2-Clause-Patent +## +name: "RedfishClientPkg Build" +on: + push: + branches: + - main + paths-ignore: + - '**/*.bat' + - '**/*.md' + - '**/*.py' + - '**/*.rst' + - '**/*.sh' + - '**/*.txt' + +jobs: + edk2-redfish-client-build: + strategy: + fail-fast: false + matrix: + include: + - Target: "DEBUG" + ArchList: "X64" + ToolChain: "GCC5" + - Target: "RELEASE" + ArchList: "X64" + ToolChain: "GCC5" + - Target: "NOOPT" + ArchList: "X64" + ToolChain: "GCC5" + runs-on: ubuntu-latest + container: + image: ghcr.io/tianocore/containers/ubuntu-22-dev:latest + options: --user root -v ${{ github.workspace }}:/home/edk2 + env: + EDK2_DOCKER_USER_HOME: "/home/edk2" + name: edk2 build test + steps: + - name: checkout edk2 + uses: actions/checkout@v3 + with: + repository: tianocore/edk2 + path: ./edk2 + submodules: recursive + - name: checkout edk2-redfish-client + uses: actions/checkout@v3 + with: + path: ./edk2-redfish-client + - name: edk2 build + run: | + ./edk2-redfish-client/.github/workflows/build.sh ./edk2 ./edk2-r= edfish-client ${{ matrix.ArchList }} ${{ matrix.Target }} ${{ matrix.ToolCh= ain }} + shell: bash + diff --git a/.github/workflows/patch-check.sh b/.github/workflows/patch-che= ck.sh new file mode 100755 index 00000000..8cc63bd5 --- /dev/null +++ b/.github/workflows/patch-check.sh @@ -0,0 +1,47 @@ +#!/bin/bash +# +# Copyright (c) 2023, NVIDIA CORPORATION & AFFILIATES. All rights reserved= . +# +# SPDX-License-Identifier: BSD-2-Clause-Patent +# + + +if [ $# -ne 2 ] +then + echo "usage: $0 [PATH to PATCH-SET] [PATH to EDK2 REPO.]" + exit 1 +fi + +PATCH_FOLDER=3D"$PWD/$1" +REPO_PATH=3D"$PWD/$2" +FAILURE=3D0 + +if [ ! -e "$PATCH_FOLDER" ] +then + echo "$PATCH_FOLDER does not exist" + exit 1 +fi + +if [ ! -e "$REPO_PATH" ] +then + echo "$REPO_PATH does not exist" + exit 1 +fi + +for file in `ls $PATCH_FOLDER/*.patch` +do + echo "Check patch: $file" + python3 $REPO_PATH/BaseTools/Scripts/PatchCheck.py $file + if [ $? -ne 0 ] + then + echo "Patch check failure on file: $file" + FAILURE=3D1 + fi +done + +if [ $FAILURE -eq 0 ] +then + exit 0 +fi + +exit 1 diff --git a/.github/workflows/patch-check.yml b/.github/workflows/patch-ch= eck.yml new file mode 100644 index 00000000..2fdef679 --- /dev/null +++ b/.github/workflows/patch-check.yml @@ -0,0 +1,39 @@ +# @file +# GitHub Workflow for patch check +# +# Copyright (c) 2023, NVIDIA CORPORATION & AFFILIATES. All rights reserved= . +# +# SPDX-License-Identifier: BSD-2-Clause-Patent +## +name: "Patch check" +on: + pull_request: + branches: + - main + +jobs: + patch-check: + runs-on: ubuntu-latest + name: EDK2 Patch check + steps: + - name: checkout edk2 + uses: actions/checkout@v3 + with: + repository: tianocore/edk2 + path: ./edk2 + - name: checkout edk2-redfish-client + uses: actions/checkout@v3 + with: + path: ./edk2-redfish-client + ref: ${{ github.event.pull_request.head.sha }} + fetch-depth: 0 + - name: generate format patch + run: | + mkdir format-patch + cd edk2-redfish-client + git format-patch --subject-prefix=3D"edk2-redfish-client][PATCH"= -${{ github.event.pull_request.commits }} HEAD -O ../edk2/BaseTools/Conf/d= iff.order -o ../format-patch/ + ls ../format-patch/ + - name: run PatchCheck.py + run: | + ./edk2-redfish-client/.github/workflows/patch-check.sh ./format-= patch/ ./edk2/ + shell: bash diff --git a/README.md b/README.md index 478f319b..0babe593 100644 --- a/README.md +++ b/README.md @@ -5,6 +5,9 @@ and provides the functionality to support Redfish service h= osted by Board Manage Please check [Readme.md](https://github.com/tianocore/edk2/blob/master/Red= fishPkg/Readme.md) for the design of UEFI Redfish EDK2 implementation. =20 +# Status +[![RedfishClientPkg Build](https://github.com/tianocore/edk2-redfish-clien= t/actions/workflows/main.yml/badge.svg)](https://github.com/tianocore/edk2-= redfish-client/actions/workflows/main.yml) + # License The majority of the content in the EDK Redfish Client open source project = uses a [BSD-2-Clause Plus Patent License](LICENSE). The EDKII Redfish client open= source project contains the following --=20 2.17.1