From aeece2f609db959d1c5e43e4f00bd177ea130575 Mon Sep 17 00:00:00 2001 From: Pete Harris Date: Fri, 24 Nov 2023 15:43:46 +0000 Subject: [PATCH] Build Windows Arm64 binaries (#441) --- Docs/ChangeLog-4x.md | 2 ++ jenkins/nightly.Jenkinsfile | 40 +++++++++++++++++++++++++++++++------ jenkins/release.Jenkinsfile | 26 +++++++++++++++++++++--- 3 files changed, 59 insertions(+), 9 deletions(-) diff --git a/Docs/ChangeLog-4x.md b/Docs/ChangeLog-4x.md index ee3ffa66f..be0e7c96d 100644 --- a/Docs/ChangeLog-4x.md +++ b/Docs/ChangeLog-4x.md @@ -19,6 +19,8 @@ large core count Windows systems. use more than 64 cores on large core count systems. This change doubled command line performance for `-exhastive` compression when testing on an 96 core/192 thread system. + * **Feature:** Windows Arm64 native builds of the `astcenc` command line tool + are now included in the prebuilt release binaries. ## 4.6.0 diff --git a/jenkins/nightly.Jenkinsfile b/jenkins/nightly.Jenkinsfile index 544666d74..6bed84235 100644 --- a/jenkins/nightly.Jenkinsfile +++ b/jenkins/nightly.Jenkinsfile @@ -67,7 +67,7 @@ pipeline { ''' } } - stage('Build R') { + stage('Build R x64') { steps { sh ''' mkdir build_rel @@ -77,7 +77,7 @@ pipeline { ''' } } - stage('Build D') { + stage('Build D x64') { steps { sh ''' mkdir build_dbg @@ -122,7 +122,7 @@ pipeline { bat 'git clean -ffdx' } } - stage('Build R') { + stage('Build R x64') { steps { bat ''' call c:\\progra~2\\micros~1\\2022\\buildtools\\vc\\auxiliary\\build\\vcvars64.bat @@ -133,7 +133,7 @@ pipeline { ''' } } - stage('Build D') { + stage('Build D x64') { steps { bat ''' call c:\\progra~2\\micros~1\\2022\\buildtools\\vc\\auxiliary\\build\\vcvars64.bat @@ -172,7 +172,7 @@ pipeline { bat 'git clean -ffdx' } } - stage('Build R') { + stage('Build R x64') { steps { bat ''' call c:\\progra~2\\micros~1\\2022\\buildtools\\vc\\auxiliary\\build\\vcvars64.bat @@ -185,7 +185,7 @@ pipeline { ''' } } - stage('Build D') { + stage('Build D x64') { steps { bat ''' call c:\\progra~2\\micros~1\\2022\\buildtools\\vc\\auxiliary\\build\\vcvars64.bat @@ -196,11 +196,36 @@ pipeline { ''' } } + stage('Build R Arm64') { + steps { + bat ''' + call c:\\progra~2\\micros~1\\2022\\buildtools\\vc\\auxiliary\\build\\vcvarsall.bat x64_arm64 + mkdir build_rel_arm64 + cd build_rel_arm64 + cmake -G "Visual Studio 17 2022" -A ARM64 -T ClangCL -DASTCENC_ISA_NEON=ON -DASTCENC_PACKAGE=arm64-clangcl .. + msbuild astcencoder.sln -property:Configuration=Release + ''' + } + } + stage('Build D Arm64') { + steps { + bat ''' + call c:\\progra~2\\micros~1\\2022\\buildtools\\vc\\auxiliary\\build\\vcvarsall.bat x64_arm64 + mkdir build_dbg_arm64 + cd build_dbg_arm64 + cmake -G "Visual Studio 17 2022" -A ARM64 -T ClangCL -DASTCENC_ISA_NEON=ON .. + msbuild astcencoder.sln -property:Configuration=Debug + ''' + } + } stage('Stash') { steps { dir('build_rel') { stash name: 'astcenc-windows-x64-clangcl', includes: '*.zip' } + dir('build_rel_arm64') { + stash name: 'astcenc-windows-arm64-clangcl', includes: '*.zip' + } } } stage('Test') { @@ -305,6 +330,9 @@ spec: dir('upload/windows-x64-clangcl') { unstash 'astcenc-windows-x64-clangcl' } + dir('upload/windows-arm64-clangcl') { + unstash 'astcenc-windows-arm64-clangcl' + } dir('upload/macos-x64') { unstash 'astcenc-macos-x64' } diff --git a/jenkins/release.Jenkinsfile b/jenkins/release.Jenkinsfile index 3791bb812..253746920 100644 --- a/jenkins/release.Jenkinsfile +++ b/jenkins/release.Jenkinsfile @@ -127,7 +127,7 @@ spec: sh 'git clean -ffdx' } } - stage('Build astcenc R') { + stage('Build astcenc R x64') { steps { sh ''' export CXX=clang++-9 @@ -138,7 +138,7 @@ spec: ''' } } - stage('Build astcdec R') { + stage('Build astcdec R x64') { steps { sh ''' export CXX=clang++-9 @@ -178,7 +178,7 @@ spec: bat 'git clean -ffdx' } } - stage('Build R') { + stage('Build R x64') { steps { bat ''' call c:\\progra~2\\micros~1\\2022\\buildtools\\vc\\auxiliary\\build\\vcvars64.bat @@ -191,6 +191,19 @@ spec: ''' } } + stage('Build R Arm64') { + steps { + bat ''' + call c:\\progra~2\\micros~1\\2022\\buildtools\\vc\\auxiliary\\build\\vcvarsall.bat x64_arm64 + mkdir build_rel_arm64 + cd build_rel_arm64 + cmake -G "Visual Studio 17 2022" -A ARM64 -T ClangCL -DCMAKE_INSTALL_PREFIX=../ -DASTCENC_ISA_NEON=ON -DASTCENC_PACKAGE=arm64 .. + msbuild astcencoder.sln -property:Configuration=Release + msbuild PACKAGE.vcxproj -property:Configuration=Release + msbuild INSTALL.vcxproj -property:Configuration=Release + ''' + } + } stage('Sign') { steps { dir('sign_tools') { @@ -208,6 +221,7 @@ spec: usernameVariable: 'AF_USER', passwordVariable: 'APIKEY')]) { powershell 'C:\\Python311\\python.exe .\\sign_tools\\windows-client-wrapper.py -b $Env:BUILD_NUMBER -t $Env:APIKEY (Get-ChildItem -Filter build_rel\\*.zip)[0].FullName' + powershell 'C:\\Python311\\python.exe .\\sign_tools\\windows-client-wrapper.py -b $Env:BUILD_NUMBER -t $Env:APIKEY (Get-ChildItem -Filter build_rel_arm64\\*.zip)[0].FullName' } } } @@ -217,6 +231,10 @@ spec: stash name: 'astcenc-windows-x64', includes: '*.zip' stash name: 'astcenc-windows-x64-hash', includes: '*.zip.sha256' } + dir('build_rel_arm64') { + stash name: 'astcenc-windows-arm64', includes: '*.zip' + stash name: 'astcenc-windows-arm64-hash', includes: '*.zip.sha256' + } } } stage('Test') { @@ -321,10 +339,12 @@ spec: steps { dir('upload') { unstash 'astcenc-windows-x64-hash' + unstash 'astcenc-windows-arm64-hash' unstash 'astcenc-linux-x64-hash' unstash 'astcenc-macos-universal-hash' unstash 'astcenc-windows-x64' + unstash 'astcenc-windows-arm64' unstash 'astcenc-linux-x64' unstash 'astcenc-macos-universal'