mirror of
https://github.com/intel/intel-graphics-compiler.git
synced 2025-10-30 08:18:26 +08:00
Enable run public Github Action on PR
Enable run public Github Action on PR
This commit is contained in:
32
.github/workflows/build-IGC.yml
vendored
32
.github/workflows/build-IGC.yml
vendored
@ -11,6 +11,8 @@ name: Build IGC
|
||||
on:
|
||||
push:
|
||||
branches: [ master ]
|
||||
pull_request:
|
||||
branches: [ master ]
|
||||
|
||||
jobs:
|
||||
download-OpenCL-Clang: # openCL Clang is downloaded from intel/intel-graphics-compiler releases
|
||||
@ -157,25 +159,49 @@ jobs:
|
||||
key: ${{ steps.SPIRV-LLVM-Translator-hash.outputs.spirv_translator_sha_short }}-ubuntu${{ matrix.ubuntu_version }}-llvm${{ matrix.llvm_ver }}
|
||||
|
||||
#Build IGC
|
||||
- name: Checkout IGC sources
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
path: workspace/igc
|
||||
- name: Checkout vc-intrinsics sources
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
repository: intel/vc-intrinsics
|
||||
ref: master
|
||||
path: workspace/vc-intrinsics
|
||||
- name: Checkout SPIRV-Headers sources
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
repository: KhronosGroup/SPIRV-Headers
|
||||
ref: master
|
||||
path: workspace/SPIRV-Headers
|
||||
- name: Checkout the SPIRV-Headers
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
repository: KhronosGroup/SPIRV-Tools
|
||||
ref: master
|
||||
path: workspace/SPIRV-Tools
|
||||
- name: get short hash
|
||||
id: igc-current-short-Hash
|
||||
run: echo "::set-output name=sha_short::${GITHUB_SHA::7}"
|
||||
- name: run Docker
|
||||
run: |
|
||||
docker run --name=buildigc \
|
||||
-v $(pwd)/scripts/buildIGC.sh:/buildIGC.sh \
|
||||
-v $(pwd)/igc-official-release:/igc-official-release \
|
||||
-v $(pwd)/build-SPIRV-LLVM-Translator:/build-SPIRV-LLVM-Translator \
|
||||
-v $(pwd)/workspace:/workspace \
|
||||
--env DEBIAN_FRONTEND="noninteractive" \
|
||||
--env UBUNTU_VERSION=${{ matrix.ubuntu_version }} \
|
||||
--env LLVM_VERSION=${{ matrix.llvm_ver }} \
|
||||
--env COMPILER=${{ matrix.compiler }} \
|
||||
--env IGC_SHA=${{ steps.igc-current-short-Hash.outputs.sha_short }} \
|
||||
ubuntu:${{ matrix.ubuntu_version }} \
|
||||
sh /buildIGC.sh
|
||||
- name: creating folder to store output artifacts
|
||||
run: mkdir Artifacts
|
||||
- name: copying artifact from docker to github host
|
||||
run: sudo docker cp buildigc:/workspace/igc/build/DEB-FILES ./Artifacts
|
||||
- name: get short hash
|
||||
id: igc-current-short-Hash
|
||||
run: echo "::set-output name=sha_short::${GITHUB_SHA::7}"
|
||||
- uses: actions/upload-artifact@v2
|
||||
continue-on-error: true
|
||||
with:
|
||||
|
||||
@ -41,7 +41,12 @@ if [ -z ${OWN_CMAKE_FLAGS+x} ]; then
|
||||
else
|
||||
echo "[Build Status] OWN_CMAKE_FLAGS = ${OWN_CMAKE_FLAGS}"
|
||||
fi
|
||||
|
||||
if [ -z ${IGC_SHA+x} ]; then
|
||||
echo "[Build Status] IGC_SHA is unset, use default master";
|
||||
OWN_CMAKE_FLAGS="master"
|
||||
else
|
||||
echo "[Build Status] IGC_SHA = ${IGC_SHA}"
|
||||
fi
|
||||
|
||||
apt-get update
|
||||
apt-get install -y flex bison libz-dev cmake curl wget build-essential git software-properties-common unzip file
|
||||
@ -78,18 +83,11 @@ dpkg -i ./build-SPIRV-LLVM-Translator/*.deb
|
||||
mv /usr/lib/libLLVMSPIRVLib.a /usr/local/lib/libLLVMSPIRVLib.a # WA Cpack wrongly pack deb file
|
||||
echo "[Build Status] SPIRV-LLVM-Translator INSTALLED"
|
||||
|
||||
mkdir workspace
|
||||
cd workspace
|
||||
|
||||
/usr/bin/git version
|
||||
/usr/bin/git clone https://github.com/intel/intel-graphics-compiler ./igc
|
||||
cd igc
|
||||
/usr/bin/git config --global --add safe.directory /workspace/igc
|
||||
cd workspace/igc
|
||||
echo "[Build Status] IGC commit hash below:"
|
||||
/usr/bin/git log -1 --format='%H'
|
||||
/usr/bin/git clone https://github.com/intel/vc-intrinsics ../vc-intrinsics
|
||||
/usr/bin/git clone https://github.com/KhronosGroup/SPIRV-Headers.git ../SPIRV-Headers
|
||||
/usr/bin/git clone https://github.com/KhronosGroup/SPIRV-Tools.git ../SPIRV-Tools
|
||||
echo "[Build Status] All necessary repository CLONED"
|
||||
echo "[Build Status] All necessary repository Ready"
|
||||
|
||||
CONFIG_VARS="-DIGC_OPTION__LLVM_MODE=Prebuilds -DIGC_OPTION__LLVM_PREFERRED_VERSION=$LLVM_VERSION_PREFERRED"
|
||||
case $COMPILER in
|
||||
|
||||
Reference in New Issue
Block a user