Skip to content

Commit f19729c

Browse files
committed
Check with GitHub Actions
1 parent e63a0e4 commit f19729c

File tree

1 file changed

+41
-0
lines changed

1 file changed

+41
-0
lines changed

.github/workflows/check.yml

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
name: Check
2+
on: [ pull_request, push ]
3+
jobs:
4+
check:
5+
runs-on: ${{ matrix.os }}
6+
# push: always run.
7+
# pull_request: run only when the PR is submitted from a forked repository, not within this repository.
8+
if: github.event_name == 'push' || github.event.pull_request.head.repo.full_name != github.repository
9+
strategy:
10+
fail-fast: false
11+
matrix:
12+
os:
13+
- ubuntu-latest
14+
- macos-13 # OpenJDK 8 is not supported on macos-14+ (M1).
15+
- windows-latest
16+
steps:
17+
- name: Set Git's core.autocrlf to false for Windows before checkout
18+
run: git config --global core.autocrlf false
19+
- uses: actions/checkout@v4
20+
- name: Set up OpenJDK 8
21+
uses: actions/setup-java@v4
22+
with:
23+
java-version: 8
24+
distribution: "temurin"
25+
cache: "gradle"
26+
27+
# GitHub Actions on Windows set environment variables TMP and TEMP with a legacy DOS 8.3 filename: "C:\Users\RUNNER~1\..."
28+
# On the other hand, "embulk-input-file" expects a long filename (LFN) on Windows.
29+
#
30+
# The following two steps override TMP and TEMP with LFN. USERPROFILE is set with LFN fortunately.
31+
#
32+
# See: https://github.com/actions/virtual-environments/issues/712
33+
34+
- name: Override TMP to use Windows' long filename (LFN)
35+
run: echo "TMP=$env:USERPROFILE\AppData\Local\Temp" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
36+
if: matrix.os == 'windows-latest'
37+
- name: Override TEMP to use Windows' long filename (LFN)
38+
run: echo "TEMP=$env:USERPROFILE\AppData\Local\Temp" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
39+
if: matrix.os == 'windows-latest'
40+
- name: Check
41+
run: ./gradlew --stacktrace check

0 commit comments

Comments
 (0)