Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
43 changes: 28 additions & 15 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
# This workflow will build a Java project with Gradle
# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-gradle

name: Build JavaBot

on: [push, pull_request, workflow_dispatch]
Expand All @@ -11,33 +8,49 @@ jobs:
permissions:
contents: read
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v6
- name: Set up JDK 25
uses: actions/setup-java@v4
uses: actions/setup-java@v5
with:
java-version: '25'
cache: 'maven'
distribution: 'temurin'
- name: Grant execute permission for gradlew
run: chmod +x gradlew
- name: Build with Gradle
run: ./gradlew build
- name: Test with Gradle
run: ./gradlew test
- name: Build and run tests
run: mvn verify
nativetest:
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- uses: actions/checkout@v6
- name: Set up JDK 25
uses: graalvm/setup-graalvm@v1
with:
java-version: '25'
distribution: 'graalvm-community'
cache: 'maven'
- name: Run tests with native-image
run: mvn test -PnativeTest
publish:
runs-on: ubuntu-latest
permissions:
contents: read
needs: build
needs:
- build
if: ${{ (github.event_name == 'push' && github.ref == 'refs/heads/main') || github.event_name == 'workflow_dispatch' }}
concurrency:
group: publish
cancel-in-progress: true
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v6
- name: Set up JDK 25
uses: graalvm/setup-graalvm@v1
with:
java-version: '25'
distribution: 'graalvm-community'
cache: 'maven'
- name: Build native-image
run: ./gradlew nativeCompile -Pprod
run: "mvn native:compile -Pnative -Pprod '-P!dev'"
- name: Build Docker image
run: docker build -t javabot .
- name: Tag docker image
Expand All @@ -48,7 +61,7 @@ jobs:
dockerhub_username: ${{ secrets.DOCKERHUB_USERNAME }}
if: env.dockerhub_username != null
- name: Login to DockerHub
uses: docker/login-action@v3
uses: docker/login-action@v4
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
Expand Down
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,13 @@ build/
/purgeArchives
/logs
/db

/target/
# Eclipse settings
.classpath
.project
.settings/
bin/
/.factorypath

# H2 Database
*.mv.db
Expand Down
3 changes: 2 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
FROM alpine:latest
RUN apk add --no-cache libsm libxrender libxext libxtst libxi gcompat ttf-dejavu

COPY build/native/nativeCompile /work
COPY target/*.so /work/
COPY target/javabot /work/
WORKDIR /work

RUN chown 1000:1000 /work
Expand Down
131 changes: 0 additions & 131 deletions build.gradle.kts

This file was deleted.

Empty file removed checkstyle/suppressions.xml
Empty file.
Binary file removed gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
7 changes: 0 additions & 7 deletions gradle/wrapper/gradle-wrapper.properties

This file was deleted.

Loading