Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
6 changes: 5 additions & 1 deletion .github/workflows/build-android.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,8 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4.4.0
with:
persist-credentials: false
- name: Setup Java
uses: actions/setup-java@b6effb05e454b25005698d916606bdc6ffcbf961 # v5.7.0
with:
Expand Down Expand Up @@ -72,6 +74,8 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4.4.0
with:
persist-credentials: false
- name: Configure full JNI SDK
run: >-
cmake -S tests/android-storage -B out-no-exceptions -G Ninja
Expand Down Expand Up @@ -100,6 +104,7 @@ jobs:
- name: Checkout
uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4.4.0
with:
persist-credentials: false
submodules: false
- name: Update submodules
run: |
Expand All @@ -118,7 +123,6 @@ jobs:
- name: Install NDK
run: |
java -version
gci env:* | sort-object name
new-item "$Env:USERPROFILE\.android\repositories.cfg" -ItemType "file"
echo yes | sdkmanager "ndk-bundle" "cmake;3.22.1" "ndk;27.0.12077973" --sdk_root=$Env:ANDROID_SDK_ROOT
- name: Chocolatey
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/build-ios-mac.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,8 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4.4.0
with:
persist-credentials: false
- name: Configure SDK and Objective-C wrappers
run: >-
cmake -S . -B out-no-exceptions -G Xcode
Expand Down Expand Up @@ -84,6 +86,8 @@ jobs:
run: |
sudo chown -R $USER:staff /usr/local
- uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4.4.0
with:
persist-credentials: false
- name: Initialize googletest
run: git submodule update --init --depth=1 third_party/googletest
- name: build
Expand Down
10 changes: 10 additions & 0 deletions .github/workflows/build-posix-latest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,8 @@ jobs:
os: [ubuntu-latest, macos-latest]
steps:
- uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4.4.0
with:
persist-credentials: false
- name: Verify test-runner failure propagation
run: python3 tests/build-runner-tests.py

Expand All @@ -56,6 +58,8 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4.4.0
with:
persist-credentials: false
- name: Initialize googletest
run: git submodule update --init --depth=1 third_party/googletest
- name: Test ${{ matrix.os }} ${{ matrix.config }}
Expand All @@ -73,6 +77,8 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4.4.0
with:
persist-credentials: false
- name: Initialize googletest
run: git submodule update --init --depth=1 third_party/googletest
- name: Test Linux/macOS without native device-ID collection
Expand All @@ -98,6 +104,8 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4.4.0
with:
persist-credentials: false
- name: Install clang
run: sudo apt-get update && sudo apt-get install -y clang
- name: Compile each public header standalone under strict flags
Expand Down Expand Up @@ -128,6 +136,8 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4.4.0
with:
persist-credentials: false
- name: Install build dependencies
if: runner.os == 'Linux'
run: sudo apt-get update && sudo apt-get install -y clang libcurl4-openssl-dev libsqlite3-dev zlib1g-dev
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/build-ubuntu-2204.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,8 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4.4.0
with:
persist-credentials: false
- name: Initialize googletest
run: git submodule update --init --depth=1 third_party/googletest
- name: Test ${{ matrix.os }} ${{ matrix.config }}
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/build-windows-vs2022.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4.4.0
with:
persist-credentials: false
- name: Configure full SDK
shell: pwsh
run: |
Expand Down Expand Up @@ -63,6 +65,8 @@ jobs:

- name: Checkout
uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4.4.0
with:
persist-credentials: false

- name: Build
env:
Expand Down
9 changes: 6 additions & 3 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,8 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4.4.0
continue-on-error: true
with:
persist-credentials: false

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
Expand Down Expand Up @@ -88,6 +89,8 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4.4.0
with:
persist-credentials: false

- name: Initialize CodeQL
uses: github/codeql-action/init@5595ccaf912efad79be6eef63a5619ff05969be3 # v4.37.6
Expand All @@ -112,7 +115,8 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4.4.0
continue-on-error: true
with:
persist-credentials: false

- name: Update submodules
run: |
Expand All @@ -137,7 +141,6 @@ jobs:
- name: Install NDK
run: |
java -version
gci env:* | sort-object name
new-item "$Env:USERPROFILE\.android\repositories.cfg" -ItemType "file"
echo yes | sdkmanager "ndk-bundle" "cmake;3.22.1" "ndk;27.0.12077973" --sdk_root=$Env:ANDROID_SDK_ROOT
- name: Chocolatey
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/deploy-docs-pages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@ jobs:
steps:
- name: Check out repository
uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4.4.0
with:
persist-credentials: false

- name: Set up Python
uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/memory-leak-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,8 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4.4.0
with:
persist-credentials: false

- name: Test Dr. Memory report parsing
shell: pwsh
Expand Down Expand Up @@ -175,6 +177,8 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4.4.0
with:
persist-credentials: false

- name: Test Dr. Memory report parsing
shell: pwsh
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/spellcheck.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,8 @@ jobs:

- name: Checkout
uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4.4.0
continue-on-error: true
with:
persist-credentials: false

- name: install misspell
env:
Expand Down
16 changes: 16 additions & 0 deletions .github/workflows/test-embedding.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,8 @@ jobs:
disable-logging: ON
steps:
- uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4.4.0
with:
persist-credentials: false
- name: Install system dependencies
if: matrix.dependencies == 'system'
run: sudo apt-get update && sudo apt-get install -y libcurl4-openssl-dev libsqlite3-dev ninja-build zlib1g-dev
Expand Down Expand Up @@ -98,6 +100,8 @@ jobs:
runs-on: windows-2022
steps:
- uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4.4.0
with:
persist-credentials: false
- name: Configure
run: >
cmake -S tests/embedding -B build-embedding -A x64
Expand All @@ -120,6 +124,8 @@ jobs:
sqlite: [MINIMAL, VENDORED]
steps:
- uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4.4.0
with:
persist-credentials: false
- name: Install Linux HTTP dependencies
if: runner.os == 'Linux'
run: sudo apt-get update && sudo apt-get install -y libcurl4-openssl-dev
Expand Down Expand Up @@ -150,6 +156,8 @@ jobs:
mode: [system, fetched]
steps:
- uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4.4.0
with:
persist-credentials: false
- name: Install system dependencies
if: matrix.mode == 'system'
run: sudo apt-get update && sudo apt-get install -y libcurl4-openssl-dev libsqlite3-dev zlib1g-dev
Expand Down Expand Up @@ -195,6 +203,8 @@ jobs:
runs-on: macos-latest
steps:
- uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4.4.0
with:
persist-credentials: false
- name: Configure, install, and consume
run: |
cmake -G Ninja -S . -B build-package \
Expand Down Expand Up @@ -223,6 +233,8 @@ jobs:
architectures: [arm64, "arm64;x86_64"]
steps:
- uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4.4.0
with:
persist-credentials: false
- name: Configure
run: >
cmake -G Ninja -S tests/embedding -B build-embedding
Expand All @@ -247,6 +259,8 @@ jobs:
zlib-provider: VENDORED
steps:
- uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4.4.0
with:
persist-credentials: false
- name: Configure
run: >
cmake -G Xcode -S tests/embedding -B build-embedding
Expand All @@ -266,6 +280,8 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4.4.0
with:
persist-credentials: false
- name: Configure
run: >
cmake -G Ninja -S tests/embedding -B build-embedding
Expand Down
16 changes: 16 additions & 0 deletions .github/workflows/test-vcpkg.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,10 @@ on:
- main
- dev

# Least-privilege GITHUB_TOKEN scope: this workflow only reads source and
# clones public vcpkg; it never writes to the repository.
permissions:
contents: read

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
Expand All @@ -31,6 +35,8 @@ jobs:
os: [ubuntu-latest, windows-latest]
steps:
- uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4.4.0
with:
persist-credentials: false
- name: Test release port promotion
run: python tests/vcpkg/test-release-port.py
- name: Verify native feature mappings
Expand All @@ -50,6 +56,8 @@ jobs:
features: [default, "minimal-sqlite;no-exceptions;no-logging"]
steps:
- uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4.4.0
with:
persist-credentials: false

- name: Bootstrap vcpkg
run: |
Expand Down Expand Up @@ -78,6 +86,8 @@ jobs:
features: [default, minimal-sqlite, "minimal-sqlite;no-exceptions;no-logging"]
steps:
- uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4.4.0
with:
persist-credentials: false

- name: Bootstrap vcpkg
run: |
Expand All @@ -96,6 +106,8 @@ jobs:
name: macOS (native)
steps:
- uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4.4.0
with:
persist-credentials: false

- name: Bootstrap vcpkg
run: |
Expand All @@ -114,6 +126,8 @@ jobs:
name: iOS (arm64-ios cross-compile)
steps:
- uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4.4.0
with:
persist-credentials: false

- name: Bootstrap vcpkg
run: |
Expand All @@ -136,6 +150,8 @@ jobs:
features: [default, minimal-sqlite, "minimal-sqlite;android-curl-openssl", "minimal-sqlite;android-curl-mbedtls", "minimal-sqlite;no-exceptions;no-logging;android-capi-http-client"]
steps:
- uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4.4.0
with:
persist-credentials: false

- name: Bootstrap vcpkg
run: |
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/test-win-latest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,8 @@ jobs:

- name: Checkout
uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4.4.0
with:
persist-credentials: false

- name: setup-msbuild
uses: microsoft/setup-msbuild@6fb02220983dee41ce7ae257b6f4d8f9bf5ed4ce # v2.0.0
Expand Down Expand Up @@ -80,6 +82,8 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4.4.0
with:
persist-credentials: false
- name: Compile each public header standalone under /W4 /WX
shell: cmd
run: tests\headers\check_public_headers.cmd
4 changes: 4 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@
path = lib/modules
url = ../cpp_client_telemetry_modules.git
branch = master
# Private: skipped by default so recursive clones (and Dependabot) that lack
# access still check out the public submodules. Authorized users fetch it with
# `git submodule update --init --checkout lib/modules`.
update = none

[submodule "third_party/googletest"]
path = third_party/googletest
Expand Down
9 changes: 6 additions & 3 deletions docs/building-with-vcpkg.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,13 @@
The port provides the core SDK — the `MSTelemetry::mat` target and its public
C++ headers. The optional Microsoft-proprietary modules (Privacy Guard,
Sanitizer, ECS/EXP, Compliant-by-Default, AFD, CDS) are not part of the public
package; to use those, build from a source checkout with submodules:
package; to use those, build from a source checkout with the private
`lib/modules` submodule (requires access to that repository):

```console
git clone --recurse-submodules https://github.com/microsoft/cpp_client_telemetry
cd cpp_client_telemetry
git submodule update --init --checkout lib/modules
# then build with the repo's own CMake/build scripts
```

Expand Down Expand Up @@ -583,8 +586,8 @@ Older revisions of this overlay port could build the SDK with the private
`lib/modules` submodules from a local `--recurse-submodules` checkout. The port
now builds the core SDK from a pinned upstream commit, and the
`response_file_*.txt` shortcuts have been removed (use a standard triplet). If
you relied on the old flow for the proprietary modules, build from a
`--recurse-submodules` source checkout instead.
you relied on the old flow for the proprietary modules, build from a source
checkout with `lib/modules` fetched as shown at the top of this page instead.

## Troubleshooting

Expand Down
2 changes: 1 addition & 1 deletion docs/cpp-start-android.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ This tutorial guides you through the process of integrating the 1DS SDK into you

## 1. Clone the repository

Run `git clone https://github.com/microsoft/cpp_client_telemetry.git` to clone the repo. If your project requires UTC to send telemetry, you need to add `--recurse-submodules` when cloning to tell git to add `lib/modules` repo. You will be prompted to enter your credentials to clone. Use your MSFT GitHub username and GitHub token.
Run `git clone https://github.com/microsoft/cpp_client_telemetry.git` to clone the repo. If your project requires UTC to send telemetry, you need to fetch the private `lib/modules` submodule. The `lib/modules` submodule is skipped by default (`update = none` in `.gitmodules`); after cloning, run `git submodule update --init --checkout lib/modules` from the repo root to fetch it. You will be prompted to enter your credentials to clone. Use your MSFT GitHub username and GitHub token.

## 2. Build all

Expand Down
Loading
Loading