Skip to content

Commit

Permalink
build: Update to copier-cpp template v0.3.2
Browse files Browse the repository at this point in the history
  • Loading branch information
BurningEnlightenment committed Nov 22, 2023
1 parent 5d45459 commit 3933a50
Show file tree
Hide file tree
Showing 11 changed files with 46 additions and 95 deletions.
2 changes: 1 addition & 1 deletion .copier-answers.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Changes here will be overwritten by Copier
_commit: v0.3.1
_commit: v0.3.2
_src_path: gh:deeplex/copier-cpp
email: [email protected]
full_name: Henrik Steffen Gaßmann
Expand Down
64 changes: 0 additions & 64 deletions .devcontainer/Dockerfile

This file was deleted.

4 changes: 1 addition & 3 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,7 @@
// README at: https://github.com/devcontainers/templates/tree/main/src/cpp
{
"name": "C++",
"build": {
"dockerfile": "Dockerfile"
},
"image": "ghcr.io/deeplex/devcontainer-cpp:ubuntu-22.04",
"customizations": {
"vscode": {
"extensions": [
Expand Down
37 changes: 25 additions & 12 deletions .github/workflows/cpp-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,21 @@ jobs:
include:
- os: macos-13
triplet: x64-macos
- os: macos-13
compiler: clang
triplet: x64-macos
install: |
HOMEBREW_NO_INSTALLED_DEPENDENTS_CHECK=1 brew install llvm@16
- os: ubuntu-22.04
triplet: x64-linux
- os: ubuntu-22.04
triplet: x64-linux
compiler: clang
install: |
sudo cp tools/llvm-snapshot.gpg.key.asc /etc/apt/trusted.gpg.d/llvm-snapshot.asc
sudo add-apt-repository "deb http://apt.llvm.org/jammy/ llvm-toolchain-jammy-16 main"
sudo apt-get -qq update
sudo apt-get -qq -y install clang-16
- os: windows-2022
triplet: x64-windows

Expand All @@ -37,17 +50,19 @@ jobs:
steps:
- uses: actions/checkout@v3

- name: Install required packages / compilers
if: ${{ matrix.install }}
run: ${{ matrix.install }}

- uses: lukka/get-cmake@latest
with:
cmakeVersion: 3.22.6

- name: Initialize vcpkg
uses: lukka/run-vcpkg@v10
uses: lukka/run-vcpkg@v11
with:
vcpkgDirectory: ${{ github.workspace }}/build/vcpkg
vcpkgGitCommitId: f6a5d4e8eb7476b8d7fc12a56dff300c1c986131
prependedCacheKey: compiler=${{ matrix.compiler }}
#appendedCacheKey: r00
vcpkgGitCommitId: a42af01b72c28a8e1d7b48107b33e4f286a55ef6

- name: Build ${{ matrix.triplet }}-${{ matrix.compiler }} preset
uses: lukka/run-cmake@v10
Expand Down Expand Up @@ -83,24 +98,22 @@ jobs:
steps:
- uses: actions/checkout@v3

- name: "Install clang-tools-15"
- name: "Install clang-tools-16"
run: |
sudo cp ${{ github.workspace }}/tools/llvm-snapshot.gpg.key.asc /etc/apt/trusted.gpg.d/llvm-snapshot.asc
sudo add-apt-repository "deb http://apt.llvm.org/jammy/ llvm-toolchain-jammy-15 main"
sudo add-apt-repository "deb http://apt.llvm.org/jammy/ llvm-toolchain-jammy-16 main"
sudo apt-get -qq update
sudo apt-get -qq -y install clang-15 clang-tidy-15 clang-format-15
sudo apt-get -qq -y install clang-16 clang-tidy-16 clang-format-16
- uses: lukka/get-cmake@latest
with:
cmakeVersion: 3.22.6

- name: Initialize vcpkg
uses: lukka/run-vcpkg@v10
uses: lukka/run-vcpkg@v11
with:
vcpkgDirectory: ${{ github.workspace }}/../vcpkg
vcpkgGitCommitId: f6a5d4e8eb7476b8d7fc12a56dff300c1c986131
prependedCacheKey: compiler=clang-15
#appendedCacheKey: r00
vcpkgGitCommitId: a42af01b72c28a8e1d7b48107b33e4f286a55ef6

- name: Configure x64-linux-clang preset
uses: lukka/run-cmake@v10
Expand All @@ -113,7 +126,7 @@ jobs:
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
version: 15.0.7
version: 16.0.6
style: file # use .clang-format settings
tidy-checks: '' # use .clang-tidy settings
extensions: cpp,hpp
Expand Down
12 changes: 6 additions & 6 deletions CMakePresets.json
Original file line number Diff line number Diff line change
Expand Up @@ -126,8 +126,8 @@
"x64-linux"
],
"cacheVariables": {
"VCPKG_TARGET_TRIPLET": "x64-linux-clang",
"VCPKG_CHAINLOAD_TOOLCHAIN_FILE": "${sourceDir}/tools/toolchains/x64-linux-clang.cmake"
"VCPKG_TARGET_TRIPLET": "x64-linux-clang-16",
"VCPKG_CHAINLOAD_TOOLCHAIN_FILE": "${sourceDir}/tools/toolchains/x64-linux-clang-16.cmake"
}
},
{
Expand All @@ -136,8 +136,8 @@
"x64-linux-clang"
],
"cacheVariables": {
"VCPKG_TARGET_TRIPLET": "x64-linux-clang-15",
"VCPKG_CHAINLOAD_TOOLCHAIN_FILE": "${sourceDir}/tools/toolchains/x64-linux-clang-15.cmake",
"VCPKG_TARGET_TRIPLET": "x64-linux-clang-16",
"VCPKG_CHAINLOAD_TOOLCHAIN_FILE": "${sourceDir}/tools/toolchains/x64-linux-clang-16.cmake",
"CMAKE_EXPORT_COMPILE_COMMANDS": true
}
},
Expand Down Expand Up @@ -171,8 +171,8 @@
"name": "x64-macos-clang",
"inherits": [ "x64-macos" ],
"cacheVariables": {
"VCPKG_TARGET_TRIPLET": "x64-osx-clang-15-brew",
"VCPKG_CHAINLOAD_TOOLCHAIN_FILE": "${sourceDir}/tools/toolchains/x64-macos-clang-15-brew.cmake"
"VCPKG_TARGET_TRIPLET": "x64-osx-clang-16-brew",
"VCPKG_CHAINLOAD_TOOLCHAIN_FILE": "${sourceDir}/tools/toolchains/x64-macos-clang-16-brew.cmake"
}
},
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
set(CMAKE_SYSTEM_PROCESSOR AMD64)

set(CMAKE_C_COMPILER clang-15)
set(CMAKE_CXX_COMPILER clang++-15)
set(CMAKE_C_COMPILER clang-16)
set(CMAKE_CXX_COMPILER clang++-16)

set(CMAKE_C_STANDARD 17)
set(CMAKE_CXX_STANDARD 20)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
set(CMAKE_SYSTEM_PROCESSOR AMD64)

execute_process(COMMAND brew --prefix llvm@15 OUTPUT_VARIABLE BREW_LLVM_PATH OUTPUT_STRIP_TRAILING_WHITESPACE)
execute_process(COMMAND brew --prefix llvm@16 OUTPUT_VARIABLE BREW_LLVM_PATH OUTPUT_STRIP_TRAILING_WHITESPACE)

set(CMAKE_C_COMPILER "${BREW_LLVM_PATH}/bin/clang")
set(CMAKE_CXX_COMPILER "${BREW_LLVM_PATH}/bin/clang++")
set(CMAKE_OSX_SYSROOT /Applications/Xcode_14.3.1.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk)
set(CMAKE_OSX_SYSROOT /Applications/Xcode_15.0.1.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk)

set(CMAKE_C_STANDARD 17)
set(CMAKE_CXX_STANDARD 20)

set(CMAKE_CXX_FLAGS_INIT "-fsized-deallocation -fexperimental-library")
set(CMAKE_CXX_FLAGS_INIT "-fsized-deallocation")
2 changes: 1 addition & 1 deletion tools/toolchains/x64-macos-gcc-12.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ set(CMAKE_SYSTEM_PROCESSOR AMD64)

set(CMAKE_C_COMPILER gcc-12)
set(CMAKE_CXX_COMPILER g++-12)
set(CMAKE_OSX_SYSROOT /Applications/Xcode_14.3.1.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk)
set(CMAKE_OSX_SYSROOT /Applications/Xcode_15.0.1.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk)

set(CMAKE_C_STANDARD 17)
set(CMAKE_CXX_STANDARD 20)
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ set(VCPKG_CRT_LINKAGE dynamic)
set(VCPKG_LIBRARY_LINKAGE static)

set(VCPKG_CMAKE_SYSTEM_NAME Linux)
set(VCPKG_CHAINLOAD_TOOLCHAIN_FILE "${CMAKE_CURRENT_LIST_DIR}/../toolchains/x64-linux-clang-15.cmake")
set(VCPKG_CHAINLOAD_TOOLCHAIN_FILE "${CMAKE_CURRENT_LIST_DIR}/../toolchains/x64-linux-clang-16.cmake")
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,8 @@ set(VCPKG_LIBRARY_LINKAGE static)

set(VCPKG_CMAKE_SYSTEM_NAME Darwin)
set(VCPKG_OSX_ARCHITECTURES x86_64)
set(VCPKG_CHAINLOAD_TOOLCHAIN_FILE "${CMAKE_CURRENT_LIST_DIR}/../toolchains/x64-macos-clang-15-brew.cmake")
set(VCPKG_CHAINLOAD_TOOLCHAIN_FILE "${CMAKE_CURRENT_LIST_DIR}/../toolchains/x64-macos-clang-16-brew.cmake")

if(PORT STREQUAL "status-code")
set(VCPKG_CMAKE_CONFIGURE_OPTIONS "-DBUILD_TESTING=OFF")
endif()
2 changes: 1 addition & 1 deletion vcpkg-configuration.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"$schema": "https://raw.githubusercontent.com/microsoft/vcpkg-tool/main/docs/vcpkg-configuration.schema.json",
"default-registry": {
"kind": "builtin",
"baseline": "f6a5d4e8eb7476b8d7fc12a56dff300c1c986131"
"baseline": "a42af01b72c28a8e1d7b48107b33e4f286a55ef6"
},
"registries": [
{
Expand Down

0 comments on commit 3933a50

Please sign in to comment.