Skip to content

Commit c966cb8

Browse files
committed
Test CMake Build
Adding steps to test that the CMake build works as expected.
1 parent b445a05 commit c966cb8

File tree

2 files changed

+18
-1
lines changed

2 files changed

+18
-1
lines changed

.github/workflows/pull_request.yml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,3 +26,20 @@ jobs:
2626
format_check_enabled: false
2727
unacceptable_language_check_enabled: false
2828
api_breakage_check_enabled: false
29+
30+
cmake_build:
31+
name: CMake Build
32+
runs-on: ubuntu-latest
33+
container: swift:6.1-noble
34+
steps:
35+
- name: checkout sources
36+
uses: actions/checkout@v1
37+
- name: Install dependencies
38+
shell: bash
39+
run: apt update && apt install -y cmake ninja-build
40+
- name: Configure Project
41+
shell: bash
42+
run: cmake -G 'Ninja' -B build -S . -DCMAKE_C_COMPILER=clang -DCMAKE_Swift_COMPILER=swiftc -DCMAKE_BUILD_TYPE=Release -DBUILD_SHARED_LIBS=YES
43+
- name: Build Project
44+
shell: bash
45+
run: cmake --build build

CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
cmake_minimum_required(VERSION 3.29)
1+
cmake_minimum_required(VERSION 3.26...3.29)
22
project(Subprocess LANGUAGES C Swift)
33
list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake/modules")
44

0 commit comments

Comments
 (0)