Skip to content

Commit 2716d14

Browse files
committed
More presets
1 parent f8787a6 commit 2716d14

File tree

4 files changed

+87
-19
lines changed

4 files changed

+87
-19
lines changed

.github/workflows/linux-ci.yml

+1-2
Original file line numberDiff line numberDiff line change
@@ -18,5 +18,4 @@ jobs:
1818
with:
1919
imageName: ghcr.io/dragonruby/internal-lightstorm-ci
2020
runCmd: |
21-
cmake --preset lightstorm-ubuntu
22-
cmake --build --preset lightstorm-ubuntu-tests
21+
cmake --workflow --preset lightstorm-ubuntu-ci

.github/workflows/macos-ci.yml

+2-17
Original file line numberDiff line numberDiff line change
@@ -15,21 +15,6 @@ jobs:
1515
run: brew install llvm@19 ninja
1616
- name: Install Python dependencies
1717
run: pip install lit filecheck==0.0.24
18-
- name: Set reusable strings
19-
id: strings
20-
shell: bash
18+
- name: Build and test
2119
run: |
22-
echo "build-output-dir=${{ github.workspace }}/build" >> "$GITHUB_OUTPUT"
23-
- name: Configure CMake
24-
run: |
25-
cmake -G Ninja \
26-
-B ${{ steps.strings.outputs.build-output-dir }} \
27-
-DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ \
28-
-DCMAKE_PREFIX_PATH=/opt/homebrew/opt/llvm@19/ \
29-
-DCMAKE_BUILD_TYPE=Release \
30-
-S ${{ github.workspace }}
31-
- name: Build
32-
run: cmake --build ${{ steps.strings.outputs.build-output-dir }}
33-
- name: Test
34-
working-directory: ${{ steps.strings.outputs.build-output-dir }}
35-
run: ninja run-integration-tests
20+
cmake --workflow --preset lightstorm-macos-ci

CMakeLists.txt

+2
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@ set(CMAKE_CXX_STANDARD 20)
55
set(CMAKE_CXX_STANDARD_REQUIRED ON)
66
set(CMAKE_CXX_EXTENSIONS OFF)
77

8+
include(GNUInstallDirs)
9+
810
include(cmake/mruby.cmake)
911
include(cmake/lightstorm.cmake)
1012

CMakePresets.json

+82
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,15 @@
1818
"CMAKE_CXX_COMPILER": "clang++-19",
1919
"CMAKE_PREFIX_PATH": "/usr/lib/llvm-19/lib/cmake"
2020
}
21+
},
22+
{
23+
"name": "lightstorm-macos",
24+
"inherits": "lightstorm-defaults",
25+
"cacheVariables": {
26+
"CMAKE_C_COMPILER": "clang",
27+
"CMAKE_CXX_COMPILER": "clang++",
28+
"CMAKE_PREFIX_PATH": "/opt/homebrew/opt/llvm@19"
29+
}
2130
}
2231
],
2332
"buildPresets": [
@@ -29,6 +38,79 @@
2938
"name": "lightstorm-ubuntu-tests",
3039
"inherits": "lightstorm-ubuntu",
3140
"targets": "run-integration-tests"
41+
},
42+
{
43+
"name": "lightstorm-ubuntu-install",
44+
"inherits": "lightstorm-ubuntu",
45+
"targets": "install"
46+
},
47+
{
48+
"name": "lightstorm-macos",
49+
"configurePreset": "lightstorm-macos"
50+
},
51+
{
52+
"name": "lightstorm-macos-tests",
53+
"inherits": "lightstorm-macos",
54+
"targets": "run-integration-tests"
55+
},
56+
{
57+
"name": "lightstorm-macos-install",
58+
"inherits": "lightstorm-macos",
59+
"targets": "install"
60+
}
61+
],
62+
"workflowPresets": [
63+
{
64+
"name": "lightstorm-ubuntu-ci",
65+
"steps": [
66+
{
67+
"type": "configure",
68+
"name": "lightstorm-ubuntu"
69+
},
70+
{
71+
"type": "build",
72+
"name": "lightstorm-ubuntu-tests"
73+
}
74+
]
75+
},
76+
{
77+
"name": "lightstorm-ubuntu-install",
78+
"steps": [
79+
{
80+
"type": "configure",
81+
"name": "lightstorm-ubuntu"
82+
},
83+
{
84+
"type": "build",
85+
"name": "lightstorm-ubuntu-install"
86+
}
87+
]
88+
},
89+
{
90+
"name": "lightstorm-macos-ci",
91+
"steps": [
92+
{
93+
"type": "configure",
94+
"name": "lightstorm-macos"
95+
},
96+
{
97+
"type": "build",
98+
"name": "lightstorm-macos-tests"
99+
}
100+
]
101+
},
102+
{
103+
"name": "lightstorm-macos-install",
104+
"steps": [
105+
{
106+
"type": "configure",
107+
"name": "lightstorm-macos"
108+
},
109+
{
110+
"type": "build",
111+
"name": "lightstorm-macos-install"
112+
}
113+
]
32114
}
33115
]
34116
}

0 commit comments

Comments
 (0)