From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail05.groups.io (mail05.groups.io [45.79.224.7]) by spool.mail.gandi.net (Postfix) with ESMTPS id 46D02941A9B for ; Mon, 1 Jul 2024 16:13:40 +0000 (UTC) DKIM-Signature: a=rsa-sha256; bh=a2v8Z4JRnG3z07XYhHzZ00KnpbV3QzEpgMxKHQynnLs=; c=relaxed/simple; d=groups.io; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References:MIME-Version:Precedence:List-Subscribe:List-Help:Sender:List-Id:Mailing-List:Delivered-To:Resent-Date:Resent-From:Reply-To:List-Unsubscribe-Post:List-Unsubscribe:Content-Transfer-Encoding; s=20240206; t=1719850420; v=1; b=PvTtGlfujJU2ureGwr/hk9YqvmxfWpOsk9gOi8SKEeSpmWs2QEwg/sFspwf3JRie9/GSusNy MfNZd1ytxFsRrGPAjgA2mRTA6hT3eL1D1/NtC3x5LBD2mfl47FiXyiacG2stY+AEAya3J/Ff9DA 2lFKxjGanavvtMf3sFyS20LOUtOEVJul0Ulo62tY5bfWmObvSp64H3MLDa9iaet7hIdbjJ2+DDA nWw+00ii1rGxl7sZQr9otgAJ50sLt6ObF0UZLR5uy22re6P46Hzjltj8R8XEH4lvqOo45/gajbd m+SQFWqcWI8JTyGCQTCiAJ1VA73mrNmAi8MrO0CEyxwhw== X-Received: by 127.0.0.2 with SMTP id FF5aYY7687511x1fpmqjAIeo; Mon, 01 Jul 2024 09:13:38 -0700 X-Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.13]) by mx.groups.io with SMTP id smtpd.web10.927.1719850415924923868 for ; Mon, 01 Jul 2024 09:13:38 -0700 X-CSE-ConnectionGUID: xvXeGH6uSfe04iZjPmUtLQ== X-CSE-MsgGUID: kawmTjP3QieFDVFDnYDmhg== X-IronPort-AV: E=McAfee;i="6700,10204,11120"; a="28118053" X-IronPort-AV: E=Sophos;i="6.09,176,1716274800"; d="scan'208";a="28118053" X-Received: from orviesa009.jf.intel.com ([10.64.159.149]) by orvoesa105.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 01 Jul 2024 09:13:38 -0700 X-CSE-ConnectionGUID: 5jyhAWA5TmaAP9F30Mi84A== X-CSE-MsgGUID: C/uQzz5VS9iAaD9UFgpB6A== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.09,176,1716274800"; d="scan'208";a="45701062" X-Received: from njayapra-mobl.gar.corp.intel.com ([10.247.207.132]) by orviesa009-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 01 Jul 2024 09:13:36 -0700 From: "Jayaprakash, N" To: devel@edk2.groups.io Cc: Jayaprakash N , Rebecca Cran , Michael D Kinney Subject: [edk2-devel] [edk2-libc Patch v2 1/1] edk2-libc : add github actions workflow to build PyUEFI using gcc Date: Mon, 1 Jul 2024 21:40:46 +0530 Message-ID: <20240701161327.2168-2-n.jayaprakash@intel.com> In-Reply-To: <20240701161327.2168-1-n.jayaprakash@intel.com> References: <20240701161327.2168-1-n.jayaprakash@intel.com> MIME-Version: 1.0 Precedence: Bulk List-Subscribe: List-Help: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Resent-Date: Mon, 01 Jul 2024 09:13:38 -0700 Resent-From: n.jayaprakash@intel.com Reply-To: devel@edk2.groups.io,n.jayaprakash@intel.com List-Unsubscribe-Post: List-Unsubscribe=One-Click List-Unsubscribe: X-Gm-Message-State: BUlt25k5PEujQqOnE3QPHc3Wx7686176AA= Content-Transfer-Encoding: 8bit X-GND-Status: LEGIT Authentication-Results: spool.mail.gandi.net; dkim=pass header.d=groups.io header.s=20240206 header.b=PvTtGlfu; dmarc=fail reason="SPF not aligned (relaxed), DKIM not aligned (relaxed)" header.from=intel.com (policy=none); spf=pass (spool.mail.gandi.net: domain of bounce@groups.io designates 45.79.224.7 as permitted sender) smtp.mailfrom=bounce@groups.io REF: https://bugzilla.tianocore.org/show_bug.cgi?id=4794 This commit adds github actions workflow to build python uefi interpreter with gcc tool chain on Ubuntu Linux system. The build-python-uefi-gcc.yaml file under .github/workflows implements the build action for building the pyuefi interpreter with gcc tool chain. Cc: Rebecca Cran Cc: Michael D Kinney Cc: Jayaprakash N Signed-off-by: Jayaprakash N --- .github/workflows/build-python-uefi-gcc.yaml | 69 +++++++++++++++++++ .../Python/Python-3.6.8/create_python_pkg.sh | 40 +++++------ 2 files changed, 89 insertions(+), 20 deletions(-) create mode 100644 .github/workflows/build-python-uefi-gcc.yaml diff --git a/.github/workflows/build-python-uefi-gcc.yaml b/.github/workflows/build-python-uefi-gcc.yaml new file mode 100644 index 0000000..f25fb02 --- /dev/null +++ b/.github/workflows/build-python-uefi-gcc.yaml @@ -0,0 +1,69 @@ +# GitHub actions workflow to build python uefi using gcc +# +# Copyright (c) 2023-2024, Intel Corporation. All rights reserved. +# SPDX-License-Identifier: BSD-2-Clause-Patent +# + +name: Build Python Interpreter for UEFI with GCC + +on: [push, pull_request] + +jobs: + build: + runs-on: ubuntu-latest + + steps: + - name: Checkout repository + uses: actions/checkout@v4 + + - name: Setup Python + uses: actions/setup-python@v5 + with: + python-version: '3.x' + + - name: Install dependencies + run: | + sudo apt-get update + sudo apt-get install -y build-essential uuid-dev iasl git nasm python3-distutils + + - name: Clone EDK2 + run: | + git clone https://github.com/tianocore/edk2.git + cd edk2 + git submodule update --init + + - name: Build EDK2 Base Tools + run: | + cd edk2 + . edksetup.sh + make -C BaseTools + + - name: Run srcprep.py + run: | + cd AppPkg/Applications/Python/Python-3.6.8/ + python3 srcprep.py + + - name: Build Python UEFI + run: | + export PACKAGES_PATH=`pwd`/edk2:`pwd`: + export EDK2_LIBC_PATH=`pwd` + cd edk2 + . edksetup.sh + build -t GCC5 -a X64 -b RELEASE -p $EDK2_LIBC_PATH/AppPkg/AppPkg.dsc -D BUILD_PYTHON368 + + - name: Create PyUEFI package + run: | + export WORKSPACE=`pwd`/edk2 + echo WORKSPACE is $WORKSPACE + export EDK2_LIBC_PATH=`pwd` + . AppPkg/Applications/Python/Python-3.6.8/create_python_pkg.sh GCC5 RELEASE X64 myUEFIPy + + - name: List build artifacts + run: | + ls -R edk2/myUEFIPy + + - name: Upload build output as artifact + uses: actions/upload-artifact@v4 + with: + name: myUEFIPy-build-gcc-output + path: edk2/myUEFIPy/**/* diff --git a/AppPkg/Applications/Python/Python-3.6.8/create_python_pkg.sh b/AppPkg/Applications/Python/Python-3.6.8/create_python_pkg.sh index c10ba03..323d846 100644 --- a/AppPkg/Applications/Python/Python-3.6.8/create_python_pkg.sh +++ b/AppPkg/Applications/Python/Python-3.6.8/create_python_pkg.sh @@ -59,24 +59,24 @@ then exit fi -echo current working directory `pwd` -echo changing working directory to $WORKSPACE -cd $WORKSPACE -ls - -# check if the EDK2_LIBC_PATH environment variable set or not -if [ -z $EDK2_LIBC_PATH ] -then - echo Warning: EDK2_LIBC_PATH environment variable is not set - echo It should be set to edk2-libc folder path. - echo. - echo Assuming that edk2-libc contents are copied to edk2 folder - echo at compilation time, setting this variable to edk2 path. - export EDK2_LIBC_PATH=$WORKSPACE -fi - -echo edk2 libc path $EDK2_LIBC_PATH - +echo current working directory `pwd` +echo changing working directory to $WORKSPACE +cd $WORKSPACE +ls + +# check if the EDK2_LIBC_PATH environment variable set or not +if [ -z $EDK2_LIBC_PATH ] +then + echo Warning: EDK2_LIBC_PATH environment variable is not set + echo It should be set to edk2-libc folder path. + echo. + echo Assuming that edk2-libc contents are copied to edk2 folder + echo at compilation time, setting this variable to edk2 path. + export EDK2_LIBC_PATH=$WORKSPACE +fi + +echo edk2 libc path $EDK2_LIBC_PATH + PYTHON_BIN="Build/AppPkg/$TARGET"_"$TOOL_CHAIN_TAG/$ARCH/Python.efi" if [ ! -f $PYTHON_BIN ] then @@ -103,8 +103,8 @@ then mkdir -p $OUT_FOLDER/EFI/StdLib/etc fi -cp -rf $EDK2_LIBC_PATH/AppPkg/Applications/Python/Python-3.6.8/Lib/* $OUT_FOLDER/EFI/StdLib/lib/python36.8/ -cp -rf $EDK2_LIBC_PATH/StdLib/Efi/StdLib/etc/* $OUT_FOLDER/EFI/StdLib/etc/ +cp -rf $EDK2_LIBC_PATH/AppPkg/Applications/Python/Python-3.6.8/Lib/* $OUT_FOLDER/EFI/StdLib/lib/python36.8/ +cp -rf $EDK2_LIBC_PATH/StdLib/Efi/StdLib/etc/* $OUT_FOLDER/EFI/StdLib/etc/ if [ ${OUT_FOLDER:0:1} == "/" ] then -- 2.45.1.windows.1 -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#119743): https://edk2.groups.io/g/devel/message/119743 Mute This Topic: https://groups.io/mt/106982478/7686176 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io] -=-=-=-=-=-=-=-=-=-=-=-