Skip to content

Commit

Permalink
Add auto-build-and-check workflow for Java.
Browse files Browse the repository at this point in the history
  • Loading branch information
krahets committed Nov 16, 2023
1 parent f7c41b6 commit a013632
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 0 deletions.
29 changes: 29 additions & 0 deletions .github/workflows/java.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# # This workflow will install OpenJDK and build the Java project
# For more information see: https://github.com/actions/setup-java

name: Java

on:
push:
branches: [ "main" ]
paths: ["codes/java/**/*.java"]
pull_request:
branches: [ "main" ]
paths: ["codes/java/**/*.java"]
workflow_dispatch:

jobs:
build:
runs-on: ubuntu-20.04
strategy:
matrix:
java: [ '11', '17' ]
name: Java ${{ matrix.Java }} sample
steps:
- uses: actions/checkout@v4
- name: Setup java
uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: ${{ matrix.java }}
- run: javac -d codes/java/build codes/java/**/*.java
1 change: 1 addition & 0 deletions codes/java/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
build

0 comments on commit a013632

Please sign in to comment.