Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
ad16298
Initial stage of DoClient Snap/Agent app and ubuntu core only flag (#…
andretoyama-msft Jan 5, 2023
98919b2
Allow overriding cmake search path (#152)
andretoyama-msft Jan 30, 2023
11e67b8
Fix small typo in examples in README.md (#155)
GeorgeSiggins Feb 6, 2023
17b1997
SDK: Add get_property support, remove callbacks and vectors from prop…
JeffreySaathoff Feb 8, 2023
8b3bb68
Add support for streamed output (#156)
JeffreySaathoff Feb 9, 2023
4561954
Add support for partial downloads (ranges) (#157)
JeffreySaathoff Feb 13, 2023
8df51fc
Add implementation for EnumDownloads (#158)
JeffreySaathoff Feb 15, 2023
9ab5698
Ubuntu snap: Create sdk-tests snap to test integration with the agent…
andretoyama-msft Mar 7, 2023
ef69e59
Ubuntu snap: Use SNAP_DATA env var. Add documentation. (#160)
shishirb-MSFT Mar 9, 2023
1e1468e
SDK: Remove unused test helpers (#161)
shishirb-MSFT Mar 10, 2023
62d76bc
Enable bootstrap.sh to determine OS and version on its own (#162)
shishirb-MSFT Mar 11, 2023
d6f4e40
Add support for setting client certificate (#164)
JeffreySaathoff Mar 20, 2023
70c5e52
Change confinement level to strict (#163)
andretoyama-msft Mar 21, 2023
952fc48
Update ubuntu-snap.md (#165)
andretoyama-msft Mar 21, 2023
7dc1336
Fix minsizerel binary size checks (#168)
shishirb-MSFT Mar 23, 2023
211cfce
Replace boost::filesystem usage with std::filesystem (#169)
shishirb-MSFT Mar 23, 2023
02c9ae2
A more complete fix for non-existent /include path (#167)
shishirb-MSFT Mar 23, 2023
7fdc10b
Adding support for building DO snaps for arm64 architecture (#170)
andretoyama-msft May 2, 2023
c86438f
Adjust agent snapcraft yaml before first publish (#171)
andretoyama-msft May 24, 2023
d0e7d7f
User/andretoyama msft/support ubuntu2204 (#172)
andretoyama-msft Jun 15, 2023
bd9883c
add parallel flag into build options (#173)
andretoyama-msft Jul 6, 2023
6459cc5
User/andretoyama/add debian11 support (#174)
andretoyama-msft Aug 9, 2023
5777cc4
Increment Agent, SDK version to 1.1.0
shishirb-MSFT Sep 7, 2023
fcd73a6
Update test file URLs (#176)
shishirb-MSFT Sep 7, 2023
5c090ee
Increment Agent snap version also to 1.1.0 (#177)
shishirb-MSFT Sep 7, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -56,3 +56,7 @@ _deps
*_CPack_Packages/
*.deb
out/

# Ubuntu Snap files
*.snap
snap/
24 changes: 19 additions & 5 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,7 @@ option (DO_INCLUDE_PLUGINS "Build subproject plugins" OFF)
option (DO_INCLUDE_SDK "Build subproject sdk-cpp" OFF)

option (DO_BUILD_TESTS "Set DO_BUILD_TESTS to OFF to skip building tests." ON)

set(CMAKE_CXX_STANDARD 14)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_CXX_EXTENSIONS OFF)
option (DO_BUILD_FOR_SNAP "Enable DO Snap build option" OFF)

# Get verbose output from cmake generation and build steps
set(CMAKE_VERBOSE_MAKEFILE ON)
Expand Down Expand Up @@ -61,6 +58,16 @@ else()
message(FATAL_ERROR "Unknown platform for client")
endif()

# C++17 is required to use std::filesystem but Edge builds on Windows is not ready to move up yet.
# Luckily, we do not need std::filesystem on Windows.
if (DO_INCLUDE_SDK AND DO_PLATFORM_WINDOWS)
set(CMAKE_CXX_STANDARD 14)
else ()
set(CMAKE_CXX_STANDARD 17)
endif ()
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_CXX_EXTENSIONS OFF)

# PIC (Position Independent Code) ensures .a files can be linked to executables that have PIE enabled
set(CMAKE_POSITION_INDEPENDENT_CODE ON)

Expand All @@ -82,7 +89,14 @@ if (DO_PLATFORM_LINUX)
# (Enable --trace-expand in cmake and look at lines from boost_headers-config.cmake and its callers.)
# Workaround: force cmake to look in "/usr" since the /lib and /bin paths are either
# not relevant for our usage or they are symlinks to /usr/lib and /usr/bin.
set(CMAKE_PREFIX_PATH "/usr")
if (IS_SYMLINK "/lib" AND NOT EXISTS "/include")
if (CMAKE_PREFIX_PATH)
message (WARNING "/lib is a symlink and /include does not exist. CMAKE_PREFIX_PATH is already set, not overriding it.")
else ()
message (WARNING "/lib is a symlink and /include does not exist. Updating CMAKE_PREFIX_PATH to /usr.")
set(CMAKE_PREFIX_PATH "/usr")
endif ()
endif ()
endif (DO_PLATFORM_LINUX)

if (DO_PLATFORM_WINDOWS AND DO_INCLUDE_SDK)
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ This will handle installing to the appropriate paths, and also the necessary set
> cd /tmp/build-deliveryoptimization-agent/linux-debug/
> sudo apt-get install ./deliveryoptimization-agent*.deb
> cd /tmp/build-deliveryoptimization-plugin-apt/linux-debug/
> sudo apt get install ./deliveryoptimization-plugin-apt*.deb
> sudo apt-get install ./deliveryoptimization-plugin-apt*.deb
```

2. If you build and install using cmake, or through some other custom means, be sure to setup the DO user/groups correctly in your installation.
Expand Down
33 changes: 31 additions & 2 deletions azure-pipelines/build/linux/du/docker/doclient-lite-docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,13 +33,31 @@ jobs:

- template: ../templates/do-docker-jobs.yml
parameters:
targetOsArch: 'debian10_arm64'
targetOsArch: 'debian10_arm64' # azure pipelines does not support '.' in display names
imageVersion: ${{variables.containerImageVersion}}
stepsTemplate: 'doclient-lite-docker-steps.yml'

- template: ../templates/do-docker-jobs.yml
parameters:
targetOsArch: 'debian10_x64'
targetOsArch: 'debian10_x64' # azure pipelines does not support '.' in display names
imageVersion: ${{variables.containerImageVersion}}
stepsTemplate: 'doclient-lite-docker-steps.yml'

- template: ../templates/do-docker-jobs.yml
parameters:
targetOsArch: 'debian11_arm32' # azure pipelines does not support '.' in display names
imageVersion: ${{variables.containerImageVersion}}
stepsTemplate: 'doclient-lite-docker-steps.yml'

- template: ../templates/do-docker-jobs.yml
parameters:
targetOsArch: 'debian11_arm64' # azure pipelines does not support '.' in display names
imageVersion: ${{variables.containerImageVersion}}
stepsTemplate: 'doclient-lite-docker-steps.yml'

- template: ../templates/do-docker-jobs.yml
parameters:
targetOsArch: 'debian11_x64' # azure pipelines does not support '.' in display names
imageVersion: ${{variables.containerImageVersion}}
stepsTemplate: 'doclient-lite-docker-steps.yml'

Expand All @@ -61,3 +79,14 @@ jobs:
imageVersion: ${{variables.containerImageVersion}}
stepsTemplate: 'doclient-lite-docker-steps.yml'

- template: ../templates/do-docker-jobs.yml
parameters:
targetOsArch: 'ubuntu2204_arm64' # azure pipelines does not support '.' in display names
imageVersion: ${{variables.containerImageVersion}}
stepsTemplate: 'doclient-lite-docker-steps.yml'

- template: ../templates/do-docker-jobs.yml
parameters:
targetOsArch: 'ubuntu2204_x64' # azure pipelines does not support '.' in display names
imageVersion: ${{variables.containerImageVersion}}
stepsTemplate: 'doclient-lite-docker-steps.yml'
29 changes: 29 additions & 0 deletions azure-pipelines/build/linux/du/docker/dopapt-docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,24 @@ jobs:
imageVersion: ${{variables.containerImageVersion}}
stepsTemplate: 'dopapt-docker-steps.yml'

- template: ../templates/do-docker-jobs.yml
parameters:
targetOsArch: 'debian11_arm32'
imageVersion: ${{variables.containerImageVersion}}
stepsTemplate: 'dopapt-docker-steps.yml'

- template: ../templates/do-docker-jobs.yml
parameters:
targetOsArch: 'debian11_arm64'
imageVersion: ${{variables.containerImageVersion}}
stepsTemplate: 'dopapt-docker-steps.yml'

- template: ../templates/do-docker-jobs.yml
parameters:
targetOsArch: 'debian11_x64'
imageVersion: ${{variables.containerImageVersion}}
stepsTemplate: 'dopapt-docker-steps.yml'

- template: ../templates/do-docker-jobs.yml
parameters:
targetOsArch: 'ubuntu1804_arm64'
Expand All @@ -61,3 +79,14 @@ jobs:
imageVersion: ${{variables.containerImageVersion}}
stepsTemplate: 'dopapt-docker-steps.yml'

- template: ../templates/do-docker-jobs.yml
parameters:
targetOsArch: 'ubuntu2204_arm64'
imageVersion: ${{variables.containerImageVersion}}
stepsTemplate: 'dopapt-docker-steps.yml'

- template: ../templates/do-docker-jobs.yml
parameters:
targetOsArch: 'ubuntu2204_x64'
imageVersion: ${{variables.containerImageVersion}}
stepsTemplate: 'dopapt-docker-steps.yml'
30 changes: 30 additions & 0 deletions azure-pipelines/build/linux/du/docker/dosdkcpp-docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,24 @@ jobs:
imageVersion: ${{variables.containerImageVersion}}
stepsTemplate: 'dosdkcpp-docker-steps.yml'

- template: ../templates/do-docker-jobs.yml
parameters:
targetOsArch: 'debian11_arm32'
imageVersion: ${{variables.containerImageVersion}}
stepsTemplate: 'dosdkcpp-docker-steps.yml'

- template: ../templates/do-docker-jobs.yml
parameters:
targetOsArch: 'debian11_arm64'
imageVersion: ${{variables.containerImageVersion}}
stepsTemplate: 'dosdkcpp-docker-steps.yml'

- template: ../templates/do-docker-jobs.yml
parameters:
targetOsArch: 'debian11_x64'
imageVersion: ${{variables.containerImageVersion}}
stepsTemplate: 'dosdkcpp-docker-steps.yml'

- template: ../templates/do-docker-jobs.yml
parameters:
targetOsArch: 'ubuntu1804_arm64'
Expand All @@ -60,3 +78,15 @@ jobs:
targetOsArch: 'ubuntu2004_x64'
imageVersion: ${{variables.containerImageVersion}}
stepsTemplate: 'dosdkcpp-docker-steps.yml'

- template: ../templates/do-docker-jobs.yml
parameters:
targetOsArch: 'ubuntu2204_arm64'
imageVersion: ${{variables.containerImageVersion}}
stepsTemplate: 'dosdkcpp-docker-steps.yml'

- template: ../templates/do-docker-jobs.yml
parameters:
targetOsArch: 'ubuntu2204_x64'
imageVersion: ${{variables.containerImageVersion}}
stepsTemplate: 'dosdkcpp-docker-steps.yml'
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,14 @@ steps:
displayName: Login to ACR
inputs:
command: login
containerRegistry: doclientcontainerregistry
containerRegistry: doclient-dockercontainerregistry-buildpipeline # name of the service connection that connect the pipeline to the ACR
repository: $(parameters.targetOsArch)

- task: Docker@2
displayName: Pull latest build image
inputs:
command: pull
containerRegistry: doclientcontainerregistry
containerRegistry: doclient-dockercontainerregistry-buildpipeline # name of the service connection that connect the pipeline to the ACR
arguments: 'doclientcontainerregistry.azurecr.io/${{parameters.targetOsArch}}:${{parameters.imageVersion}}'

- task: CmdLine@2
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ steps:
inputs:
targetType: 'filePath'
filePath: 'build/scripts/check_binary_size.sh'
arguments: '1251928 /tmp/build-deliveryoptimization-agent/linux-${{parameters.config}}/client-lite/deliveryoptimization-agent'
arguments: '523672 /tmp/build-deliveryoptimization-agent/linux-${{parameters.config}}/client-lite/deliveryoptimization-agent'
displayName: 'Limit binary size increase'

- task: CmdLine@2
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,14 @@ steps:
displayName: Login to ACR
inputs:
command: login
containerRegistry: doclientcontainerregistry
containerRegistry: doclient-dockercontainerregistry-buildpipeline # name of the service connection that connect the pipeline to the ACR
repository: $(parameters.targetOsArch)

- task: Docker@2
displayName: Pull latest build image
inputs:
command: pull
containerRegistry: doclientcontainerregistry
containerRegistry: doclient-dockercontainerregistry-buildpipeline # name of the service connection that connect the pipeline to the ACR
arguments: 'doclientcontainerregistry.azurecr.io/${{parameters.targetOsArch}}:${{parameters.imageVersion}}'

- task: CmdLine@2
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,14 @@ steps:
displayName: Login to ACR
inputs:
command: login
containerRegistry: doclientcontainerregistry
containerRegistry: doclient-dockercontainerregistry-buildpipeline # name of the service connection that connect the pipeline to the ACR
repository: $(parameters.targetOsArch)

- task: Docker@2
displayName: Pull latest build image
inputs:
command: pull
containerRegistry: doclientcontainerregistry
containerRegistry: doclient-dockercontainerregistry-buildpipeline # name of the service connection that connect the pipeline to the ACR
arguments: 'doclientcontainerregistry.azurecr.io/${{parameters.targetOsArch}}:${{parameters.imageVersion}}'

- task: CmdLine@2
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ steps:
inputs:
targetType: 'filePath'
filePath: 'build/scripts/check_binary_size.sh'
arguments: '443632 /tmp/build-deliveryoptimization-sdk/linux-${{parameters.config}}/sdk-cpp/libdeliveryoptimization.so.*.*.*'
arguments: '596080 /tmp/build-deliveryoptimization-sdk/linux-${{parameters.config}}/sdk-cpp/libdeliveryoptimization.so.*.*.?'
displayName: 'Limit binary size increase'

- task: CmdLine@2
Expand Down
2 changes: 1 addition & 1 deletion azure-pipelines/build/windows/dosdkcpp.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ pr:
- sdk-cpp/build/cleanup-install.sh

pool:
vmImage: "windows-2019"
vmImage: "windows-2022"

jobs:
- job: Debug
Expand Down
20 changes: 20 additions & 0 deletions azure-pipelines/publishing/github-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,14 @@ stages:
parameters:
targetOsArch: 'ubuntu2004_arm64'
imageVersion: ${{variables.containerImageVersion}}
- template: templates/release-docker-build-steps.yml
parameters:
targetOsArch: 'ubuntu2204_x64'
imageVersion: ${{variables.containerImageVersion}}
- template: templates/release-docker-build-steps.yml
parameters:
targetOsArch: 'ubuntu2204_arm64'
imageVersion: ${{variables.containerImageVersion}}
- template: templates/release-docker-build-steps.yml
parameters:
targetOsArch: 'debian10_arm32'
Expand All @@ -72,6 +80,18 @@ stages:
parameters:
targetOsArch: 'debian10_x64'
imageVersion: ${{variables.containerImageVersion}}
- template: templates/release-docker-build-steps.yml
parameters:
targetOsArch: 'debian11_arm32'
imageVersion: ${{variables.containerImageVersion}}
- template: templates/release-docker-build-steps.yml
parameters:
targetOsArch: 'debian11_arm64'
imageVersion: ${{variables.containerImageVersion}}
- template: templates/release-docker-build-steps.yml
parameters:
targetOsArch: 'debian11_x64'
imageVersion: ${{variables.containerImageVersion}}

- stage: release
condition: succeeded()
Expand Down
34 changes: 34 additions & 0 deletions build/build-snaps.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
#! /bin/bash

# Copyright (c) Microsoft Corporation.
# Licensed under the MIT License.

set -e

if [ $1 == "agent" -o $1 == "sdk-tests" ]
then
echo "Building $1 snap..."

if [ ! -d "./snap" ]
then
mkdir ./snap
fi

if [ $1 == "agent" ]
then
cp ./snapcraft-options/snapcraft-agent.yaml ./snap/snapcraft.yaml

else
cp ./snapcraft-options/snapcraft-sdk.yaml ./snap/snapcraft.yaml
fi

if [ $2 -a $2 == "arm64" ]
then
snapcraft --target-arch=arm64 --destructive-mode --enable-experimental-target-arch
else
snapcraft
fi

else
echo "$1 is not a valid snap option, valid options are 'agent' or 'sdk-tests'"
fi
Loading