forked from java-native-access/jna
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Also build on windows (java-native-access#166)
Motivation: We should also build on windows our native bits. Modifications: - Add jobs to build on windows - Adjust build config to support windows Result: Verify we can build on windows
- Loading branch information
1 parent
940c2b2
commit e79636e
Showing
6 changed files
with
233 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -13,6 +13,7 @@ on: | |
jobs: | ||
build-linux-x86_64: | ||
runs-on: ubuntu-latest | ||
name: linux-x86_64 | ||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
|
@@ -38,3 +39,44 @@ jobs: | |
with: | ||
name: target | ||
path: "**/target/" | ||
|
||
build-windows: | ||
runs-on: windows-2016 | ||
name: windows-x86_64 | ||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- name: Set up JDK 8 | ||
uses: actions/setup-java@v1 | ||
with: | ||
java-version: 8 | ||
|
||
- name: Install stable toolchain | ||
uses: actions-rs/toolchain@v1 | ||
with: | ||
profile: minimal | ||
toolchain: stable | ||
target: x86_64-pc-windows-msvc | ||
override: true | ||
|
||
- name: Add msbuild to PATH | ||
uses: microsoft/[email protected] | ||
|
||
- name: Configuring Developer Command Prompt | ||
uses: ilammy/msvc-dev-cmd@v1 | ||
with: | ||
arch: x86_amd64 | ||
|
||
- name: Install tools | ||
uses: crazy-max/ghaction-chocolatey@v1 | ||
with: | ||
args: install ninja nasm | ||
|
||
- name: Build project | ||
run: mvn --file pom.xml clean package | ||
|
||
- uses: actions/upload-artifact@v2 | ||
if: ${{ failure() }} | ||
with: | ||
name: build-windows-target | ||
path: "**/target/" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,6 +10,7 @@ on: | |
jobs: | ||
build-linux-x86_64: | ||
runs-on: ubuntu-latest | ||
name: linux-x86_64 | ||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
|
@@ -38,3 +39,44 @@ jobs: | |
with: | ||
name: target | ||
path: "**/target/" | ||
|
||
build-pr-windows: | ||
runs-on: windows-2016 | ||
name: windows-x86_64 | ||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- name: Set up JDK 8 | ||
uses: actions/setup-java@v1 | ||
with: | ||
java-version: 8 | ||
|
||
- name: Install stable toolchain | ||
uses: actions-rs/toolchain@v1 | ||
with: | ||
profile: minimal | ||
toolchain: stable | ||
target: x86_64-pc-windows-msvc | ||
override: true | ||
|
||
- name: Add msbuild to PATH | ||
uses: microsoft/[email protected] | ||
|
||
- name: Configuring Developer Command Prompt | ||
uses: ilammy/msvc-dev-cmd@v1 | ||
with: | ||
arch: x86_amd64 | ||
|
||
- name: Install tools | ||
uses: crazy-max/ghaction-chocolatey@v1 | ||
with: | ||
args: install ninja nasm | ||
|
||
- name: Build project | ||
run: mvn --file pom.xml clean package | ||
|
||
- uses: actions/upload-artifact@v2 | ||
if: ${{ failure() }} | ||
with: | ||
name: build-pr-windows-target | ||
path: "**/target/" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!-- | ||
~ Copyright 2021 The Netty Project | ||
~ | ||
~ The Netty Project licenses this file to you under the Apache License, | ||
~ version 2.0 (the "License"); you may not use this file except in compliance | ||
~ with the License. You may obtain a copy of the License at: | ||
~ | ||
~ https://www.apache.org/licenses/LICENSE-2.0 | ||
~ | ||
~ Unless required by applicable law or agreed to in writing, software | ||
~ distributed under the License is distributed on an "AS IS" BASIS, WITHOUT | ||
~ WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the | ||
~ License for the specific language governing permissions and limitations | ||
~ under the License. | ||
--> | ||
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | ||
<ItemDefinitionGroup> | ||
<ClCompile> | ||
<AdditionalIncludeDirectories>$(JAVA_HOME)\include;$(JAVA_HOME)\include\win32;@BORINGSSL_INCLUDE_DIR@;@QUICHE_INCLUDE_DIR@;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> | ||
</ClCompile> | ||
<Link> | ||
<AdditionalDependencies>ws2_32.lib;crypt32.lib;userenv.lib;@BORINGSSL_LIB_DIR@\@SSL_LIB@;@BORINGSSL_LIB_DIR@\@CRYPTO_LIB@;@QUICHE_LIB_DIR@\@QUICHE_LIB@;%(AdditionalDependencies)</AdditionalDependencies> | ||
</Link> | ||
</ItemDefinitionGroup> | ||
</Project> |