Skip to content

Commit 04bf681

Browse files
committed
Switch to modern build infrastructure
Signed-off-by: Pierre R. Mai <[email protected]>
1 parent 9a554ec commit 04bf681

File tree

2 files changed

+59
-108
lines changed

2 files changed

+59
-108
lines changed

.github/workflows/build.yaml

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
name: CI Builds
2+
3+
on:
4+
# execute on every PR made targeting the branches bellow
5+
pull_request:
6+
branches:
7+
- main
8+
9+
# execute on every push
10+
push:
11+
12+
# execute on trigger
13+
repository_dispatch:
14+
types: [examples-build]
15+
16+
jobs:
17+
build-osmp-examples:
18+
name: Build OSMP Examples
19+
strategy:
20+
fail-fast: false
21+
matrix:
22+
os: [windows-latest, ubuntu-latest, macos-latest]
23+
runs-on: ${{ matrix.os }}
24+
steps:
25+
- name: Checkout
26+
uses: actions/checkout@v4
27+
with:
28+
submodules: recursive
29+
30+
- name: Get CMake
31+
uses: lukka/get-cmake@latest
32+
33+
- name: Cache vcpkg
34+
uses: actions/cache@v4
35+
with:
36+
path: ${{ github.workspace }}/vcpkg_cache
37+
key: vcpkg-${{ runner.os }}-${{ runner.arch }}-${{ hashFiles('vcpkg.json', 'vcpkg-configuration.json', 'CMakePresets.json') }}
38+
39+
- name: Setup vcpkg
40+
uses: lukka/run-vcpkg@v11
41+
with:
42+
vcpkgJsonGlob: '**/examples/vcpkg.json'
43+
vcpkgConfigurationJsonGlob: '**/examples/vcpkg-configuration.json'
44+
45+
- name: Build examples
46+
uses: lukka/run-cmake@v10
47+
env:
48+
VCPKG_BINARY_SOURCES: clear;files,${{ github.workspace }}/vcpkg_cache,readwrite
49+
with:
50+
makeListsTxtPath: "${{ github.workspace }}/examples/CMakeLists.txt"
51+
configurePreset: vcpkg
52+
buildPreset: vcpkg
53+
buildPresetAdditionalArgs: "['--config Release']"
54+
55+
- name: Upload build artifacts
56+
uses: actions/upload-artifact@v4
57+
with:
58+
name: Examples-${{ runner.os }}
59+
path: examples/build

.github/workflows/protobuf.yml

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

0 commit comments

Comments
 (0)