Skip to content

Update llpc from commit f07302bd #8871

Update llpc from commit f07302bd

Update llpc from commit f07302bd #8871

name: LLPC Docker CI
on:
push:
branches:
- '*'
- '!master'
pull_request:
jobs:
build-and-test:
name: "Features: ${{ matrix.feature-set }}"
runs-on: ${{ matrix.host-os }}
strategy:
fail-fast: false
matrix:
host-os: ["ubuntu-22.04"]
image-template: ["amdvlkadmin/amdvlk_%s%s:nightly"]
config: [Release]
feature-set: ["+gcc", "+gcc+assertions",
"+clang",
"+clang+ubsan+asan",
"+clang+ubsan+asan+assertions"]
steps:
- name: Free up disk space
if: contains(matrix.feature-set, '+ubsan') || contains(matrix.feature-set, '+asan') || contains(matrix.feature-set, '+tsan') || contains(matrix.feature-set, '+coverage')
run: |
echo 'Before:' && df -h
sudo rm -rf /usr/share/dotnet /usr/local/lib/android /opt/hostedtoolcache/boost /opt/ghc \
/usr/lib/jvm /opt/hostedtoolcache/go /opt/hostedtoolcache/CodeQL /opt/az \
/usr/share/swift /usr/local/.ghcup /usr/local/graalvm /usr/local/lib/node_modules
echo 'After:' && df -h
- name: Checkout LLPC
run: |
git clone https://github.com/${GITHUB_REPOSITORY}.git .
git fetch origin +${GITHUB_SHA}:${GITHUB_REF} --update-head-ok
git checkout ${GITHUB_SHA}
- name: Generate Docker base image tag string
run: |
CONFIG_LOWER=$(echo "${{ matrix.config }}" | tr "[:upper:]" "[:lower:]")
FEATURES_LOWER=$(echo "${{ matrix.feature-set }}" | tr "+" "_")
TAG=$(printf "${{ matrix.image-template }}" "$CONFIG_LOWER" "$FEATURES_LOWER")
echo "IMAGE_TAG=$TAG" | tee -a $GITHUB_ENV
CONFIG_TAG=$(printf "%s%s" "$CONFIG_LOWER" "$FEATURES_LOWER")
echo "CONFIG_TAG=$CONFIG_TAG" | tee -a $GITHUB_ENV
- name: Fetch the latest prebuilt AMDVLK
run: docker pull "$IMAGE_TAG"
- name: Build and Test with Docker
run: docker build . --file docker/llpc.Dockerfile
--build-arg AMDVLK_IMAGE="$IMAGE_TAG"
--build-arg LLPC_REPO_NAME="${GITHUB_REPOSITORY}"
--build-arg LLPC_REPO_REF="${GITHUB_REF}"
--build-arg LLPC_REPO_SHA="${GITHUB_SHA}"
--build-arg FEATURES="${{ matrix.feature-set }}"
--tag llpc/ci-shaderdb
- name: Copy code coverage report to host and save PR number
if: contains(matrix.feature-set, '+coverage') && github.event.pull_request.number
run: |
docker run -v "$HOME:/host" llpc/ci-shaderdb 'bash' '-c' 'cp -r /vulkandriver/coverage_report /host/'
sudo chown -R runner $HOME/coverage_report
echo "COVERAGE_REPORT_FILES=$HOME/coverage_report/*" | tee -a $GITHUB_ENV
echo "${{ github.event.pull_request.number }}" > pr_num.txt
- name: Upload code coverage report as a GitHub artifact
if: contains(matrix.feature-set, '+coverage') && github.event.pull_request.number
uses: actions/upload-artifact@v2
with:
name: cov_report_${{ env.CONFIG_TAG }}
path: ${{ env.COVERAGE_REPORT_FILES }}
- name: Upload the PR number as a GitHub artifact
if: contains(matrix.feature-set, '+coverage') && github.event.pull_request.number
uses: actions/upload-artifact@v2
with:
name: pr_num
path: pr_num.txt