-
Notifications
You must be signed in to change notification settings - Fork 70
42 lines (40 loc) · 1.58 KB
/
check-xgl-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
name: Check XGL
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-20.04"]
image-template: ["amdvlk_%s%s:nightly"]
config: [Release]
feature-set: ["+gcc", "+gcc+assertions",
"+clang"]
steps:
- name: Checkout XGL
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
- name: Fetch the latest prebuilt AMDVLK
run: docker pull "amdvlkadmin/$IMAGE_TAG"
- name: Build and Test with Docker
run: docker build . --file docker/check_xgl.Dockerfile
--build-arg AMDVLK_IMAGE="amdvlkadmin/$IMAGE_TAG"
--build-arg XGL_REPO_NAME="${GITHUB_REPOSITORY}"
--build-arg XGL_REPO_REF="${GITHUB_REF}"
--build-arg XGL_REPO_SHA="${GITHUB_SHA}"
--tag xgl/xgl-ci