-
Notifications
You must be signed in to change notification settings - Fork 14.9k
34 lines (31 loc) · 861 Bytes
/
java.yml
File metadata and controls
34 lines (31 loc) · 861 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
# # 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"
- "en/codes/java/**/*.java"
pull_request:
branches: ["main"]
paths:
- "codes/java/**/*.java"
- "en/codes/java/**/*.java"
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-20.04
strategy:
matrix:
java: ["11", "17"]
code-dir: ["codes/java", "en/codes/java"]
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 ${{ matrix.code-dir }}/build ${{ matrix.code-dir }}/**/*.java