Skip to content

replace gradle-build-action@v3 with gradle/actions/setup-gradle@v3 #214

replace gradle-build-action@v3 with gradle/actions/setup-gradle@v3

replace gradle-build-action@v3 with gradle/actions/setup-gradle@v3 #214

Workflow file for this run

name: CI
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
jobs:
build:
strategy:
matrix:
os: [ ubuntu-latest, windows-latest ]
runs-on: ${{ matrix.os }}
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up BellSoft Liberica Full JDK on Ubuntu
if: runner.os == 'Linux'
run: |
sudo apt-get update
sudo apt-get install -y wget
wget https://download.bell-sw.com/java/17.0.6+10/bellsoft-jdk17.0.6+10-linux-amd64-full.deb
sudo apt-get install -y ./bellsoft-jdk17.0.6+10-linux-amd64-full.deb
sudo update-alternatives --install /usr/bin/java java /usr/lib/jvm/bellsoft-java17-full-amd64/bin/java 1
sudo update-alternatives --install /usr/bin/javac javac /usr/lib/jvm/bellsoft-java17-full-amd64/bin/javac 1
echo "JAVA_HOME=/usr/lib/jvm/bellsoft-java17-full-amd64" >> $GITHUB_ENV
echo "/usr/lib/jvm/bellsoft-java17-full-amd64/bin" >> $GITHUB_PATH
- name: Set up BellSoft Liberica Full JDK on Windows
if: runner.os == 'Windows'
run: |
$jdkPath = 'C:\Program Files\BellSoft\LibericaJDK-17'
Invoke-WebRequest -Uri "https://download.bell-sw.com/java/17.0.6+10/bellsoft-jdk17.0.6+10-windows-amd64-full.zip" -OutFile "bellsoft-jdk-17-windows-amd64-full.zip"
Expand-Archive -Path "bellsoft-jdk-17-windows-amd64-full.zip" -DestinationPath $jdkPath
# Move extracted contents to the correct location
$extractedFolder = Get-ChildItem -Path $jdkPath -Directory | Select-Object -First 1
Get-ChildItem -Path (Join-Path -Path $extractedFolder.FullName -ChildPath "*") | Move-Item -Destination $jdkPath
Remove-Item -Recurse -Force $extractedFolder.FullName
# Update JAVA_HOME and PATH
echo "JAVA_HOME=$jdkPath" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
echo "$jdkPath\bin" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v3
- name: Execute Gradle build
run: ./gradlew build
id: compile
continue-on-error: false
qodana:
needs: build
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up BellSoft Liberica Full JDK
run: |
sudo apt-get update
sudo apt-get install -y wget
wget https://download.bell-sw.com/java/17.0.6+10/bellsoft-jdk17.0.6+10-linux-amd64-full.deb
sudo apt-get install -y ./bellsoft-jdk17.0.6+10-linux-amd64-full.deb
sudo update-alternatives --install /usr/bin/java java /usr/lib/jvm/bellsoft-java17-full-amd64/bin/java 1
sudo update-alternatives --install /usr/bin/javac javac /usr/lib/jvm/bellsoft-java17-full-amd64/bin/javac 1
echo "JAVA_HOME=/usr/lib/jvm/bellsoft-java17-full-amd64" >> $GITHUB_ENV
echo "/usr/lib/jvm/bellsoft-java17-full-amd64/bin" >> $GITHUB_PATH
- name: 'Qodana Scan'
uses: JetBrains/qodana-action@v2024.1
env:
QODANA_TOKEN: ${{ secrets.QODANA_TOKEN }} # read the steps about it below