Skip to content

use ubuntu-24.04

use ubuntu-24.04 #7

Workflow file for this run

# This workflow uses actions that are not certified by GitHub.
# They are provided by a third-party and are governed by
# separate terms of service, privacy policy, and support
# documentation.
# This workflow will build a Java project with Gradle and cache/restore any dependencies to improve the workflow execution time
# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-gradle
name: Build Application
on:
workflow_dispatch:
push:
branches:
- master
concurrency:
group: build
cancel-in-progress: true
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-24.04, macos-latest, windows-latest]
architecture: [x64, aarch64]
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Pre-build shell for POSIX
if: runner.os != 'Windows'
run: |
ls -al
chmod +x gradlew
./gradlew --version
- name: Pre-build shell for Linux
if: runner.os == 'Linux' || runner.os == 'Ubuntu' || runner.os == 'CentOS'
run: |
sudo apt-get update
sudo apt-get install --install-suggests -y musl musl-tools zlib1g-dev
- name: Pre-build shell for Windows
if: runner.os == 'Windows'
run: |
ls
.\gradlew.bat --version
- name: Set up GraalVM
uses: graalvm/setup-graalvm@v1
with:
java-version: '21'
distribution: 'graalvm'
github-token: ${{ secrets.GITHUB_TOKEN }}
components: 'native-image'
- name: Set up Gradle
uses: gradle/gradle-build-action@v2
with:
gradle-version: '8.8'
- name: Build native image
run: ./gradlew nativeCompile
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: native-image-${{ matrix.os }}-${{ matrix.architecture }}
path: build/native/nativeCompile/SrunLogin*
if-no-files-found: error
release:
runs-on: ubuntu-24.04
needs: build
steps:
- name: Download artifacts
uses: actions/download-artifact@v4
with:
path: ./artifacts
- name: Create or Update Release
id: create_release
uses: softprops/action-gh-release@v1
with:
tag_name: ${{ github.ref_name }}
name: Release ${{ github.ref_name }}
draft: false
prerelease: false
overwrite: true
files: ./artifacts/**
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}