Skip to content

[+] switch to the amazon corretto base image #203

[+] switch to the amazon corretto base image

[+] switch to the amazon corretto base image #203

Workflow file for this run

name: Build CI
on:
workflow_dispatch:
push:
branches: [main*]
pull_request:
types: [opened, synchronize]
branches: [main*]
env:
GRADLE_OPTS: "-Dorg.gradle.daemon=false"
jobs:
build:
name: Build Java ${{ matrix.java }} (${{ matrix.os }})
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
java: [ '11', '17']
os: [ 'ubuntu-20.04', 'ubuntu-22.04' ]
steps:
- name: Checkout code
uses: actions/checkout@v2
with:
lfs: true
- name: Cache gradle dependencies
uses: actions/cache@v2
with:
path: ~/.gradle/caches
key: ${{ runner.os }}-gradle-caches-${{ hashFiles('**/*.gradle') }}
restore-keys: |
${{ runner.os }}-gradle-caches-
- name: Cache gradle wrapper
uses: actions/cache@v2
with:
path: ~/.gradle/wrapper
key: ${{ runner.os }}-gradle-wrapper-${{ hashFiles('**/gradle/wrapper/gradle-wrapper.properties') }}
- name: Setup java
uses: actions/setup-java@v1
with:
java-version: ${{ matrix.java }}
- name: Build with gradle
run: ./gradlew build checkLicense
- name: Build docker
run: ./gradlew :java:timebase:server:dockerBuildImageAll :java:timebase:client:dockerBuildImageAll
env:
DOCKER_REGISTRY_URL: ${{ secrets.DOCKER_REGISTRY_URL }}
DOCKER_REGISTRY_USERNAME: ${{ secrets.DOCKER_HUB_USER }}
DOCKER_REGISTRY_PASSWORD: ${{ secrets.DOCKER_HUB_TOKEN }}
- name: Run tests
run: ./gradlew junitTest
- name: Upload test results
if: ${{ failure() }}
uses: actions/upload-artifact@v2
with:
path: build/reports/junit
name: Test Report
build-installer:
name: Build Windows and Linux TimeBase Installer (Java version ${{ matrix.java }} (${{ matrix.os }}))
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
java: [ '11' ]
os: [ 'windows-2019' ] # we need windows for building native service libs.
steps:
- name: Checkout code
uses: actions/checkout@v2
with:
lfs: true
- name: Cache gradle dependencies
uses: actions/cache@v2
with:
path: ~/.gradle/caches
key: ${{ runner.os }}-gradle-caches-${{ hashFiles('**/*.gradle') }}
restore-keys: |
${{ runner.os }}-gradle-caches-
- name: Cache gradle wrapper
uses: actions/cache@v2
with:
path: ~/.gradle/wrapper
key: ${{ runner.os }}-gradle-wrapper-${{ hashFiles('**/gradle/wrapper/gradle-wrapper.properties') }}
- name: Setup java
uses: actions/setup-java@v1
with:
java-version: ${{ matrix.java }}
- name: Build with gradle
run: ./gradlew build windowsTimebaseInstaller linuxTimebaseInstaller
- name: Archive Linux installer
uses: actions/upload-artifact@v2
with:
path: java/installer/build/installer/timebase-linux-installer-*.jar
name: timebase-linux-installer
- name: Archive Windows installer
uses: actions/upload-artifact@v2
with:
path: java/installer/build/installer/timebase-windows-installer-*.jar
name: timebase-windows-installer