Skip to content
Open
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
19 changes: 11 additions & 8 deletions .github/workflows/windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,12 +48,15 @@ jobs:
- uses: actions/checkout@v4
with:
ref: master
- name: Test JAVA_HOME
- name: Set JAVA_HOME and compiler/linker options
shell: cmd
run: |
echo rem SPDX-License-Identifier: Apache-2.0> set_java_home.bat
echo set JAVA_HOME=%JAVA_HOME_21_X64%>> set_java_home.bat
call .\set_java_home.bat
echo rem SPDX-License-Identifier: Apache-2.0> set_build_env.bat
echo set JAVA_HOME=%JAVA_HOME_21_X64%>> set_build_env.bat
echo set EXTRA_LFLAGS="/NODEFAULTLIB:libucrt.lib /DEFAULTLIB:ucrt.lib /HIGHENTROPYVA">> set_build_env.bat
echo set EXTRA_CFLAGS="/GS">> set_build_env.bat
echo set EXTRA_RCFLAGS="/nologo /d _WINNT /d WINVER=0x0A00 /d _WIN32_WINNT=0x0A00">> set_build_env.bat
call .\set_build_env.bat
Comment on lines +54 to +59
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wouldn't a definition within env section work too?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it didn't work for %JAVA_HOME_21_X64% so it is just adding a few lines to set_build_env.bat

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Check these out, it should be working:

echo "JAVA_HOME: %JAVA_HOME%"
- name: Build prunsrv
shell: cmd
Expand All @@ -62,25 +65,25 @@ jobs:
call "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\Common7\Tools\VsDevCmd.bat" -arch=${{ matrix.arch }}
cd src/native/windows/apps/prunsrv
echo "Building prunsrv for ${{ matrix.arch }}"
nmake BUILD_CPU=${{ matrix.arch }}
nmake BUILD_CPU=${{ matrix.arch }} STATIC_CRT=1 WINVER=0x0A00
- name: Build prunmgr
shell: cmd
run: |
echo on
call "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\Common7\Tools\VsDevCmd.bat" -arch=${{ matrix.arch }}
cd src/native/windows/apps/prunmgr
echo "Building prunmgr for ${{ matrix.arch }}"
nmake BUILD_CPU=${{ matrix.arch }}
nmake BUILD_CPU=${{ matrix.arch }} STATIC_CRT=1 WINVER=0x0A00
- name: Build jar
shell: cmd
run: |
call .\set_java_home.bat
call .\set_build_env.bat
echo "JAVA_HOME: %JAVA_HOME%"
mvn --batch-mode --no-transfer-progress install
- name: Test
shell: cmd
run: |
call .\set_java_home.bat
call .\set_build_env.bat
echo "JAVA_HOME: %JAVA_HOME%"
cd src/native/windows/apps/prunsrv/test/scripts
test.bat
Expand Down