FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
daScript/.github/workflows/cpp_mcp_release.yml at master · WhyNot135/daScript · GitHub
WhyNot135
/
daScript
Public
forked from
GaijinEntertainment/daScript
Notifications
You must be signed in to change notification settings
Fork
0
Star
0
Code
Pull requests
0
Actions
Projects
Security and quality
0
Insights
Additional navigation options
Code
Pull requests
Actions
Projects
Security and quality
Insights
Expand file tree
Breadcrumbs
daScript
/
.github
/
workflows
/
cpp_mcp_release.yml
Copy path
View runs
More file actions
More file actions
Latest commit
History
History
History
112 lines (99 loc) · 4.98 KB
Breadcrumbs
daScript
/
.github
/
workflows
/
cpp_mcp_release.yml
Copy path
File metadata and controls
112 lines (99 loc) · 4.98 KB
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
name
:
cpp-mcp release
#
Builds the standalone C++-only MCP server (cpp-mcp) as a self-contained AOT
#
bundle per platform and, on a release, uploads each as a release asset.
#
#
Triggers:
#
* pull_request (only when the cpp-mcp surface changes) — builds + smoke-tests
#
on linux only, NO upload. Catches breakage at PR time (the cpp-mcp target
#
is OFF in the normal build matrix, so nothing else compiles it).
#
* workflow_dispatch — full matrix build + smoke, NO upload. Manual validation.
#
* release: prereleased — full matrix, uploads cpp-mcp-<os>-<arch>.<ext>
#
alongside the daslang SDK bundles.
#
#
The build is intentionally lean: cpp_main.das requires only daslib + builtin
#
modules, so every external module (dasHV/OpenSSL, GLFW, Audio, ...) is disabled
#
— no vcpkg/openssl/apt module deps, and a ~360-step build instead of 2000+.
on
:
pull_request
:
paths
:
-
'
utils/mcp/**
'
-
'
utils/common/**
'
-
'
tree-sitter-daslang/*.yml
'
#
ast-grep rule files the bundle ships
-
'
ci/make_cpp_mcp_bundle.sh
'
-
'
ci/smoke_test_cpp_mcp.sh
'
-
'
.github/workflows/cpp_mcp_release.yml
'
-
'
CMakeLists.txt
'
workflow_dispatch
:
release
:
types
:
[prereleased]
defaults
:
run
:
shell
:
bash
jobs
:
build
:
runs-on
:
${{ matrix.runner }}
strategy
:
fail-fast
:
false
#
Vary the matrix by event: a PR builds only linux (a cheap, cross-platform-
#
agnostic gate); dispatch/release build all four. The selection lives here
#
because the `matrix` context is NOT available in a job-level `if` (only
#
github/needs/vars/inputs are), whereas `github` IS available in strategy.
matrix
:
include
:
${{ fromJSON( github.event_name == 'pull_request' && '[{"name":"linux-x86_64","runner":"ubuntu-latest","asset":"cpp-mcp-linux-x86_64","ext":"tar.gz"}]' || '[{"name":"linux-x86_64","runner":"ubuntu-latest","asset":"cpp-mcp-linux-x86_64","ext":"tar.gz"},{"name":"linux-arm64","runner":"ubuntu-24.04-arm","asset":"cpp-mcp-linux-arm64","ext":"tar.gz"},{"name":"darwin-arm64","runner":"macos-14","asset":"cpp-mcp-darwin-arm64","ext":"tar.gz"},{"name":"windows-x64","runner":"windows-latest","asset":"cpp-mcp-windows-x64","ext":"zip"}]' ) }}
steps
:
-
name
:
SCM Checkout
uses
:
actions/checkout@v4
-
name
:
Install CMake and Ninja
uses
:
lukka/get-cmake@latest
-
name
:
Set up MSVC environment (Windows)
if
:
runner.os == 'Windows'
uses
:
ilammy/msvc-dev-cmd@v1
with
:
arch
:
x64
-
name
:
Configure + build cpp-mcp
run
:
|
set -eux
# cpp_main.das needs no external module -> disable them all (no OpenSSL,
# no GLFW/X11 deps) and skip tests/tutorials/aot-examples + flex/bison
# (the committed parser is used).
MODULES_OFF="-DDAS_HV_DISABLED=ON -DDAS_LLVM_DISABLED=ON -DDAS_AUDIO_DISABLED=ON"
MODULES_OFF="$MODULES_OFF -DDAS_GLFW_DISABLED=ON -DDAS_PUGIXML_DISABLED=ON -DDAS_SQLITE_DISABLED=ON"
MODULES_OFF="$MODULES_OFF -DDAS_STBIMAGE_DISABLED=ON -DDAS_STDDLG_DISABLED=ON -DDAS_CLANG_BIND_DISABLED=ON"
MODULES_OFF="$MODULES_OFF -DDAS_TREE_SITTER_DISABLED=ON"
LEAN="-DDAS_TESTS_DISABLED=ON -DDAS_TUTORIAL_DISABLED=ON -DDAS_AOT_EXAMPLES_DISABLED=ON -DDAS_FLEX_BISON_DISABLED=ON"
if [[ "${{ runner.os }}" == "Linux" ]]; then
# Match release.yml: clang avoids GCC's -Wchanges-meaning on
# AOT-generated structs being treated as an error.
export CC=clang CXX=clang++
fi
cmake --no-warn-unused-cli -B build -G Ninja \
-DCMAKE_BUILD_TYPE=Release -DDAS_BUILD_CPP_MCP=ON $MODULES_OFF $LEAN
cmake --build build --target cpp-mcp --parallel
-
name
:
Assemble bundle
run
:
bash ci/make_cpp_mcp_bundle.sh dist/cpp-mcp
-
name
:
Smoke-test bundle
run
:
bash ci/smoke_test_cpp_mcp.sh dist/cpp-mcp
-
name
:
Package (zip)
if
:
runner.os == 'Windows'
run
:
|
mkdir -p artifacts
# Package from inside dist/ so the zip root is `cpp-mcp/` (matching the
# tarball's `-C dist cpp-mcp`), not `dist/cpp-mcp/`.
cd dist && 7z a "../artifacts/${{ matrix.asset }}.zip" cpp-mcp
-
name
:
Package (tar.gz)
if
:
runner.os != 'Windows'
run
:
|
mkdir -p artifacts
tar -czf "artifacts/${{ matrix.asset }}.${{ matrix.ext }}" -C dist cpp-mcp
-
name
:
Upload workflow artifact (dispatch / PR inspection)
if
:
github.event_name != 'release'
uses
:
actions/upload-artifact@v4
with
:
name
:
${{ matrix.asset }}
path
:
artifacts/${{ matrix.asset }}.${{ matrix.ext }}
if-no-files-found
:
error
-
name
:
Upload release asset
if
:
github.event_name == 'release' && github.event.action == 'prereleased'
env
:
GITHUB_TOKEN
:
${{ secrets.GITHUB_TOKEN }}
run
:
gh release upload "${{ github.event.release.tag_name }}" "artifacts/${{ matrix.asset }}.${{ matrix.ext }}" --clobber
Back
|
FazBrowse Home
|
New Git URL