зеркало из https://github.com/microsoft/msquic.git
Build and sign arm/arm64 Onebranch pipeline for linux (#2987)
Enables building and signing arm/arm64 bits for linux. Also, several minor improvements to the OBP workflow. With this PR, linux onebranch build workflow does not install anything online anymore. Everything is set up in the docker image.
This commit is contained in:
Родитель
ce482de278
Коммит
cb65c5d187
|
@ -1,6 +1,10 @@
|
|||
#
|
||||
# Run this OBP will generate a docker image and push it to isolated ACR hosted by Onebranch.
|
||||
# For testing this pipeline, set enable_isolated_acr_push and enable_service_tree_acr_path to false.
|
||||
#
|
||||
# Set enable_isolated_acr_push and enable_service_tree_acr_path to true when the docker(s)
|
||||
# are ready to be uploaded.
|
||||
#
|
||||
# By default, this pipeline does not build dockers if RunFor* is not set.
|
||||
#
|
||||
|
||||
trigger: none # https://aka.ms/obpipelines/triggers
|
||||
|
@ -10,6 +14,18 @@ parameters: # parameters are shown up in ADO UI in a build queue time
|
|||
displayName: 'Enable debug output'
|
||||
type: boolean
|
||||
default: false
|
||||
- name: 'RunForLinux'
|
||||
displayName: 'Build docker image for Linux'
|
||||
type: boolean
|
||||
default: false
|
||||
- name: 'RunForWindows'
|
||||
displayName: 'Build docker image for Windows'
|
||||
type: boolean
|
||||
default: false
|
||||
- name: 'DockerTag'
|
||||
displayName: 'Docker tag'
|
||||
type: string
|
||||
default: 'latest'
|
||||
|
||||
variables:
|
||||
CDP_DEFINITION_BUILD_COUNT: $[counter('', 0)] # needed for onebranch.pipeline.version task https://aka.ms/obpipelines/versioning
|
||||
|
@ -39,9 +55,10 @@ extends:
|
|||
enabled: false # onebranch publish all sdl results to TSA. If TSA is disabled all SDL tools will forced into 'break' build mode.
|
||||
|
||||
stages:
|
||||
- stage: main
|
||||
- stage: docker
|
||||
jobs:
|
||||
- job: download_external_libs
|
||||
condition: eq('${{ parameters.RunForWindows }}', 'true')
|
||||
displayName: Download external libs
|
||||
pool:
|
||||
type: linux # read more about custom job types at https://aka.ms/obpipelines/yaml/jobs
|
||||
|
@ -57,10 +74,8 @@ extends:
|
|||
echo Copying $(xgameplatformlib.secureFilePath) to artifacts...
|
||||
mkdir -p $(Build.SourcesDirectory)/out
|
||||
cp $(xgameplatformlib.secureFilePath) $(Build.SourcesDirectory)/out
|
||||
- stage: docker
|
||||
dependsOn: main
|
||||
jobs:
|
||||
- job: linuxContainers # build linux images
|
||||
condition: eq('${{ parameters.RunForLinux }}', 'true')
|
||||
displayName: Build docker image for linux
|
||||
variables:
|
||||
ob_git_checkout: true
|
||||
|
@ -75,10 +90,11 @@ extends:
|
|||
dockerFileContextPath: .azure/dockers/ob/linux
|
||||
saveImageToPath: msquicbuild-linux.tar
|
||||
enable_network: true
|
||||
build_tag: $(Build.BuildNumber)
|
||||
build_tag: ${{ parameters.DockerTag }}
|
||||
enable_isolated_acr_push: true
|
||||
enable_service_tree_acr_path: true
|
||||
- job: windowsContainers # build windows images
|
||||
dependsOn: download_external_libs
|
||||
displayName: Build docker image for windows
|
||||
variables:
|
||||
ob_git_checkout: true
|
||||
|
@ -98,7 +114,7 @@ extends:
|
|||
dockerFileContextPath: .azure\dockers\ob\windows
|
||||
saveImageToPath: msquicbuild-windows.tar.gz
|
||||
enable_network: true
|
||||
build_tag: $(Build.BuildNumber)
|
||||
build_tag: ${{ parameters.DockerTag }}
|
||||
compress: true
|
||||
enable_isolated_acr_push: true
|
||||
enable_service_tree_acr_path: true
|
||||
|
|
|
@ -38,7 +38,7 @@ variables:
|
|||
|
||||
WindowsContainerImage: 'cdpxwin1809.azurecr.io/global/vse2019:latest'
|
||||
WindowsContainerImage2: 'cdpxb7b51c2f738e43e48f7605d9a8e5f6d700.azurecr.io/b7b51c2f-738e-43e4-8f76-05d9a8e5f6d7/official/msquicbuild:20220812.8'
|
||||
LinuxContainerImage: 'cdpxb7b51c2f738e43e48f7605d9a8e5f6d700.azurecr.io/b7b51c2f-738e-43e4-8f76-05d9a8e5f6d7/official/msquicbuild:20220811.5'
|
||||
LinuxContainerImage: 'cdpxb7b51c2f738e43e48f7605d9a8e5f6d700.azurecr.io/b7b51c2f-738e-43e4-8f76-05d9a8e5f6d7/official/msquicbuild:xcomp1'
|
||||
LinuxContainerImage2: 'cdpxlinux.azurecr.io/global/ubuntu-1804:latest'
|
||||
|
||||
resources:
|
||||
|
|
|
@ -364,6 +364,16 @@ stages:
|
|||
arch: arm64
|
||||
tls: openssl
|
||||
extraBuildArgs: -DisableLogs
|
||||
extraName: 'android'
|
||||
|
||||
- template: ./templates/build-config-user.yml
|
||||
parameters:
|
||||
image: ubuntu-latest
|
||||
platform: linux
|
||||
arch: arm64
|
||||
tls: openssl
|
||||
extraBuildArgs: -DisableLogs -ToolchainFile cmake/toolchains/aarch64-linux.cmake -OneBranch
|
||||
extraPrepareArgs: -InstallArm64Toolchain
|
||||
|
||||
- template: ./templates/build-config-user.yml
|
||||
parameters:
|
||||
|
@ -372,6 +382,7 @@ stages:
|
|||
arch: x64
|
||||
tls: openssl
|
||||
extraBuildArgs: -DisableLogs
|
||||
extraName: 'android'
|
||||
|
||||
- template: ./templates/build-config-user.yml
|
||||
parameters:
|
||||
|
|
|
@ -12,6 +12,12 @@ RUN apt-get update && apt-get install -y apt-transport-https \
|
|||
apt-add-repository ppa:lttng/stable-2.12 && \
|
||||
apt-get update && apt-get install -y tzdata && apt-get install -y \
|
||||
build-essential \
|
||||
gcc-arm-linux-gnueabihf \
|
||||
g++-arm-linux-gnueabihf \
|
||||
binutils-arm-linux-gnueabihf \
|
||||
gcc-aarch64-linux-gnu \
|
||||
g++-aarch64-linux-gnu \
|
||||
binutils-aarch64-linux-gnu \
|
||||
cmake \
|
||||
git \
|
||||
make \
|
||||
|
@ -20,8 +26,17 @@ RUN apt-get update && apt-get install -y apt-transport-https \
|
|||
lttng-tools \
|
||||
perl \
|
||||
nasm \
|
||||
ruby \
|
||||
ruby-dev \
|
||||
rpm \
|
||||
libssl-dev \
|
||||
cppcheck \
|
||||
clang-tidy \
|
||||
gdb \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
RUN gem install fpm
|
||||
|
||||
RUN wget -q https://packages.microsoft.com/config/ubuntu/18.04/packages-microsoft-prod.deb -O packages-microsoft-prod.deb && \
|
||||
sudo dpkg -i packages-microsoft-prod.deb && \
|
||||
sudo add-apt-repository universe && \
|
||||
|
@ -29,4 +44,19 @@ RUN wget -q https://packages.microsoft.com/config/ubuntu/18.04/packages-microsof
|
|||
sudo apt-get install -y \
|
||||
# INSTALL POWERSHELl
|
||||
powershell \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
RUN dpkg --add-architecture arm64
|
||||
RUN dpkg --add-architecture armhf
|
||||
|
||||
RUN cat /etc/apt/sources.list | grep "^deb" | sed 's/deb /deb [arch=amd64] /g' > /etc/apt/sources.list
|
||||
|
||||
COPY arm-cross-compile-sources.list /etc/apt/sources.list.d/
|
||||
|
||||
RUN apt-get update
|
||||
|
||||
RUN apt-get install -y liblttng-ust-dev:arm64 \
|
||||
liblttng-ust-dev:armhf \
|
||||
libssl-dev:arm64 \
|
||||
libssl-dev:armhf \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
|
|
@ -0,0 +1,7 @@
|
|||
deb [arch=armhf,arm64] http://ports.ubuntu.com/ focal main restricted
|
||||
deb [arch=armhf,arm64] http://ports.ubuntu.com/ focal-updates main restricted
|
||||
deb [arch=armhf,arm64] http://ports.ubuntu.com/ focal universe
|
||||
deb [arch=armhf,arm64] http://ports.ubuntu.com/ focal-updates universe
|
||||
deb [arch=armhf,arm64] http://ports.ubuntu.com/ focal multiverse
|
||||
deb [arch=armhf,arm64] http://ports.ubuntu.com/ focal-updates multiverse
|
||||
deb [arch=armhf,arm64] http://ports.ubuntu.com/ focal-backports main restricted universe multiverse
|
|
@ -26,4 +26,18 @@ jobs:
|
|||
inputs:
|
||||
pwsh: true
|
||||
filePath: scripts/build.ps1
|
||||
arguments: -Tls ${{ parameters.tls }} -Config ${{ parameters.config }} -Platform ${{ parameters.platform }} -Arch x64 -CI -UseSystemOpenSSLCrypto
|
||||
arguments: -Tls ${{ parameters.tls }} -Config ${{ parameters.config }} -Platform ${{ parameters.platform }} -Arch x64 -CI -UseSystemOpenSSLCrypto -OneBranch
|
||||
- task: PowerShell@2
|
||||
displayName: arm64
|
||||
target: linux_build_container
|
||||
inputs:
|
||||
pwsh: true
|
||||
filePath: scripts/build.ps1
|
||||
arguments: -Tls ${{ parameters.tls }} -Config ${{ parameters.config }} -Platform ${{ parameters.platform }} -Arch arm64 -ToolchainFile cmake/toolchains/aarch64-linux.cmake -CI -UseSystemOpenSSLCrypto -OneBranch
|
||||
- task: PowerShell@2
|
||||
displayName: arm
|
||||
target: linux_build_container
|
||||
inputs:
|
||||
pwsh: true
|
||||
filePath: scripts/build.ps1
|
||||
arguments: -Tls ${{ parameters.tls }} -Config ${{ parameters.config }} -Platform ${{ parameters.platform }} -Arch arm -ToolchainFile cmake/toolchains/arm-linux.cmake -CI -UseSystemOpenSSLCrypto -OneBranch
|
|
@ -0,0 +1,68 @@
|
|||
set(GCC_COMPILER_VERSION "" CACHE STRING "GCC Compiler version")
|
||||
set(GNU_MACHINE "aarch64-linux-gnu" CACHE STRING "GNU compiler triplet")
|
||||
|
||||
if(COMMAND toolchain_save_config)
|
||||
return() # prevent recursive call
|
||||
endif()
|
||||
|
||||
set(CMAKE_SYSTEM_NAME Linux)
|
||||
set(CMAKE_SYSTEM_VERSION 1)
|
||||
if(NOT DEFINED CMAKE_SYSTEM_PROCESSOR)
|
||||
set(CMAKE_SYSTEM_PROCESSOR aarch64)
|
||||
else()
|
||||
#message("CMAKE_SYSTEM_PROCESSOR=${CMAKE_SYSTEM_PROCESSOR}")
|
||||
endif()
|
||||
|
||||
include("${CMAKE_CURRENT_LIST_DIR}/gnu.toolchain.cmake")
|
||||
|
||||
if(CMAKE_SYSTEM_PROCESSOR STREQUAL arm AND NOT ARM_IGNORE_FP)
|
||||
set(FLOAT_ABI_SUFFIX "")
|
||||
if(NOT SOFTFP)
|
||||
set(FLOAT_ABI_SUFFIX "hf")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(NOT "x${GCC_COMPILER_VERSION}" STREQUAL "x")
|
||||
set(__GCC_VER_SUFFIX "-${GCC_COMPILER_VERSION}")
|
||||
endif()
|
||||
|
||||
find_program(CMAKE_C_COMPILER NAMES ${GNU_MACHINE}${FLOAT_ABI_SUFFIX}-gcc${__GCC_VER_SUFFIX})
|
||||
if (NOT CMAKE_C_COMPILER)
|
||||
message(FATAL_ERROR "${GNU_MACHINE}${FLOAT_ABI_SUFFIX}-gcc${__GCC_VER_SUFFIX} not found")
|
||||
endif()
|
||||
|
||||
find_program(CMAKE_CXX_COMPILER NAMES ${GNU_MACHINE}${FLOAT_ABI_SUFFIX}-g++${__GCC_VER_SUFFIX})
|
||||
if (NOT CMAKE_CXX_COMPILER)
|
||||
message(FATAL_ERROR "${GNU_MACHINE}${FLOAT_ABI_SUFFIX}-g++${__GCC_VER_SUFFIX} not found")
|
||||
endif()
|
||||
|
||||
find_program(CMAKE_LINKER NAMES ${GNU_MACHINE}${FLOAT_ABI_SUFFIX}-ld${__GCC_VER_SUFFIX} ${GNU_MACHINE}${FLOAT_ABI_SUFFIX}-ld)
|
||||
if(NOT CMAKE_LINKER)
|
||||
message(FATAL_ERROR "CMAKE_LINKER=${CMAKE_LINKER} is defined")
|
||||
endif()
|
||||
|
||||
find_program(CMAKE_AR NAMES ${GNU_MACHINE}${FLOAT_ABI_SUFFIX}-ar${__GCC_VER_SUFFIX} ${GNU_MACHINE}${FLOAT_ABI_SUFFIX}-ar)
|
||||
if(NOT CMAKE_AR)
|
||||
message(FATAL_ERROR "CMAKE_AR=${CMAKE_AR} is defined")
|
||||
endif()
|
||||
|
||||
if(NOT DEFINED ARM_LINUX_SYSROOT AND DEFINED GNU_MACHINE)
|
||||
set(ARM_LINUX_SYSROOT /usr/${GNU_MACHINE}${FLOAT_ABI_SUFFIX})
|
||||
endif()
|
||||
|
||||
if(USE_NEON)
|
||||
message(WARNING "You use obsolete variable USE_NEON to enable NEON instruction set. Use -DENABLE_NEON=ON instead." )
|
||||
set(ENABLE_NEON TRUE)
|
||||
elseif(USE_VFPV3)
|
||||
message(WARNING "You use obsolete variable USE_VFPV3 to enable VFPV3 instruction set. Use -DENABLE_VFPV3=ON instead." )
|
||||
set(ENABLE_VFPV3 TRUE)
|
||||
endif()
|
||||
|
||||
set(CMAKE_FIND_ROOT_PATH ${CMAKE_FIND_ROOT_PATH} ${ARM_LINUX_SYSROOT})
|
||||
|
||||
set(TOOLCHAIN_CONFIG_VARS ${TOOLCHAIN_CONFIG_VARS}
|
||||
ARM_LINUX_SYSROOT
|
||||
ENABLE_NEON
|
||||
ENABLE_VFPV3
|
||||
)
|
||||
toolchain_save_config()
|
|
@ -0,0 +1,61 @@
|
|||
set(GCC_COMPILER_VERSION "" CACHE STRING "GCC Compiler version")
|
||||
set(GNU_MACHINE "arm-linux-gnueabihf" CACHE STRING "GNU compiler triplet")
|
||||
|
||||
if(COMMAND toolchain_save_config)
|
||||
return() # prevent recursive call
|
||||
endif()
|
||||
|
||||
set(CMAKE_SYSTEM_NAME Linux)
|
||||
set(CMAKE_SYSTEM_VERSION 1)
|
||||
if(NOT DEFINED CMAKE_SYSTEM_PROCESSOR)
|
||||
set(CMAKE_SYSTEM_PROCESSOR arm)
|
||||
else()
|
||||
#message("CMAKE_SYSTEM_PROCESSOR=${CMAKE_SYSTEM_PROCESSOR}")
|
||||
endif()
|
||||
|
||||
include("${CMAKE_CURRENT_LIST_DIR}/gnu.toolchain.cmake")
|
||||
|
||||
if(NOT "x${GCC_COMPILER_VERSION}" STREQUAL "x")
|
||||
set(__GCC_VER_SUFFIX "-${GCC_COMPILER_VERSION}")
|
||||
endif()
|
||||
|
||||
find_program(CMAKE_C_COMPILER NAMES ${GNU_MACHINE}${FLOAT_ABI_SUFFIX}-gcc${__GCC_VER_SUFFIX})
|
||||
if (NOT CMAKE_C_COMPILER)
|
||||
message(FATAL_ERROR "${GNU_MACHINE}${FLOAT_ABI_SUFFIX}-gcc${__GCC_VER_SUFFIX} not found")
|
||||
endif()
|
||||
|
||||
find_program(CMAKE_CXX_COMPILER NAMES ${GNU_MACHINE}${FLOAT_ABI_SUFFIX}-g++${__GCC_VER_SUFFIX})
|
||||
if (NOT CMAKE_CXX_COMPILER)
|
||||
message(FATAL_ERROR "${GNU_MACHINE}${FLOAT_ABI_SUFFIX}-g++${__GCC_VER_SUFFIX} not found")
|
||||
endif()
|
||||
|
||||
find_program(CMAKE_LINKER NAMES ${GNU_MACHINE}${FLOAT_ABI_SUFFIX}-ld${__GCC_VER_SUFFIX} ${GNU_MACHINE}${FLOAT_ABI_SUFFIX}-ld)
|
||||
if(NOT CMAKE_LINKER)
|
||||
message(FATAL_ERROR "CMAKE_LINKER=${CMAKE_LINKER} is defined")
|
||||
endif()
|
||||
|
||||
find_program(CMAKE_AR NAMES ${GNU_MACHINE}${FLOAT_ABI_SUFFIX}-ar${__GCC_VER_SUFFIX} ${GNU_MACHINE}${FLOAT_ABI_SUFFIX}-ar)
|
||||
if(NOT CMAKE_AR)
|
||||
message(FATAL_ERROR "CMAKE_AR=${CMAKE_AR} is defined")
|
||||
endif()
|
||||
|
||||
if(NOT DEFINED ARM_LINUX_SYSROOT AND DEFINED GNU_MACHINE)
|
||||
set(ARM_LINUX_SYSROOT /usr/${GNU_MACHINE}${FLOAT_ABI_SUFFIX})
|
||||
endif()
|
||||
|
||||
if(USE_NEON)
|
||||
message(WARNING "You use obsolete variable USE_NEON to enable NEON instruction set. Use -DENABLE_NEON=ON instead." )
|
||||
set(ENABLE_NEON TRUE)
|
||||
elseif(USE_VFPV3)
|
||||
message(WARNING "You use obsolete variable USE_VFPV3 to enable VFPV3 instruction set. Use -DENABLE_VFPV3=ON instead." )
|
||||
set(ENABLE_VFPV3 TRUE)
|
||||
endif()
|
||||
|
||||
set(CMAKE_FIND_ROOT_PATH ${CMAKE_FIND_ROOT_PATH} ${ARM_LINUX_SYSROOT})
|
||||
|
||||
set(TOOLCHAIN_CONFIG_VARS ${TOOLCHAIN_CONFIG_VARS}
|
||||
ARM_LINUX_SYSROOT
|
||||
ENABLE_NEON
|
||||
ENABLE_VFPV3
|
||||
)
|
||||
toolchain_save_config()
|
|
@ -29,7 +29,7 @@ endif()
|
|||
if(NOT DEFINED CMAKE_C_COMPILER)
|
||||
find_program(CMAKE_C_COMPILER NAMES ${GNU_MACHINE}${FLOAT_ABI_SUFFIX}-gcc${__GCC_VER_SUFFIX})
|
||||
else()
|
||||
#message(WARNING "CMAKE_C_COMPILER=${CMAKE_C_COMPILER} is defined")
|
||||
message(WARNING "CMAKE_C_COMPILER=${CMAKE_C_COMPILER} is defined")
|
||||
endif()
|
||||
if(NOT DEFINED CMAKE_CXX_COMPILER)
|
||||
find_program(CMAKE_CXX_COMPILER NAMES ${GNU_MACHINE}${FLOAT_ABI_SUFFIX}-g++${__GCC_VER_SUFFIX})
|
||||
|
|
|
@ -99,6 +99,9 @@ This script provides helpers for building msquic.
|
|||
.PARAMETER SysRoot
|
||||
Directory with cross-compilation tools
|
||||
|
||||
.PARAMETER OneBranch
|
||||
Build is occuring from Onebranch pipeline.
|
||||
|
||||
.EXAMPLE
|
||||
build.ps1
|
||||
|
||||
|
@ -203,7 +206,10 @@ param (
|
|||
[string]$LibraryName = "msquic",
|
||||
|
||||
[Parameter(Mandatory = $false)]
|
||||
[string]$SysRoot = ""
|
||||
[string]$SysRoot = "/",
|
||||
|
||||
[Parameter(Mandatory = $false)]
|
||||
[switch]$OneBranch = $false
|
||||
)
|
||||
|
||||
Set-StrictMode -Version 'Latest'
|
||||
|
@ -347,20 +353,19 @@ function CMake-Generate {
|
|||
"arm64" { $Arguments += " -DCMAKE_OSX_ARCHITECTURES=arm64 -DCMAKE_OSX_DEPLOYMENT_TARGET=""11.0"""}
|
||||
}
|
||||
}
|
||||
if ($Platform -eq "Linux") {
|
||||
if ($Platform -eq "linux") {
|
||||
$Arguments += " $Generator"
|
||||
$HostArch = "$([System.Runtime.InteropServices.RuntimeInformation]::ProcessArchitecture)".ToLower()
|
||||
if ($HostArch -ne $Arch) {
|
||||
# cross-compilation
|
||||
if ($SysRoot -eq "") {
|
||||
Write-Error "SysRoot must be set for cross-compilation."
|
||||
if ($OneBranch) {
|
||||
$Arguments += " -DONEBRANCH=1"
|
||||
}
|
||||
$Arguments += " -DCMAKE_FIND_ROOT_PATH_MODE_PROGRAM=NEVER -DCMAKE_CROSSCOMPILING=1 -DCMAKE_SYSROOT=$SysRoot "
|
||||
$Arguments += " -DCMAKE_FIND_ROOT_PATH_MODE_PROGRAM=NEVER -DCMAKE_CROSSCOMPILING=1 -DCMAKE_SYSROOT=$SysRoot"
|
||||
switch ($Arch) {
|
||||
"arm64" { $Arguments += " -DCMAKE_CXX_COMPILER_TARGET=aarch64-linux-gnu -DCMAKE_C_COMPILER_TARGET=aarch64-linux-gnu -DCMAKE_TARGET_ARCHITECTURE=arm64" }
|
||||
"arm" { $Arguments += " -DCMAKE_CXX_COMPILER_TARGET=arm-linux-gnueabihf -DCMAKE_C_COMPILER_TARGET=arm-linux-gnueabihf -DCMAKE_TARGET_ARCHITECTURE=arm" }
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
if($Static) {
|
||||
$Arguments += " -DQUIC_BUILD_SHARED=off"
|
||||
|
@ -457,6 +462,7 @@ function CMake-Generate {
|
|||
$Arguments += " -DANDROID_NDK=""$NDK"""
|
||||
$Arguments += " -DCMAKE_TOOLCHAIN_FILE=""$NdkToolchainFile"""
|
||||
}
|
||||
|
||||
$Arguments += " -DQUIC_LIBRARY_NAME=$LibraryName"
|
||||
$Arguments += " ../../.."
|
||||
|
||||
|
|
|
@ -108,6 +108,8 @@ if [ -z ${OUTPUT} ]; then
|
|||
OUTPUT="artifacts/packages/${OS}/${ARCH}_${CONFIG}_openssl"
|
||||
fi
|
||||
|
||||
echo "ARCH=$ARCH PKGARCH=$PKGARCH ARTIFACTS=$ARTIFACTS"
|
||||
|
||||
mkdir -p ${OUTPUT}
|
||||
|
||||
if [ "$OS" == "linux" ]; then
|
||||
|
|
|
@ -159,11 +159,17 @@ foreach ($Build in $AllBuilds) {
|
|||
Compress-Archive -Path "$TempDir/*" -DestinationPath (Join-Path $DistDir "msquic_$($Platform)_$BuildBaseName.zip") -Force
|
||||
|
||||
# For now, package only x64 Release binaries
|
||||
if ($Platform -eq "linux" -and $BuildBaseName -like "*x64_Release*") {
|
||||
if ($Platform -eq "linux" -and $BuildBaseName -like "*_Release*") {
|
||||
Write-Output "Packaging $Build"
|
||||
$OldLoc = Get-Location
|
||||
Set-Location $RootDir
|
||||
& $RootDir/scripts/make-packages.sh --output $DistDir
|
||||
if ($BuildBaseName -like "*arm64_*") {
|
||||
& $RootDir/scripts/make-packages.sh --output $DistDir --arch arm64
|
||||
} elseif ($BuildBaseName -like "*arm_*") {
|
||||
& $RootDir/scripts/make-packages.sh --output $DistDir --arch arm
|
||||
} else {
|
||||
& $RootDir/scripts/make-packages.sh --output $DistDir # x64
|
||||
}
|
||||
Set-Location $OldLoc
|
||||
}
|
||||
|
||||
|
|
|
@ -79,6 +79,9 @@ param (
|
|||
[Parameter(Mandatory = $false)]
|
||||
[switch]$InstallXdpSdk,
|
||||
|
||||
[Parameter(Mandatory = $false)]
|
||||
[switch]$InstallArm64Toolchain,
|
||||
|
||||
[Parameter(Mandatory = $false)]
|
||||
[switch]$InstallXdpDriver,
|
||||
|
||||
|
@ -505,19 +508,6 @@ if ($IsLinux) {
|
|||
Install-Clog2Text
|
||||
}
|
||||
|
||||
if ($ForOneBranch) {
|
||||
sh -c "wget -O - https://apt.kitware.com/keys/kitware-archive-latest.asc 2>/dev/null | gpg --dearmor - | sudo tee /usr/share/keyrings/kitware-archive-keyring.gpg >/dev/null"
|
||||
sh -c "echo 'deb [signed-by=/usr/share/keyrings/kitware-archive-keyring.gpg] https://apt.kitware.com/ubuntu/ bionic main' | sudo tee /etc/apt/sources.list.d/kitware.list >/dev/null"
|
||||
$ForBuild = $true
|
||||
}
|
||||
|
||||
if ($ForOneBranchPackage) {
|
||||
sudo apt-get update
|
||||
# used for packaging
|
||||
sudo apt-get install -y ruby ruby-dev rpm
|
||||
sudo gem install fpm
|
||||
}
|
||||
|
||||
if ($ForBuild) {
|
||||
sudo apt-add-repository ppa:lttng/stable-2.12
|
||||
sudo apt-get update
|
||||
|
@ -525,6 +515,11 @@ if ($IsLinux) {
|
|||
sudo apt-get install -y build-essential
|
||||
sudo apt-get install -y liblttng-ust-dev
|
||||
sudo apt-get install -y libssl-dev
|
||||
if ($InstallArm64Toolchain) {
|
||||
sudo apt-get install -y gcc-aarch64-linux-gnu
|
||||
sudo apt-get install -y binutils-aarch64-linux-gnu
|
||||
sudo apt-get install -y g++-aarch64-linux-gnu
|
||||
}
|
||||
# only used for the codecheck CI run:
|
||||
sudo apt-get install -y cppcheck clang-tidy
|
||||
# used for packaging
|
||||
|
|
|
@ -221,11 +221,21 @@ else()
|
|||
list(APPEND OPENSSL_CONFIG_FLAGS -latomic)
|
||||
else()
|
||||
if (CMAKE_TARGET_ARCHITECTURE STREQUAL arm64)
|
||||
set(OPENSSL_CONFIG_CMD ${CMAKE_CURRENT_SOURCE_DIR}/openssl/Configure linux-aarch64)
|
||||
if (ONEBRANCH)
|
||||
set(OPENSSL_CONFIG_CMD ${CMAKE_CURRENT_SOURCE_DIR}/openssl/Configure linux-aarch64
|
||||
--cross-compile-prefix=${GNU_MACHINE}${FLOAT_ABI_SUFFIX}-)
|
||||
else()
|
||||
set(OPENSSL_CONFIG_CMD ${CMAKE_CURRENT_SOURCE_DIR}/openssl/Configure linux-aarch64)
|
||||
endif()
|
||||
list(APPEND OPENSSL_CONFIG_FLAGS -latomic)
|
||||
elseif (CMAKE_TARGET_ARCHITECTURE STREQUAL arm)
|
||||
set(OPENSSL_CONFIG_CMD ${CMAKE_CURRENT_SOURCE_DIR}/openssl/Configure linux-armv4)
|
||||
list(APPEND OPENSSL_CONFIG_FLAGS -latomic)
|
||||
if (ONEBRANCH)
|
||||
set(OPENSSL_CONFIG_CMD ${CMAKE_CURRENT_SOURCE_DIR}/openssl/Configure linux-armv4
|
||||
--cross-compile-prefix=${GNU_MACHINE}${FLOAT_ABI_SUFFIX}-)
|
||||
else()
|
||||
set(OPENSSL_CONFIG_CMD ${CMAKE_CURRENT_SOURCE_DIR}/openssl/Configure linux-armv4)
|
||||
endif()
|
||||
list(APPEND OPENSSL_CONFIG_FLAGS -latomic)
|
||||
else()
|
||||
set(OPENSSL_CONFIG_CMD ${CMAKE_CURRENT_SOURCE_DIR}/openssl/config
|
||||
CC=${CMAKE_C_COMPILER} CXX=${CMAKE_CXX_COMPILER})
|
||||
|
|
Загрузка…
Ссылка в новой задаче