This repository has been archived by the owner on Jan 8, 2024. It is now read-only.
forked from GPUOpen-Drivers/llpc
-
Notifications
You must be signed in to change notification settings - Fork 2
62 lines (60 loc) · 2.52 KB
/
build-amdvlk-docker.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
name: Build AMDVLK for LLPC
on:
schedule:
- cron: "0 */12 * * *"
workflow_dispatch:
jobs:
build-and-push-amdvlk:
name: "Features: ${{ matrix.feature-set }}, assertions: ${{ matrix.assertions }}"
if: github.repository == 'GPUOpen-Drivers/llpc'
runs-on: ${{ matrix.host-os }}
strategy:
fail-fast: false
matrix:
host-os: ["ubuntu-20.04"]
image-template: ["gcr.io/stadia-open-source/amdvlk_%s%s_%s:nightly"]
branch: [dev]
config: [Release]
assertions: ["OFF", "ON"]
feature-set: ["+gcc", "+clang", "+clang+shadercache", "+clang+sanitizers"]
generator: [Ninja]
steps:
- name: Free up disk space
if: contains(matrix.feature-set, '+sanitizers')
run: |
echo 'Before:' && df -h
sudo rm -rf /usr/share/dotnet /usr/local/lib/android /opt/hostedtoolcache/boost /opt/ghc
echo 'After:' && df -h
- name: Checkout LLPC
run: |
git clone https://github.com/${GITHUB_REPOSITORY}.git .
git checkout ${GITHUB_SHA}
- name: Setup Google Cloud SDK
uses: google-github-actions/setup-gcloud@master
with:
version: '290.0.1'
service_account_email: ${{ secrets.GCR_USER }}
service_account_key: ${{ secrets.GCR_KEY }}
export_default_credentials: true
- name: Setup Docker to use the GCR
run: |
gcloud auth configure-docker
- name: Generate Docker image tag string
run: |
CONFIG_LOWER=$(echo "${{ matrix.config }}" | tr "[:upper:]" "[:lower:]")
FEATURES_LOWER=$(echo "${{ matrix.feature-set }}" | tr "+" "_")
ASSERTS_LOWER=$(echo "${{ matrix.assertions }}" | tr "[:upper:]" "[:lower:]")
TAG=$(printf "${{ matrix.image-template }}" "$CONFIG_LOWER" "$FEATURES_LOWER" "$ASSERTS_LOWER")
echo "IMAGE_TAG=$TAG" | tee -a $GITHUB_ENV
- name: Build and Test AMDVLK with Docker
run: |
docker build . --file docker/amdvlk.Dockerfile \
--build-arg BRANCH="${{ matrix.branch }}" \
--build-arg CONFIG="${{ matrix.config }}" \
--build-arg ASSERTIONS="${{ matrix.assertions }}" \
--build-arg FEATURES="${{ matrix.feature-set }}" \
--build-arg GENERATOR="${{ matrix.generator }}" \
--tag "$IMAGE_TAG"
- name: Push the new image
run: |
docker push "$IMAGE_TAG"