Skip to content

Commit

Permalink
Test/run cmake package preset (#27)
Browse files Browse the repository at this point in the history
* test run-cmake@dev/package-preset

* use run-cmake@v10
  • Loading branch information
lukka committed Nov 5, 2023
1 parent 116dd0b commit d70f79f
Show file tree
Hide file tree
Showing 16 changed files with 43 additions and 19 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/hosted-cmake-workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
with:
submodules: true

- uses: lukka/get-cmake@latest
- uses: lukka/get-cmake@main
- name: dir
run: find $RUNNER_WORKSPACE
shell: bash
Expand All @@ -38,7 +38,7 @@ jobs:
run: echo "root='${{ steps.runvcpkg.outputs.RUNVCPKG_VCPKG_ROOT_OUT }}', triplet='${{ steps.runvcpkg.outputs.RUNVCPKG_VCPKG_DEFAULT_TRIPLET_OUT }}' "

- name: Run CMake-Workflow+vcpkg+Ninja
uses: lukka/run-cmake@main
uses: lukka/run-cmake@v10
id: runcmake
with:
cmakeListsTxtPath: '${{ github.workspace }}/cmakepresets/CMakeLists.txt'
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/hosted-contexts-dump.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ jobs:
- name: dir
run: gci -recurse ${{ runner.workspace }}
if: contains( runner.os, 'windows')
- uses: lukka/get-cmake@latest
- uses: lukka/get-cmake@main
- name: Setup vcpkg
uses: lukka/run-vcpkg@main
id: runvcpkg
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/hosted-dump-logs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ jobs:
with:
submodules: true

- uses: lukka/get-cmake@latest
- uses: lukka/get-cmake@main
- name: dir
run: find $RUNNER_WORKSPACE
shell: bash
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/hosted-get-cmake-local-cache-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
with:
submodules: true

- uses: lukka/get-cmake@latest
- uses: lukka/get-cmake@main
with:
useLocalCache: true
useCloudCache: false
Expand All @@ -36,7 +36,7 @@ jobs:
- name: Dump the content of $RUNNER_WORKSPACE
run: find $RUNNER_WORKSPACE
shell: bash
- uses: lukka/get-cmake@latest
- uses: lukka/get-cmake@main
with:
useLocalCache: true
useCloudCache: false
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/hosted-matchers.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ jobs:
with:
submodules: true

- uses: lukka/get-cmake@latest
- uses: lukka/get-cmake@main

- uses: ilammy/msvc-dev-cmd@v1

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/hosted-msbuild-vcpkg_submod.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
with:
submodules: true

- uses: lukka/get-cmake@latest
- uses: lukka/get-cmake@main
- name: dir
run: find $RUNNER_WORKSPACE
shell: bash
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/hosted-ninja-toolchain-vcpkg_submod.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
with:
submodules: true

- uses: lukka/get-cmake@latest
- uses: lukka/get-cmake@main
- name: dir
run: find $RUNNER_WORKSPACE
shell: bash
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/hosted-ninja-vcpkg-install.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ jobs:
with:
submodules: true

- uses: lukka/get-cmake@latest
- uses: lukka/get-cmake@main
- name: List $RUNNER_WORKSPACE before build
run: find $RUNNER_WORKSPACE
shell: bash
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/hosted-ninja-vcpkg.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ jobs:
with:
submodules: true

- uses: lukka/get-cmake@latest
- uses: lukka/get-cmake@main
- name: Dump the content of $RUNNER_TEMP
run: find $RUNNER_TEMP
shell: bash
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/hosted-ninja-vcpkg_submod-autocache.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ jobs:
# try to access.
fetch-depth: 0

- uses: lukka/get-cmake@latest
- uses: lukka/get-cmake@main
- name: List $RUNNER_WORKSPACE before vcpkg is setup
run: find $RUNNER_WORKSPACE
shell: bash
Expand All @@ -60,6 +60,7 @@ jobs:
cmakeListsTxtPath: '${{ github.workspace }}/cmakepresets/CMakeLists.txt'
configurePreset: 'ninja-multi-vcpkg'
buildPreset: 'ninja-multi-vcpkg'
packagePreset: 'ninja-multi-vcpkg'
- name: List $RUNNER_WORKSPACE after build
run: find $RUNNER_WORKSPACE
shell: bash
2 changes: 1 addition & 1 deletion .github/workflows/hosted-ninja-vcpkg_submod-triplet.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ jobs:
with:
submodules: true

- uses: lukka/get-cmake@latest
- uses: lukka/get-cmake@main
- name: dir
run: find $RUNNER_WORKSPACE
shell: bash
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/hosted-ninja-vcpkg_submod.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ jobs:
# Do not use if not needed, since it slows down the checkout of sources.
fetch-depth: 0

- uses: lukka/get-cmake@latest
- uses: lukka/get-cmake@main
- name: List $RUNNER_WORKSPACE before vcpkg is setup
run: find $RUNNER_WORKSPACE
shell: bash
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ This repository contains [GitHub workflows](https://github.com/lukka/CppBuildTas
- the [**run-cmake** GitHub action](https://github.com/marketplace/actions/run-cmake);
- the [**run-cmake** and the **run-vcpkg** tasks provided by CppBuildTasks](https://marketplace.visualstudio.com/items?itemName=lucappa.cmake-ninja-vcpkg-tasks) extension for [Azure DevOps](https://azure.microsoft.com/en-us/services/devops/).

Essentially the yaml definitions exercise the actions and the tasks to verify the successful exection in different scenarios (e.g. platforms, toolsets, environment).
Essentially the yaml definitions exercise the actions and the tasks to verify the successful execution in different scenarios (e.g. platforms, toolsets, environment).

# License
All the content in this repository is licensed under the [MIT License](LICENSE.txt).

Copyright (c) 2019-2020-2021 Luca Cappa
Copyright (c) 2019-2020-2021-2022-2023 Luca Cappa
1 change: 1 addition & 0 deletions cmakepresets/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,4 @@ target_sources(main PRIVATE test.cpp)
target_link_libraries(main PRIVATE unofficial::sqlite3::sqlite3)
set_property(TARGET main PROPERTY CXX_STANDARD 20)

include(CPack)
25 changes: 24 additions & 1 deletion cmakepresets/CMakePresets.json
Original file line number Diff line number Diff line change
Expand Up @@ -110,5 +110,28 @@
}
]
}
]
],
"packagePresets": [
{
"packageName": "default-package-name",
"packageVersion": "0.1",
"name": "default",
"configurePreset": "ninja",
"generators": [
"TGZ"
]
},
{
"packageName": "default-multi-package-name",
"packageVersion": "0.1",
"name": "ninja-multi-vcpkg",
"configurePreset": "ninja-multi-vcpkg",
"generators": [
"TGZ"
],
"configurations": [
"Debug"
]
}
]
}
3 changes: 1 addition & 2 deletions cmakepresets/vcpkg.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
"version-string": "0.0.1",
"dependencies": [
"boost-config",
"sqlite3",
"boost"
"sqlite3"
]
}

0 comments on commit d70f79f

Please sign in to comment.