-
Notifications
You must be signed in to change notification settings - Fork 0
61 lines (52 loc) · 1.71 KB
/
Copy pathcpp-plugin-sdk.yml
File metadata and controls
61 lines (52 loc) · 1.71 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
name: C++ Plugin SDK - Build & Test
on:
push:
branches: ["main", "dev*"]
paths:
- 'back-end/crates/malbox-plugin-sdk-cpp/**'
- 'back-end/crates/malbox-plugin-sdk/**'
- 'back-end/crates/malbox-plugin-transport/**'
- 'back-end/xtask/**'
- 'flake.nix'
- 'flake.lock'
- '.github/workflows/cpp-plugin-sdk.yml'
pull_request:
branches: ["main", "dev*"]
paths:
- 'back-end/crates/malbox-plugin-sdk-cpp/**'
- 'back-end/crates/malbox-plugin-sdk/**'
- 'back-end/crates/malbox-plugin-transport/**'
- 'back-end/xtask/**'
- 'flake.nix'
- 'flake.lock'
- '.github/workflows/cpp-plugin-sdk.yml'
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
build-and-test:
runs-on: blacksmith-4vcpu-ubuntu-2404
defaults:
run:
working-directory: back-end
env:
SQLX_OFFLINE: "true"
steps:
- uses: actions/checkout@v6
- uses: cachix/install-nix-action@v31
with:
extra_nix_config: |
experimental-features = nix-command flakes
- uses: DeterminateSystems/magic-nix-cache-action@v14
- name: Build C++ SDK distribution (Linux)
run: nix develop ..#backend --command cargo xtask dist-cpp-sdk --target linux
- name: Run CMake tests
run: |
nix develop ..#backend --command bash -c '
cd crates/malbox-plugin-sdk-cpp/tests/cpp
cmake -B build -DCMAKE_CXX_FLAGS="-Wall -Wextra -Werror"
cmake --build build
cd build && ctest --output-on-failure
'
- name: Cross-compile C++ SDK distribution (Windows)
run: nix develop ..#backend --command cargo xtask dist-cpp-sdk --target windows