92 lines
2.6 KiB
YAML
92 lines
2.6 KiB
YAML
name: Build test matrix images
|
|
|
|
on:
|
|
push:
|
|
paths:
|
|
- 'smoke-tests/matrix/**'
|
|
- '.github/workflows/build-test-matrix.yml'
|
|
branches: [ 'main' ]
|
|
workflow_dispatch:
|
|
|
|
jobs:
|
|
buildLinux:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v2.3.4
|
|
with:
|
|
fetch-depth: 0
|
|
|
|
- name: Set up JDK 11 for running Gradle
|
|
uses: actions/setup-java@v2
|
|
with:
|
|
distribution: adopt
|
|
java-version: 11
|
|
|
|
- name: Cache gradle dependencies
|
|
uses: burrunan/gradle-cache-action@v1.10
|
|
with:
|
|
job-id: matrix-smoke
|
|
|
|
- name: Cache Gradle Wrapper
|
|
uses: actions/cache@v2
|
|
with:
|
|
path: ~/.gradle/wrapper
|
|
key: ${{ runner.os }}-gradle-wrapper-cache-${{ hashFiles('smoke-tests/matrix/gradle/wrapper/gradle-wrapper.properties') }}
|
|
|
|
- name: Login to GitHub Package Registry
|
|
uses: docker/login-action@v1.9.0
|
|
with:
|
|
registry: ghcr.io
|
|
username: ${{ github.repository_owner }}
|
|
password: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
- name: Build Docker Image
|
|
run: |
|
|
TAG="$(date '+%Y%m%d').$GITHUB_RUN_ID"
|
|
echo "Using extra tag $TAG"
|
|
./gradlew buildLinuxTestImages pushMatrix -PextraTag=$TAG
|
|
working-directory: smoke-tests/matrix
|
|
|
|
buildWindows:
|
|
runs-on: windows-latest
|
|
defaults:
|
|
run:
|
|
shell: bash
|
|
steps:
|
|
- name: Support longpaths
|
|
run: git config --system core.longpaths true
|
|
|
|
- uses: actions/checkout@v2.3.4
|
|
with:
|
|
fetch-depth: 0
|
|
|
|
- name: Set up JDK 11 for running Gradle
|
|
uses: actions/setup-java@v2
|
|
with:
|
|
distribution: adopt
|
|
java-version: 11
|
|
|
|
- name: Cache gradle dependencies
|
|
uses: burrunan/gradle-cache-action@v1.10
|
|
with:
|
|
job-id: matrix-smoke
|
|
|
|
- name: Cache Gradle Wrapper
|
|
uses: actions/cache@v2
|
|
with:
|
|
path: ~/.gradle/wrapper
|
|
key: ${{ runner.os }}-gradle-wrapper-cache-${{ hashFiles('smoke-tests/matrix/gradle/wrapper/gradle-wrapper.properties') }}
|
|
|
|
- name: Login to GitHub Package Registry
|
|
uses: azure/docker-login@v1
|
|
with:
|
|
login-server: ghcr.io
|
|
username: ${{ github.repository_owner }}
|
|
password: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
- name: Build Docker Image
|
|
run: |
|
|
TAG="$(date '+%Y%m%d').$GITHUB_RUN_ID"
|
|
echo "Using extra tag $TAG"
|
|
./gradlew buildWindowsTestImages pushMatrix -PextraTag=$TAG
|
|
working-directory: smoke-tests/matrix |