mirror of
https://mirror.suhoan.cn/https://github.com/EasyTier/EasyTier.git
synced 2025-12-13 05:07:23 +08:00
Add windows arm64 target to CI core (#486)
This commit is contained in:
10
.github/workflows/core.yml
vendored
10
.github/workflows/core.yml
vendored
@@ -72,6 +72,10 @@ jobs:
|
||||
OS: windows-latest
|
||||
ARTIFACT_NAME: windows-x86_64
|
||||
|
||||
- TARGET: aarch64-pc-windows-msvc
|
||||
OS: windows-latest
|
||||
ARTIFACT_NAME: windows-arm64
|
||||
|
||||
- TARGET: x86_64-unknown-freebsd
|
||||
OS: ubuntu-22.04
|
||||
ARTIFACT_NAME: freebsd-13.2-x86_64
|
||||
@@ -164,10 +168,14 @@ jobs:
|
||||
run: |
|
||||
mkdir -p ./artifacts/objects/
|
||||
# windows is the only OS using a different convention for executable file name
|
||||
if [[ $OS =~ ^windows.*$ ]]; then
|
||||
if [[ $OS =~ ^windows.*$ && $TARGET =~ ^x86_64.*$ ]]; then
|
||||
SUFFIX=.exe
|
||||
cp easytier/third_party/Packet.dll ./artifacts/objects/
|
||||
cp easytier/third_party/wintun.dll ./artifacts/objects/
|
||||
elif [[ $OS =~ ^windows.*$ && $TARGET =~ ^aarch64.*$ ]]; then
|
||||
SUFFIX=.exe
|
||||
cp easytier/third_party/arm64/Packet.dll ./artifacts/objects/
|
||||
cp easytier/third_party/arm64/wintun.dll ./artifacts/objects/
|
||||
fi
|
||||
if [[ $GITHUB_REF_TYPE =~ ^tag$ ]]; then
|
||||
TAG=$GITHUB_REF_NAME
|
||||
|
||||
@@ -67,11 +67,13 @@ impl WindowsBuild {
|
||||
|
||||
pub fn check_for_win() {
|
||||
// add third_party dir to link search path
|
||||
#[cfg(target_arch = "x86_64")]
|
||||
println!("cargo:rustc-link-search=native=easytier/third_party/");
|
||||
let target = std::env::var("TARGET").unwrap_or_default();
|
||||
|
||||
#[cfg(target_arch = "aarch64")]
|
||||
println!("cargo:rustc-link-search=native=easytier/third_party/arm64/");
|
||||
if target.contains("x86_64") {
|
||||
println!("cargo:rustc-link-search=native=easytier/third_party/");
|
||||
} else if target.contains("aarch64") {
|
||||
println!("cargo:rustc-link-search=native=easytier/third_party/arm64/");
|
||||
}
|
||||
|
||||
let protoc_path = if let Some(o) = Self::check_protoc_exist() {
|
||||
println!("cargo:info=use os exist protoc: {:?}", o);
|
||||
|
||||
Reference in New Issue
Block a user