.github/workflows: Use efibuild.sh instead of stuart pytools for CodeQL

Signed-off-by: Savva Mitrofanov <savvamtr@gmail.com>
This commit is contained in:
Savva Mitrofanov 2023-01-18 15:55:37 +06:00
parent 58f816c0db
commit 763413cc8c
No known key found for this signature in database
GPG Key ID: 774924031750BF64

View File

@ -27,10 +27,17 @@ on:
# https://crontab.guru/#20_23_*_*_4
- cron: '20 23 * * 4'
env:
PROJECT_TYPE: UEFI
FORCE_INSTALL: 1
WERROR: 1
jobs:
analyze:
name: Analyze
runs-on: windows-2019
env:
CC: gcc
permissions:
actions: read
contents: read
@ -40,59 +47,71 @@ jobs:
fail-fast: false
matrix:
package: [
"ArmPkg",
"CryptoPkg",
"DynamicTablesPkg",
"FatPkg",
"FmpDevicePkg",
"IntelFsp2Pkg",
"IntelFsp2WrapperPkg",
"MdeModulePkg",
"MdePkg",
"PcAtChipsetPkg",
"PrmPkg",
"SecurityPkg",
"ShellPkg",
"SourceLevelDebugPkg",
"StandaloneMmPkg",
"UefiCpuPkg",
"UnitTestFrameworkPkg"]
{name: "Ext4Pkg", selfpkg_dir: "Ext4Pkg", archs: "(IA32 X64)", archs_ext: ""},
{name: "FatPkg", selfpkg_dir: "FatPkg", archs: "(IA32 X64)", archs_ext: ""},
{name: "IntelFsp2Pkg", selfpkg_dir: "IntelFsp2Pkg", archs: "(IA32 X64)", archs_ext: ""},
{name: "IntelFsp2WrapperPkg", selfpkg_dir: "IntelFsp2WrapperPkg", archs: "(IA32 X64)", archs_ext: ""},
{name: "MdeModulePkg", selfpkg_dir: "MdeModulePkg", archs: "(IA32 X64)", archs_ext: ""},
{name: "MdePkg", selfpkg_dir: "MdePkg", archs: "(IA32 X64)", archs_ext: ""},
{name: "UefiCpuPkg", selfpkg_dir: "UefiCpuPkg", archs: "(IA32 X64)", archs_ext: ""},
{name: "UnitTestFrameworkPkg", selfpkg_dir: "UnitTestFrameworkPkg", archs: "(IA32 X64)", archs_ext: ""},
{name: "OvmfPkgIa32", selfpkg_dir: "OvmfPkg", archs: "(IA32)", archs_ext: ""},
{name: "OvmfPkgX64", selfpkg_dir: "OvmfPkg", archs: "(X64)", archs_ext: ""},
{name: "OvmfPkgIa32X64", selfpkg_dir: "OvmfPkg", archs: "(X64)", archs_ext: "IA32"},
{name: "UefiPayloadPkg", selfpkg_dir: "UefiPayloadPkg", archs: "(X64)", archs_ext: ""},
{name: "UefiPayloadPkg", selfpkg_dir: "UefiPayloadPkg", archs: "(X64)", archs_ext: "IA32"},
{name: "NetworkPkg", selfpkg_dir: "NetworkPkg", archs: "(IA32 X64)", archs_ext: ""},
]
defaults:
run:
shell: bash
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Checkout repository
uses: actions/checkout@v3
- name: Install Python
uses: actions/setup-python@v4
with:
python-version: '3.10.6'
- name: Install Python
uses: actions/setup-python@v4
with:
python-version: '3.10.6'
# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v2
with:
languages: 'cpp'
# CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python', 'ruby' ]
# Learn more about CodeQL language support at https://codeql.github.com/docs/codeql-overview/supported-languages-and-frameworks/
config-file: ./.github/codeql/codeql-config.yml
# Note: Add new queries to codeql-config.yml file as they are enabled.
# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v2
with:
languages: 'cpp'
# CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python', 'ruby' ]
# Learn more about CodeQL language support at https://codeql.github.com/docs/codeql-overview/supported-languages-and-frameworks/
config-file: ./.github/codeql/codeql-config.yml
# Note: Add new queries to codeql-config.yml file as they are enabled.
- name: Install/Upgrade pip Modules
run: pip install -r pip-requirements.txt --upgrade
- name: Install Dependencies
run: |
choco install make nasm zip --no-progress
choco install iasl --no-progress --version=2017.11.10
- name: Setup
run: stuart_setup -c .pytool/CISettings.py -t DEBUG -a IA32,X64 TOOL_CHAIN_TAG=VS2019
- name: CI Bootstrap
run: |
src=$(curl -Lfs https://raw.githubusercontent.com/acidanthera/ocbuild/master/ci-bootstrap.sh) && eval "$src" || exit 1
- name: Update
run: stuart_update -c .pytool/CISettings.py -t DEBUG -a IA32,X64 TOOL_CHAIN_TAG=VS2019
- name: Init UDK submodules
run: |
git submodule update --init --recursive
touch UDK.ready
- name: Build Tools From Source
run: python BaseTools/Edk2ToolsBuild.py -t VS2019
- name: Prepare efibuild.sh
run: |
curl -o ./efibuild.sh https://raw.githubusercontent.com/acidanthera/ocbuild/master/efibuild.sh || exit 1
chmod +x ./efibuild.sh
cmd <<< "mklink /D .\\UDK .\\" > /dev/null
- name: CI Build
run: stuart_ci_build -c .pytool/CISettings.py -p ${{ matrix.package }} -t DEBUG -a IA32,X64 TOOL_CHAIN_TAG=VS2019
env:
PYTOOL_TEMPORARILY_IGNORE_NESTED_EDK_PACKAGES: true
- name: Build package
run: export ARCHS=${{ matrix.package.archs }}; . ./efibuild.sh
env:
TARGETS: DEBUG
TOOLCHAINS: VS2019
SELFPKG: ${{ matrix.package.name }}
SELFPKG_DIR: ${{ matrix.package.selfpkg_dir }}
ARCHS_EXT: ${{ matrix.package.archs_ext }}
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v2
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v2