-
Notifications
You must be signed in to change notification settings - Fork 24
125 lines (110 loc) · 3.93 KB
/
windows-java.yml
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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
name: Windows MSYS2 with Java interoperability
on:
pull_request:
branches: [ java-interop ]
push:
# manual run in actions tab - for all branches
workflow_dispatch:
jobs:
build:
strategy:
fail-fast: false
matrix:
include:
- { sys: mingw64, env: x86_64 }
- { sys: mingw32, env: i686 }
- { sys: ucrt64, env: ucrt-x86_64 }
- { sys: clang64, env: clang-x86_64 }
runs-on: windows-latest
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- name: Checkout code
uses: actions/checkout@v4
- name: System setup
uses: msys2/setup-msys2@v2
with:
msystem: ${{matrix.sys}}
update: true
install: autoconf automake libtool make flex bison help2man texinfo
gmp-devel gettext-devel
mingw-w64-${{matrix.env}}-cc
mingw-w64-${{matrix.env}}-gmp
- name: Check x86 openjdk8 (hotspot)
if: matrix.sys == 'mingw32'
uses: actions/cache@v4
id: openjdk8
with:
path: openjdk8.zip
key: openjdk8
save-always: true
- name: Download x86 openjdk8 (hotspot)
if: matrix.sys == 'mingw32' && steps.openjdk8.outputs.cache-hit != 'true'
run: |
wget -O openjdk8.zip \
"https://github.com/adoptium/temurin8-binaries/releases/download/jdk8u422-b05/OpenJDK8U-jdk_x86-32_windows_hotspot_8u422b05.zip"
shell: msys2 {0}
- name: Unzip x86 openjdk8 (hotspot)
if: matrix.sys == 'mingw32'
run: |
"/c/Program Files/7-Zip/7z.exe" x openjdk8.zip
echo "JAVA_HOME=$(PWD)/jdk8u422-b05"
echo "JAVA_HOME=$(PWD)/jdk8u422-b05" >> ~/.bash_profile
shell: msys2 {0}
- name: Select Java 21
if: matrix.sys != 'mingw32'
run: |
echo "JAVA_HOME=$JAVA_HOME_21_X64"
echo "JAVA_HOME='$(cygpath -u "$JAVA_HOME_21_X64")'" \
>> ~/.bash_profile
shell: msys2 {0}
- name: Set git user
run: |
git config --global user.name github-actions
git config --global user.email [email protected]
- name: bootstrap
run: |
./build_aux/bootstrap install
shell: msys2 {0}
- name: configure
run: |
mkdir _build
cd _build
java_home="$(cygpath -u "$JAVA_HOME")"
# thanks @revelator & @GitMensch ;-)
# (cf https://github.com/msys2/MINGW-packages/discussions/8056)
lt_cv_deplibs_check_method=pass_all \
../configure --enable-cobc-internal-checks \
--enable-hardening \
--prefix /opt/cobol/gnucobol \
--exec-prefix /opt/cobol/gnucobol \
--disable-nls \
--without-indexed \
--without-json \
--without-xml2 \
--without-curses \
--with-java \
JAVA_HOME="$java_home" \
JAVA="$java_home/bin/java" \
JAVAC="$java_home/bin/javac"
shell: msys2 {0}
- name: Upload config.log
uses: actions/upload-artifact@v4
if: failure()
with:
name: config-${{matrix.sys}}.log
path: _build/config.log
- name: make
run: |
make -C _build --jobs=$(($(nproc)+1))
shell: msys2 {0}
- name: check
continue-on-error: true
run: |
make -C _build check TESTSUITEFLAGS="--jobs=$(($(nproc)+1))" || \
make -C _build check TESTSUITEFLAGS="--recheck --verbose"
shell: msys2 {0}
- name: Upload testsuite.log
uses: actions/upload-artifact@v4
with:
name: testsuite-${{matrix.sys}}.log
path: _build/tests/testsuite.log