Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
59 changes: 59 additions & 0 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
name: CI Builds

on:
# execute on every PR made targeting the branches bellow
pull_request:
branches:
- main

# execute on every push
push:

# execute on trigger
repository_dispatch:
types: [examples-build]

jobs:
build-osmp-examples:
name: Build OSMP Examples
strategy:
fail-fast: false
matrix:
os: [windows-latest, ubuntu-latest, macos-latest]
runs-on: ${{ matrix.os }}
steps:
- name: Checkout
uses: actions/checkout@v4
with:
submodules: recursive

- name: Get CMake
uses: lukka/get-cmake@latest

- name: Cache vcpkg
uses: actions/cache@v4
with:
path: ${{ github.workspace }}/vcpkg_cache
key: vcpkg-${{ runner.os }}-${{ runner.arch }}-${{ hashFiles('vcpkg.json', 'vcpkg-configuration.json', 'CMakePresets.json') }}

- name: Setup vcpkg
uses: lukka/run-vcpkg@v11
with:
vcpkgJsonGlob: '**/examples/vcpkg.json'
vcpkgConfigurationJsonGlob: '**/examples/vcpkg-configuration.json'

- name: Build examples
uses: lukka/run-cmake@v10
env:
VCPKG_BINARY_SOURCES: clear;files,${{ github.workspace }}/vcpkg_cache,readwrite
with:
cmakeListsTxtPath: "${{ github.workspace }}/examples/CMakeLists.txt"
configurePreset: vcpkg
buildPreset: vcpkg
buildPresetAdditionalArgs: "['--config Release']"

- name: Upload build artifacts
uses: actions/upload-artifact@v4
with:
name: Examples-${{ runner.os }}
path: examples/build/**/*.fmu
108 changes: 0 additions & 108 deletions .github/workflows/protobuf.yml

This file was deleted.

10 changes: 10 additions & 0 deletions examples/CMakePresets.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,15 @@
"VCPKG_TARGET_TRIPLET": "x64-windows-static-md"
}
}
],
"buildPresets": [
{
"name": "vcpkg",
"configurePreset": "vcpkg"
},
{
"name": "vcpkg-windows",
"configurePreset": "vcpkg-windows"
}
]
}
Loading