Use the correct combination of OpenJDK and Tizen (#817)
This commit is contained in:
Родитель
1150190e7b
Коммит
fcb7056000
|
@ -10,7 +10,7 @@ variables:
|
|||
FEATURE_NAME: ''
|
||||
BASE_LINUX_PACKAGES: curl mono-complete msbuild
|
||||
NATIVE_LINUX_PACKAGES: $(BASE_LINUX_PACKAGES) python git libfontconfig1-dev clang-3.8 make
|
||||
TIZEN_LINUX_PACKAGES: $(BASE_LINUX_PACKAGES) python git openjdk-8-jdk zip libxcb-xfixes0 libxcb-render-util0 libwebkitgtk-1.0-0 libxcb-image0 acl libsdl1.2debian libv4l-0 libxcb-randr0 libxcb-shape0 libxcb-icccm4 libsm6 gettext rpm2cpio cpio bridge-utils openvpn
|
||||
TIZEN_LINUX_PACKAGES: $(BASE_LINUX_PACKAGES) python git zip libxcb-xfixes0 libxcb-render-util0 libwebkitgtk-1.0-0 libxcb-image0 acl libsdl1.2debian libv4l-0 libxcb-randr0 libxcb-shape0 libxcb-icccm4 libsm6 gettext rpm2cpio cpio bridge-utils openvpn
|
||||
MANAGED_LINUX_PACKAGES: $(BASE_LINUX_PACKAGES) dotnet-sdk-2.1 ttf-ancient-fonts
|
||||
MONO_VERSION: 5_16_0
|
||||
XCODE_VERSION: 10.1
|
||||
|
@ -31,12 +31,12 @@ jobs:
|
|||
displayName: Build Native Android (Windows)
|
||||
vmImage: vs2017-win2016
|
||||
target: externals-android
|
||||
# - template: azure-templates-bootstrapper.yml
|
||||
# parameters:
|
||||
# name: native_tizen_windows
|
||||
# displayName: Build Native Tizen (Windows)
|
||||
# vmImage: vs2017-win2016
|
||||
# target: externals-tizen
|
||||
- template: azure-templates-bootstrapper.yml
|
||||
parameters:
|
||||
name: native_tizen_windows
|
||||
displayName: Build Native Tizen (Windows)
|
||||
vmImage: vs2017-win2016
|
||||
target: externals-tizen
|
||||
- template: azure-templates-bootstrapper.yml
|
||||
parameters:
|
||||
name: native_uwp_windows
|
||||
|
@ -69,12 +69,12 @@ jobs:
|
|||
displayName: Build Native macOS (macOS)
|
||||
vmImage: macos-10.13
|
||||
target: externals-macos
|
||||
- template: azure-templates-bootstrapper.yml
|
||||
parameters:
|
||||
name: native_tizen_macos
|
||||
displayName: Build Native Tizen (macOS)
|
||||
vmImage: macos-10.13
|
||||
target: externals-tizen
|
||||
# - template: azure-templates-bootstrapper.yml
|
||||
# parameters:
|
||||
# name: native_tizen_macos
|
||||
# displayName: Build Native Tizen (macOS)
|
||||
# vmImage: macos-10.13
|
||||
# target: externals-tizen
|
||||
- template: azure-templates-bootstrapper.yml
|
||||
parameters:
|
||||
name: native_tvos_macos
|
||||
|
@ -132,8 +132,7 @@ jobs:
|
|||
target: libs-only
|
||||
dependsOn:
|
||||
- native_android_windows
|
||||
# - native_tizen_windows
|
||||
- native_tizen_linux
|
||||
- native_tizen_windows
|
||||
- native_uwp_windows
|
||||
- native_win32_windows
|
||||
- template: azure-templates-bootstrapper.yml
|
||||
|
@ -146,7 +145,8 @@ jobs:
|
|||
- native_android_macos
|
||||
- native_ios_macos
|
||||
- native_macos_macos
|
||||
- native_tizen_macos
|
||||
# - native_tizen_macos
|
||||
- native_tizen_linux
|
||||
- native_tvos_macos
|
||||
- native_watchos_macos
|
||||
- template: azure-templates-bootstrapper.yml
|
||||
|
@ -163,7 +163,7 @@ jobs:
|
|||
# PACKAGING JOBS
|
||||
- template: azure-templates-bootstrapper.yml
|
||||
parameters:
|
||||
name: package
|
||||
name: package_windows
|
||||
displayName: Package NuGets
|
||||
vmImage: vs2017-win2016
|
||||
target: nuget-only
|
||||
|
@ -189,7 +189,7 @@ jobs:
|
|||
- ${{ if eq(variables['System.TeamProject'], 'devdiv') }}:
|
||||
- job: signing
|
||||
displayName: Signing NuGets
|
||||
dependsOn: package
|
||||
dependsOn: package_windows
|
||||
pool:
|
||||
name: VSEng-XamarinCustom
|
||||
demands:
|
||||
|
@ -213,7 +213,7 @@ jobs:
|
|||
vmImage: vs2017-win2016
|
||||
target: tests-only
|
||||
dependsOn:
|
||||
- package
|
||||
- package_windows
|
||||
postBuildSteps:
|
||||
- task: PublishTestResults@2
|
||||
inputs:
|
||||
|
@ -226,7 +226,7 @@ jobs:
|
|||
vmImage: macos-10.13
|
||||
target: tests-only
|
||||
dependsOn:
|
||||
- package
|
||||
- package_windows
|
||||
postBuildSteps:
|
||||
- task: PublishTestResults@2
|
||||
inputs:
|
||||
|
@ -240,7 +240,7 @@ jobs:
|
|||
packages: $(MANAGED_LINUX_PACKAGES)
|
||||
target: tests-only
|
||||
dependsOn:
|
||||
- package
|
||||
- package_windows
|
||||
postBuildSteps:
|
||||
- task: PublishTestResults@2
|
||||
inputs:
|
||||
|
|
|
@ -26,6 +26,12 @@ jobs:
|
|||
sudo apt update
|
||||
sudo apt install -y ${{ parameters.packages }}
|
||||
displayName: Install any package dependencies
|
||||
# install tizen
|
||||
- ${{ if contains(parameters.name, '_tizen_') }}:
|
||||
- powershell: .\scripts\install-openjdk.ps1
|
||||
displayName: Install the OpenJDK
|
||||
- powershell: .\scripts\install-tizen.ps1
|
||||
displayName: Install the Tizen SDK
|
||||
# install extra bits for the native builds
|
||||
- ${{ if startsWith(parameters.name, 'native_') }}:
|
||||
# switch to Python 2.7
|
||||
|
@ -38,12 +44,8 @@ jobs:
|
|||
- ${{ if contains(parameters.name, '_android_') }}:
|
||||
- powershell: .\scripts\install-android-ndk.ps1
|
||||
displayName: Install the Android NDK
|
||||
# install tizen
|
||||
- ${{ if contains(parameters.name, '_tizen_') }}:
|
||||
- powershell: .\scripts\install-tizen.ps1
|
||||
displayName: Install the Tizen SDK
|
||||
# switch to the correct mono version on mac
|
||||
- ${{ if contains(parameters.vmImage, 'mac') }}:
|
||||
- ${{ if endsWith(parameters.name, '_macos') }}:
|
||||
- bash: sudo $AGENT_HOMEDIRECTORY/scripts/select-xamarin-sdk.sh $(MONO_VERSION)
|
||||
displayName: Switch to the latest Xamarin SDK
|
||||
- bash: echo '##vso[task.setvariable variable=MD_APPLE_SDK_ROOT;]'/Applications/Xcode_$(XCODE_VERSION).app;sudo xcode-select --switch /Applications/Xcode_$(XCODE_VERSION).app/Contents/Developer
|
||||
|
@ -54,22 +56,17 @@ jobs:
|
|||
displayName: Download the ${{ dep }} artifacts
|
||||
inputs:
|
||||
artifactName: ${{ dep }}
|
||||
targetPath: 'output-temp'
|
||||
- powershell: |
|
||||
New-Item -Type Directory -Path output -Force
|
||||
Copy-Item -Path output-temp/${{ dep }}/* -Destination output -Force -Recurse
|
||||
Remove-Item -Path output-temp/${{ dep }} -Force -Recurse
|
||||
displayName: Copy the ${{ dep }} artifacts to the output directory
|
||||
targetPath: 'output'
|
||||
# pre-build steps
|
||||
- ${{ parameters.preBuildSteps }}
|
||||
# build
|
||||
- ${{ if contains(parameters.vmImage, 'win') }}:
|
||||
- ${{ if endsWith(parameters.name, '_windows') }}:
|
||||
- powershell: .\bootstrapper.ps1 -t ${{ parameters.target }} -v $env:VERBOSITY
|
||||
displayName: Run the bootstrapper for ${{ parameters.target }}
|
||||
env:
|
||||
ANDROID_NDK_HOME: $(USERPROFILE)/android-ndk
|
||||
TIZEN_STUDIO_HOME: $(USERPROFILE)/tizen-studio
|
||||
- ${{ if not(contains(parameters.vmImage, 'win')) }}:
|
||||
- ${{ if not(endsWith(parameters.name, '_windows')) }}:
|
||||
- bash: ./bootstrapper.sh -t ${{ parameters.target }} -v $VERBOSITY
|
||||
displayName: Run the bootstrapper for ${{ parameters.target }}
|
||||
env:
|
||||
|
|
|
@ -0,0 +1,37 @@
|
|||
$errorActionPreference = 'Stop'
|
||||
|
||||
if ($IsMacOS) {
|
||||
$url = "https://download.oracle.com/java/GA/jdk10/10.0.2/19aef61b38124481863b1413dce1855f/13/openjdk-10.0.2_osx-x64_bin.tar.gz"
|
||||
} elseif ($IsLinux) {
|
||||
$url = "https://download.oracle.com/java/GA/jdk10/10.0.2/19aef61b38124481863b1413dce1855f/13/openjdk-10.0.2_linux-x64_bin.tar.gz"
|
||||
} else {
|
||||
$url = "https://download.java.net/java/GA/jdk10/10.0.2/19aef61b38124481863b1413dce1855f/13/openjdk-10.0.2_windows-x64_bin.tar.gz"
|
||||
}
|
||||
|
||||
$jdk = Join-Path "$HOME" "openjdk"
|
||||
$jdkTemp = Join-Path "$HOME" "openjdk-temp"
|
||||
$archive = Join-Path "$jdkTemp" "openjdk.tar.gz"
|
||||
|
||||
# download
|
||||
Write-Host "Downloading OpenJDK to '$archive'..."
|
||||
New-Item -ItemType Directory -Force -Path "$jdkTemp" | Out-Null
|
||||
(New-Object System.Net.WebClient).DownloadFile("$url", "$archive")
|
||||
|
||||
# install
|
||||
Write-Host "Extracting OpenJDK to '$jdk'..."
|
||||
New-Item -ItemType Directory -Force -Path "$jdk" | Out-Null
|
||||
if ($IsMacOS -or $IsLinux) {
|
||||
tar -vxzf "$archive" -C "$jdk"
|
||||
} else {
|
||||
tar --force-local -vxzf "$archive" -C "$jdk"
|
||||
}
|
||||
|
||||
# set the JAVA_HOME
|
||||
if ($IsMacOS) {
|
||||
$java_home = Join-Path "$jdk" "jdk-10.0.2.jdk/Contents/Home"
|
||||
} else {
|
||||
$java_home = Join-Path "$jdk" "jdk-10.0.2"
|
||||
}
|
||||
Write-Host "##vso[task.setvariable variable=JAVA_HOME;]$java_home"
|
||||
|
||||
exit $LASTEXITCODE
|
|
@ -1,5 +1,5 @@
|
|||
Param(
|
||||
[string] $version = "2.4"
|
||||
[string] $version = "3.2"
|
||||
)
|
||||
|
||||
$errorActionPreference = 'Stop'
|
||||
|
@ -15,19 +15,32 @@ if ($IsMacOS) {
|
|||
$ext = "exe"
|
||||
}
|
||||
|
||||
$ts = "$HOME/tizen-studio"
|
||||
$tsTemp = "$HOME/tizen-temp"
|
||||
$ts = Join-Path "$HOME" "tizen-studio"
|
||||
$tsTemp = Join-Path "$HOME" "tizen-temp"
|
||||
$url = "http://download.tizen.org/sdk/Installer/tizen-studio_${version}/web-cli_Tizen_Studio_${version}_${platform}.${ext}"
|
||||
$install = "$tsTemp/tizen-install.$ext"
|
||||
$install = Join-Path "$tsTemp" "tizen-install.$ext"
|
||||
$packages = "MOBILE-4.0,MOBILE-4.0-NativeAppDevelopment"
|
||||
|
||||
# make sure that JAVA_HOME/bin is in the PATH
|
||||
if ($env:JAVA_HOME) {
|
||||
$javaBin = Join-Path "$env:JAVA_HOME" "bin"
|
||||
if(-not $env:PATH.Contains($javaBin)) {
|
||||
Write-Host "Adding $javaBin to PATH..."
|
||||
$env:PATH = $javaBin + [System.IO.Path]::PathSeparator + $env:PATH
|
||||
}
|
||||
}
|
||||
|
||||
# log the Java version
|
||||
Write-Host "Using Java version:"
|
||||
& "java" -version
|
||||
|
||||
# download
|
||||
Write-Host "Downloading SDK..."
|
||||
Write-Host "Downloading SDK to '$install'..."
|
||||
New-Item -ItemType Directory -Force -Path "$tsTemp" | Out-Null
|
||||
(New-Object System.Net.WebClient).DownloadFile("$url", "$install")
|
||||
|
||||
# install
|
||||
Write-Host "Installing SDK..."
|
||||
Write-Host "Installing SDK to '$ts'..."
|
||||
if ($IsMacOS -or $IsLinux) {
|
||||
& "bash" "$install" --accept-license --no-java-check "$ts"
|
||||
} else {
|
||||
|
@ -35,11 +48,12 @@ if ($IsMacOS -or $IsLinux) {
|
|||
}
|
||||
|
||||
# install packages
|
||||
Write-Host "Installing Additional Packages..."
|
||||
Write-Host "Installing Additional Packages: '$packages'..."
|
||||
$packMan = Join-Path (Join-Path "$ts" "package-manager") "package-manager-cli.${ext}"
|
||||
if ($IsMacOS -or $IsLinux) {
|
||||
& "bash" "${ts}/package-manager/package-manager-cli.${ext}" install --no-java-check --accept-license "$packages"
|
||||
& "bash" "$packMan" install --no-java-check --accept-license "$packages"
|
||||
} else {
|
||||
& "${ts}/package-manager/package-manager-cli.${ext}" install --no-java-check --accept-license "$packages"
|
||||
& "$packMan" install --no-java-check --accept-license "$packages"
|
||||
}
|
||||
|
||||
exit $LASTEXITCODE
|
||||
|
|
Загрузка…
Ссылка в новой задаче