Skip to content

Commit 4a31995

Browse files
committed
fuck it we ball
1 parent 3be2d65 commit 4a31995

2 files changed

Lines changed: 66 additions & 210 deletions

File tree

.github/workflows/cmake-multi-platform.yml

Lines changed: 0 additions & 210 deletions
This file was deleted.

.github/workflows/cmake.yml

Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
# Copyright (c) 2019-2020-2021-2022-2023 Luca Cappa
2+
# Released under the term specified in file LICENSE.txt
3+
# SPDX short identifier: MIT
4+
#
5+
# The peculiarity of this workflow is that assumes vcpkg stored as a submodule of
6+
# this repository.
7+
# The workflow does the following:
8+
# - Sets up vcpkg if needed, then run CMake with CMakePreset.json using a configuration
9+
# that leverages the vcpkg's toolchain file. This will automatically run vcpkg to install
10+
# dependencies described by the vcpkg.json manifest file.
11+
# vcpkg's Binary Caching backed by GH Action cache is being used. It will be a no-op if
12+
# dependencies are restored from GH Action cache.
13+
# - Finally builds the sources with Ninja.
14+
name: hosted-ninja-vcpkg_submod-cacheoff
15+
on: [push, workflow_dispatch]
16+
17+
jobs:
18+
job:
19+
name: ${{ matrix.os }}-${{ github.workflow }}
20+
runs-on: ${{ matrix.os }}
21+
strategy:
22+
fail-fast: false
23+
matrix:
24+
os: [ubuntu-latest, macos-latest, windows-latest]
25+
26+
steps:
27+
- uses: actions/checkout@v3
28+
with:
29+
submodules: true
30+
# This is useful to avoid https://github.com/microsoft/vcpkg/issues/25349
31+
# which is caused by missing Git history on the vcpkg submodule which ports
32+
# try to access.
33+
# Do not use if not needed, since it slows down the checkout of sources.
34+
fetch-depth: 0
35+
36+
- uses: lukka/get-cmake@latest
37+
- name: List $RUNNER_WORKSPACE before vcpkg is setup
38+
run: find $RUNNER_WORKSPACE
39+
shell: bash
40+
41+
- name: Setup vcpkg
42+
uses: lukka/run-vcpkg@v11
43+
id: runvcpkg
44+
with:
45+
vcpkgArguments: '@vcpkg.json'
46+
47+
- name: List $RUNNER_WORKSPACE before build
48+
run: find $RUNNER_WORKSPACE
49+
shell: bash
50+
- name: Prints output of run-vcpkg's action.
51+
run: echo "root='${{ steps.runvcpkg.outputs.RUNVCPKG_VCPKG_ROOT_OUT }}', triplet='${{ steps.runvcpkg.outputs.RUNVCPKG_VCPKG_DEFAULT_TRIPLET_OUT }}' "
52+
- name: Run CMake+vcpkg+Ninja
53+
uses: lukka/run-cmake@v10
54+
id: runcmake
55+
with:
56+
cmakeListsTxtPath: '${{ github.workspace }}/cmakepresets/CMakeLists.txt'
57+
configurePreset: 'ninja-multi-vcpkg'
58+
buildPreset: 'ninja-multi-vcpkg'
59+
- name: List $RUNNER_WORKSPACE after build
60+
run: find $RUNNER_WORKSPACE
61+
shell: bash
62+
- name: Upload build directory
63+
uses: actions/upload-artifact@v4
64+
with:
65+
name: build-${{ matrix.os }}-${{ github.workflow }}
66+
path: $RUNNER_WORKSPACE/build

0 commit comments

Comments
 (0)