Skip to content

Commit 56471e2

Browse files
authored
Merge branch 'main' into user/nipahune/cherry-pic-bb3dc6c
2 parents b84da99 + 34046fc commit 56471e2

27 files changed

+409
-58
lines changed

.github/workflows/build-android.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ jobs:
4646
java -version
4747
gci env:* | sort-object name
4848
new-item "C:\Users\runneradmin\.android\repositories.cfg" -ItemType "file"
49-
echo yes | .\sdkmanager.bat "ndk-bundle" "cmake;3.10.2.4988404" "ndk;21.4.7075529" --sdk_root=$Env:ANDROID_SDK_ROOT
49+
echo yes | .\sdkmanager.bat "ndk-bundle" "cmake;3.10.2.4988404" "ndk;29.0.13599879" --sdk_root=$Env:ANDROID_SDK_ROOT
5050
working-directory: ${{ env.ANDROID_SDK_ROOT }}\cmdline-tools\7.0\bin
5151
- name: Chocolatey
5252
run: |
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: C/C++ CI on Ubuntu 18:04
1+
name: C/C++ CI on Ubuntu 22.04
22

33
on:
44
push:
@@ -28,11 +28,11 @@ jobs:
2828
strategy:
2929
matrix:
3030
config: [release, debug]
31-
os: [ubuntu-20.04]
31+
os: [ubuntu-22.04]
3232

3333
steps:
3434
- name: Checkout
3535
uses: actions/checkout@v1
3636
continue-on-error: true
3737
- name: Test ${{ matrix.os }} ${{ matrix.config }}
38-
run: ./build-tests.sh ${{ matrix.config }}
38+
run: ./build-tests.sh ${{ matrix.config }}

.github/workflows/build-windows-vs2019.yaml renamed to .github/workflows/build-windows-vs2022.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: C/C++ CI on Windows (vs2019)
1+
name: C/C++ CI on Windows (vs2022)
22

33
on:
44
push:
@@ -16,7 +16,7 @@ on:
1616
jobs:
1717
build:
1818

19-
runs-on: windows-2019
19+
runs-on: windows-2022
2020
name: Build
2121

2222
steps:
@@ -29,7 +29,7 @@ jobs:
2929
env:
3030
SKIP_ARM_BUILD: 1
3131
SKIP_ARM64_BUILD: 1
32-
PlatformToolset: v142
33-
VSTOOLS_VERSION: vs2019
32+
PlatformToolset: v143
33+
VSTOOLS_VERSION: vs2022
3434
shell: cmd
3535
run: build-all.bat

.github/workflows/codeql-analysis.yml

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ on:
1717
jobs:
1818
analyze:
1919
name: Analyze
20-
runs-on: windows-2019
20+
runs-on: windows-2022
2121
permissions:
2222
contents: read
2323
actions: read
@@ -28,7 +28,7 @@ jobs:
2828
matrix:
2929
# Override automatic language detection by changing the below list
3030
# Supported options are ['csharp', 'cpp', 'go', 'java', 'javascript', 'python']
31-
language: ['cpp', 'csharp', 'javascript', 'python']
31+
language: ['cpp', 'javascript', 'python']
3232
# Learn more...
3333
# https://docs.github.com/en/github/finding-security-vulnerabilities-and-errors-in-your-code/configuring-code-scanning#overriding-automatic-language-detection
3434

@@ -47,18 +47,17 @@ jobs:
4747
# Prefix the list here with "+" to use these queries and those in the config file.
4848
# queries: ./path/to/local/query, your-org/your-repo/queries@main
4949

50-
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
50+
# Autobuild attempts to build any compiled languages (C/C++, or Java).
5151
# If this step fails, then you should remove it and run the build manually (see below)
52-
# - name: Autobuild
53-
# uses: github/codeql-action/autobuild@v3
54-
- name: Build
52+
- name: Build C++
5553
env:
5654
SKIP_ARM_BUILD: 1
5755
SKIP_ARM64_BUILD: 1
58-
PlatformToolset: v142
59-
VSTOOLS_VERSION: vs2019
56+
PlatformToolset: v143
57+
VSTOOLS_VERSION: vs2022
58+
WindowsSDKVersion: 10.0.22621.0
6059
shell: cmd
61-
if: matrix.language == 'cpp' || matrix.language == 'csharp'
60+
if: matrix.language == 'cpp'
6261
run: build-all.bat
6362

6463
# ℹ️ Command-line programs to run using the OS shell.
@@ -116,7 +115,7 @@ jobs:
116115
java -version
117116
gci env:* | sort-object name
118117
new-item "C:\Users\runneradmin\.android\repositories.cfg" -ItemType "file"
119-
echo yes | .\sdkmanager.bat "ndk-bundle" "cmake;3.10.2.4988404" "ndk;21.4.7075529" --sdk_root=$Env:ANDROID_SDK_ROOT
118+
echo yes | .\sdkmanager.bat "ndk-bundle" "cmake;3.10.2.4988404" "ndk;29.0.13599879" --sdk_root=$Env:ANDROID_SDK_ROOT
120119
working-directory: ${{ env.ANDROID_SDK_ROOT }}\cmdline-tools\7.0\bin
121120
- name: Chocolatey
122121
run: |

.github/workflows/test-win-latest.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ jobs:
2727
matrix:
2828
arch: [Win32, x64]
2929
build: [Release, Debug]
30-
os: [windows-2019]
30+
os: [windows-2022]
3131

3232
steps:
3333

README.md

Lines changed: 12 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -65,38 +65,31 @@ Other resources to learn how to setup the build system:
6565

6666
| Operating System | Compiler |
6767
| ----------------------------- | -------------------------------- |
68-
| Mac OS X 10.11.6 | Clang Xcode 8.3 |
69-
| Mac OS X 10.12.6 | Clang Xcode 9.0, 9.1 |
70-
| Mac OS X 10.13.3 | Clang Xcode 9.2, 9.3, 10.0, 10.1 |
71-
| Raspbian GNU/Linux 8 (jessie) | GCC 4.9.2 (armv7l) |
72-
| Ubuntu 14.04.x LTS | GCC 5.x.x |
73-
| Ubuntu 16.04 LTS | GCC 5.x.x, GCC 5.x.x (armv7l) |
74-
| Ubuntu 18.04 LTS | GCC 7.5.x |
68+
| macOS 10.15+ | Clang Xcode 12.0+ |
69+
| Ubuntu 20.04 LTS | GCC 9.x.x |
70+
| Ubuntu 22.04 LTS | GCC 11.x.x |
7571
| Windows 10 | Android Studio/Gradle |
7672
| Windows Server 2016 | Visual Studio 2017 (vc141) |
77-
| Windows Server 2019 | Visual Studio 2019 (vc142) |
73+
| Windows Server 2022 | Visual Studio 2022 (vc143) |
7874

7975
## Target Platforms
8076

8177
| Target Platform | Supported | Covered by CI |
8278
| ------------------------------ | ------------------ | ------------------ |
8379
| Android | :white_check_mark: | :white_check_mark: |
84-
| iOS 10+ (simulator) | :white_check_mark: | :white_check_mark: |
85-
| iOS 10+ (arm64, arm64e) | :white_check_mark: | |
80+
| iOS 12+ (simulator) | :white_check_mark: | :white_check_mark: |
81+
| iOS 12+ (arm64, arm64e) | :white_check_mark: | |
8682
| Linux (x86, x64, arm, aarch64) | :white_check_mark: | |
87-
| Mac OS X 10.11+ | :white_check_mark: | |
88-
| Mac OS X (latest) | :white_check_mark: | :white_check_mark: |
89-
| Ubuntu 14.04.x LTS | :white_check_mark: | |
90-
| Ubuntu 16.04.x LTS | :white_check_mark: | |
91-
| Ubuntu 18.04.x LTS | :white_check_mark: | |
83+
| macOS 10.15+ | :white_check_mark: | |
84+
| macOS (latest) | :white_check_mark: | :white_check_mark: |
9285
| Ubuntu 20.04.x LTS | :white_check_mark: | :white_check_mark: |
86+
| Ubuntu 22.04.x LTS | :white_check_mark: | :white_check_mark: |
9387
| Ubuntu (latest) | :white_check_mark: | :white_check_mark: |
94-
| Windows 7.1 | :white_check_mark: | |
95-
| Windows 8.1 | :white_check_mark: | |
9688
| Windows 10.x | :white_check_mark: | |
97-
| Windows Server 2012 | :white_check_mark: | |
89+
| Windows 11 | :white_check_mark: | |
9890
| Windows Server 2016 | :white_check_mark: | |
99-
| Windows Server 2019 | :white_check_mark: | :white_check_mark: |
91+
| Windows Server 2019 | :white_check_mark: | |
92+
| Windows Server 2022 | :white_check_mark: | :white_check_mark: |
10093

10194
* **Supported** - these platforms are known to work well with the SDK in
10295
production.

build-android.cmd

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ pushd "%~dp0"
44
REM Users may override the default %ANDROID_SDK_ROOT% location if necessary
55

66
if "%ANDROID_SDK_ROOT%" == "" set "ANDROID_SDK_ROOT=C:\Android\android-sdk"
7-
if "%ANDROID_NDK_VERSION%" == "" set "ANDROID_NDK_VERSION=21.4.7075529"
7+
if "%ANDROID_NDK_VERSION%" == "" set "ANDROID_NDK_VERSION=29.0.13599879"
88
if "%ANDROID_CMAKE_VERSION%" == "" set "ANDROID_CMAKE_VERSION=3.10.2.4988404"
99
if "%ANDROID_HOME%" == "" set "ANDROID_HOME=%ANDROID_SDK_ROOT%"
1010
if "%ANDROID_NDK%" == "" set "ANDROID_NDK=%ANDROID_SDK_ROOT%\ndk\%ANDROID_NDK_VERSION%"

build-cmake-clang-vs2022.cmd

Lines changed: 81 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,81 @@
1+
@echo off
2+
3+
set VSTOOLS_VERSION=vs2022
4+
cd %~dp0
5+
6+
echo Update all public submodules...
7+
git -c submodule."lib/modules".update=none submodule update --init --recursive
8+
9+
if DEFINED GIT_PULL_TOKEN (
10+
rd /s /q lib\modules
11+
git clone https://%GIT_PULL_TOKEN%:x-oauth-basic@github.com/microsoft/cpp_client_telemetry_modules.git lib\modules
12+
)
13+
14+
call tools\vcvars.cmd
15+
16+
setlocal enableextensions
17+
setlocal enabledelayedexpansion
18+
set ROOT=%~dp0
19+
20+
REM ********************************************************************
21+
REM Use cmake
22+
REM ********************************************************************
23+
set "PATH=C:\Program Files\CMake\bin\;%PATH%"
24+
25+
REM ********************************************************************
26+
REM Use clang compiler
27+
REM ********************************************************************
28+
set CLANG_PATH="C:\Program Files\LLVM\bin"
29+
set CC=%CLANG_PATH%\clang.exe
30+
set CXX=%CLANG_PATH%\clang++.exe
31+
set LLVM_VER=ClangCL
32+
33+
REM ********************************************************************
34+
REM Set output directory, clean and/or create as-needed
35+
REM ********************************************************************
36+
set OUTDIR=%ROOT%\Solutions\out
37+
if "%1" == "clean" (
38+
@rmdir /s /q %OUTDIR%
39+
)
40+
if not exist "%OUTDIR%" mkdir %OUTDIR%
41+
42+
REM ********************************************************************
43+
REM Build all deps using MSVC - Visual Studio 2022 (17)
44+
REM ********************************************************************
45+
if "%1" == "nodeps" goto NODEPS
46+
call tools\build-deps.cmd
47+
:NODEPS
48+
49+
cd %OUTDIR%
50+
51+
REM ********************************************************************
52+
REM Invoke the build script
53+
REM ********************************************************************
54+
set CMAKE_PACKAGE_TYPE=tgz
55+
for %%a in ( m32 m64 ) do (
56+
for %%c in ( Release ) do (
57+
if "%%a"=="m32" (
58+
set ARCH=Win32
59+
set ARCH_GEN= Win32
60+
)
61+
if "%%a"=="m64" (
62+
set ARCH=x64
63+
set ARCH_GEN= x64
64+
)
65+
@mkdir %OUTDIR%\%%c\!ARCH!
66+
cd %OUTDIR%\%%c\!ARCH!
67+
set "CFLAGS=-%%a"
68+
set "CXXFLAGS=-%%a -Wc++11-compat-pedantic -Wno-c++98-compat -Wno-everything"
69+
cmake -G"Visual Studio 17 2022" -A !ARCH_GEN! ^
70+
-T"%LLVM_VER%" ^
71+
-DTARGET_ARCH=!ARCH! ^
72+
-DBUILD_SHARED_LIBS=OFF ^
73+
-DCMAKE_BUILD_TYPE=%%c ^
74+
-DCMAKE_PACKAGE_TYPE=%CMAKE_PACKAGE_TYPE% ^
75+
-DDEFAULT_PAL_IMPLEMENTATION=WIN32 ^
76+
%ROOT%
77+
cmake --build . --config %%c -- /p:Configuration=%%c
78+
)
79+
)
80+
81+
cd %ROOT%

docker/ubuntu22.04/Dockerfile

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
FROM ubuntu:22.04
2+
3+
ENV DEBIAN_FRONTEND noninteractive
4+
5+
# Package installation
6+
RUN apt-get update
7+
8+
## Common packages for linux build environment
9+
RUN apt install -y clang python3 pkg-config git curl nghttp2 bzip2 unzip make wget cmake sudo
10+
11+
RUN adduser --disabled-password --gecos '' docker
12+
RUN adduser docker sudo
13+
RUN echo '%sudo ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers
14+
## RUN useradd -m docker && echo "docker:docker" | chpasswd && adduser docker sudo
15+
## USER docker
16+
17+
# this is where I was running into problems with the other approaches
18+
RUN sudo apt-get update
19+
20+
CMD /bin/bash
21+
22+
# ENTRYPOINT bash

docs/cpp-start-android.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ Default environment variables used by `build-android.cmd` script:
2222

2323
```console
2424

25-
set "ANDROID_NDK_VERSION=21.4.7075529"
25+
set "ANDROID_NDK_VERSION=29.0.13599879"
2626
set "ANDROID_CMAKE_VERSION=3.10.2.4988404"
2727
set "ANDROID_SDK_ROOT=C:\Android\android-sdk"
2828
set "ANDROID_HOME=%ANDROID_SDK_ROOT%"

0 commit comments

Comments
 (0)