-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
test for run-vcpkg@dev/vcpkgconfjson-support
- Loading branch information
Showing
21 changed files
with
348 additions
and
28 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
58 changes: 58 additions & 0 deletions
58
.github/workflows/hosted-vcpkgconfigurationjson-support.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
# Copyright (c) 2019-2020-2021-2022-2023 Luca Cappa | ||
# Released under the term specified in file LICENSE.txt | ||
# SPDX short identifier: MIT | ||
# | ||
# The workflow does the following: | ||
# - Instead of providing the Git commit id of the vcpkg repository, the registry builtin | ||
# baseline from vcpkg-configuration.json is being used. | ||
|
||
name: hosted-ninja-vcpkg-no-submod-nogitcommitid_vcpkgconfjson-cacheoff | ||
on: [push, workflow_dispatch] | ||
|
||
jobs: | ||
job: | ||
name: ${{ matrix.os }}-${{ github.workflow }} | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
os: [ubuntu-latest, macos-latest, windows-latest] | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
submodules: true | ||
# This is useful to avoid https://github.com/microsoft/vcpkg/issues/25349 | ||
# which is caused by missing Git history on the vcpkg submodule which ports | ||
# try to access. | ||
# Do not use if not needed, since it slows down the checkout of sources. | ||
fetch-depth: 0 | ||
|
||
- uses: lukka/get-cmake@latest | ||
- name: List $RUNNER_WORKSPACE before vcpkg is setup | ||
run: find $RUNNER_WORKSPACE | ||
shell: bash | ||
|
||
- name: Setup vcpkg | ||
uses: lukka/run-vcpkg@dev/vcpkgconfjson-support | ||
id: runvcpkg | ||
with: | ||
# This one is deliberately pointing to a non existing directory (so that vcpkg is not identified as a submodule of this repository). | ||
vcpkgDirectory: '${{ github.workspace }}/vcpkg-support-json-test/vcpkg' | ||
vcpkgJsonGlob: '**/cmakepresets/vcpkg.json' | ||
|
||
- name: List $RUNNER_WORKSPACE before build | ||
run: find $RUNNER_WORKSPACE | ||
shell: bash | ||
- name: Prints output of run-vcpkg's action. | ||
run: echo "root='${{ steps.runvcpkg.outputs.RUNVCPKG_VCPKG_ROOT_OUT }}', triplet='${{ steps.runvcpkg.outputs.RUNVCPKG_VCPKG_DEFAULT_TRIPLET_OUT }}' " | ||
- name: Run CMake+vcpkg+Ninja | ||
uses: lukka/run-cmake@v10 | ||
id: runcmake | ||
with: | ||
cmakeListsTxtPath: '${{ github.workspace }}/cmakepresets/CMakeLists.txt' | ||
configurePreset: 'ninja-multi-vcpkg' | ||
buildPreset: 'ninja-multi-vcpkg' | ||
- name: List $RUNNER_WORKSPACE after build | ||
run: find $RUNNER_WORKSPACE | ||
shell: bash |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
# Copyright (c) 2019-2020-2021-2022-2023 Luca Cappa | ||
# Released under the term specified in file LICENSE.txt | ||
# SPDX short identifier: MIT | ||
# | ||
# The workflow does the following: | ||
# - Instead of providing the Git commit id of the vcpkg repository, the builtin baseline | ||
# from vcpkg.json is being used. | ||
|
||
name: hosted-ninja-vcpkg-no-submod-nogitcommitid_vcpkgjson-cacheoff | ||
on: [push, workflow_dispatch] | ||
|
||
jobs: | ||
job: | ||
name: ${{ matrix.os }}-${{ github.workflow }} | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
os: [ubuntu-latest, macos-latest, windows-latest] | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
submodules: true | ||
# This is useful to avoid https://github.com/microsoft/vcpkg/issues/25349 | ||
# which is caused by missing Git history on the vcpkg submodule which ports | ||
# try to access. | ||
# Do not use if not needed, since it slows down the checkout of sources. | ||
fetch-depth: 0 | ||
|
||
- uses: lukka/get-cmake@latest | ||
- name: List $RUNNER_WORKSPACE before vcpkg is setup | ||
run: find $RUNNER_WORKSPACE | ||
shell: bash | ||
|
||
- name: Setup vcpkg | ||
uses: lukka/run-vcpkg@dev/vcpkgconfjson-support | ||
id: runvcpkg | ||
with: | ||
# This one is deliberately pointing to a non existing directory (so that vcpkg is not identified as a submodule of this repository). | ||
vcpkgDirectory: '${{ github.workspace }}/cmakepresets+vcpkgconfigurejson/vcpkg' | ||
|
||
- name: List $RUNNER_WORKSPACE before build | ||
run: find $RUNNER_WORKSPACE | ||
shell: bash | ||
- name: Prints output of run-vcpkg's action. | ||
run: echo "root='${{ steps.runvcpkg.outputs.RUNVCPKG_VCPKG_ROOT_OUT }}', triplet='${{ steps.runvcpkg.outputs.RUNVCPKG_VCPKG_DEFAULT_TRIPLET_OUT }}' " | ||
- name: Run CMake+vcpkg+Ninja | ||
uses: lukka/run-cmake@v10 | ||
id: runcmake | ||
with: | ||
cmakeListsTxtPath: '${{ github.workspace }}/cmakepresets/CMakeLists.txt' | ||
configurePreset: 'ninja-multi-vcpkg' | ||
buildPreset: 'ninja-multi-vcpkg' | ||
- name: List $RUNNER_WORKSPACE after build | ||
run: find $RUNNER_WORKSPACE | ||
shell: bash |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
# CMakeLists.txt | ||
|
||
# Ensure to pick up the default triplet from the environment if any. This helps | ||
# driving the vcpkg triplet in the same way either when starting vcpkg directly, | ||
# or when letting CMake start vcpkg at configure/generate time. | ||
# Note: this logic must happen before PROJECT command. | ||
if(DEFINED ENV{VCPKG_DEFAULT_TRIPLET} AND NOT DEFINED VCPKG_TARGET_TRIPLET) | ||
set(VCPKG_TARGET_TRIPLET "$ENV{VCPKG_DEFAULT_TRIPLET}" CACHE STRING "The vcpkg triplet") | ||
endif() | ||
|
||
cmake_minimum_required(VERSION 3.0) | ||
project(test) | ||
|
||
find_package(unofficial-sqlite3 CONFIG REQUIRED) | ||
|
||
add_executable(main) | ||
target_sources(main PRIVATE test.cpp) | ||
target_link_libraries(main PRIVATE unofficial::sqlite3::sqlite3) | ||
set_property(TARGET main PROPERTY CXX_STANDARD 20) | ||
|
||
include(CPack) |
Oops, something went wrong.