forked from GPUOpen-Drivers/llpc
-
Notifications
You must be signed in to change notification settings - Fork 0
65 lines (63 loc) · 2.65 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
63
64
65
name: Build AMDVLK for LLPC
on:
schedule:
- cron: "0 */12 * * *"
workflow_dispatch:
jobs:
build-and-push-amdvlk:
name: "Features: ${{ matrix.feature-set }}"
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:nightly"]
branch: [dev]
config: [Release]
feature-set: ["+gcc", "+gcc+assertions",
"+clang", "+clang+coverage",
"+clang+shadercache+coverage+assertions",
"+clang+shadercache+ubsan+asan",
"+clang+shadercache+ubsan+asan+assertions",
"+clang+shadercache+tsan"]
generator: [Ninja]
steps:
- name: Free up disk space
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 checkout ${GITHUB_SHA}
- name: Authenticate with Google Cloud
id: 'auth'
uses: 'google-github-actions/auth@v0'
with:
credentials_json: '${{ secrets.GCR_KEY }}'
- name: Setup Google Cloud SDK
uses: google-github-actions/setup-gcloud@v0
- 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 "+" "_")
TAG=$(printf "${{ matrix.image-template }}" "$CONFIG_LOWER" "$FEATURES_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 FEATURES="${{ matrix.feature-set }}" \
--build-arg GENERATOR="${{ matrix.generator }}" \
--tag "$IMAGE_TAG"
- name: Push the new image
run: |
docker push "$IMAGE_TAG"