Add windows arm64 target to CI core (#486)

This commit is contained in:
Sophon
2024-11-21 15:27:24 +08:00
committed by GitHub
parent bc7c4d8cd0
commit dd2236c697
2 changed files with 15 additions and 5 deletions

View File

@@ -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

View File

@@ -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);