Skip to content

Commit 06f2ea1

Browse files
authored
CMake update (#2)
* Major: Only CMake build system is supported.
1 parent 9874acf commit 06f2ea1

13 files changed

Lines changed: 172 additions & 191 deletions

.github/gcc-problem-matcher.json

Lines changed: 0 additions & 18 deletions
This file was deleted.

.github/workflows/cpp-external.yml

Lines changed: 131 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,131 @@
1+
name: C++ External
2+
3+
on:
4+
schedule:
5+
- cron: 0 1 * * *
6+
push:
7+
branches:
8+
- master
9+
pull_request:
10+
11+
concurrency:
12+
group: ${{ github.workflow }}-${{ github.ref || github.run_id }}
13+
cancel-in-progress: true
14+
15+
jobs:
16+
linux_cmake:
17+
timeout-minutes: 45
18+
strategy:
19+
fail-fast: false
20+
matrix:
21+
config:
22+
- runner: ubuntu-current
23+
name: GCC Latest
24+
toolchain: "./resolve_symlinks/toolchains/gcc-toolchain.cmake"
25+
- runner: ubuntu-current
26+
name: Clang Latest
27+
toolchain: "./resolve_symlinks/toolchains/clang-toolchain.cmake"
28+
- runner: ubuntu-old
29+
name: GCC Oldest
30+
toolchain: "./resolve_symlinks/toolchains/gcc-toolchain.cmake"
31+
- runner: ubuntu-old
32+
name: Clang Oldest
33+
toolchain: "./resolve_symlinks/toolchains/clang-toolchain.cmake"
34+
runs-on:
35+
- self-hosted
36+
- vm
37+
- ${{ matrix.config.runner }}
38+
name: ${{ matrix.config.name }}
39+
steps:
40+
- name: Ensure correct owner of repository
41+
run: sudo chown -R actions-runner:actions-runner .
42+
- name: Checkout source code
43+
uses: actions/checkout@v3
44+
- name: Waf Clean
45+
run: python3 waf clean --no_resolve
46+
- name: Waf Configure
47+
run: python3 waf configure --git_protocol=git@ --cmake_toolchain=${{ matrix.config.toolchain }} --cmake_verbose
48+
- name: Waf Build
49+
run: python3 waf build --run_tests
50+
51+
zig_toolchain_build:
52+
name: Zig Toolchain Build (Docker)
53+
runs-on: [self-hosted, vm, ubuntu-current]
54+
container:
55+
image: kassany/bookworm-ziglang
56+
options: --user 0:0
57+
volumes:
58+
- /root/.ssh:/root/.ssh
59+
steps:
60+
- name: Checkout source code
61+
uses: actions/checkout@v4
62+
- name: Install dependencies
63+
run: |
64+
apt-get update
65+
apt-get install -y python3 python3-pip git cmake build-essential
66+
- name: Waf Clean
67+
run: python3 waf clean --no_resolve
68+
- name: Waf Configure with Zig Toolchain
69+
run: python3 waf configure --git_protocol=git@ --cmake_toolchain=../resolve_symlinks/toolchains/zig-toolchain-x86_64-linux-musl.cmake --cmake_verbose
70+
- name: Waf Build with Zig Toolchain
71+
run: python3 waf build --run_tests
72+
73+
macos_cmake:
74+
timeout-minutes: 45
75+
strategy:
76+
fail-fast: false
77+
matrix:
78+
config:
79+
- arch: ARM64
80+
os: big_sur
81+
name: Apple Big Sur (ARM)
82+
toolchain: "./resolve_symlinks/toolchains/clang-toolchain.cmake"
83+
runs-on:
84+
- self-hosted
85+
- macOS
86+
- ${{ matrix.config.os }}
87+
- ${{ matrix.config.arch }}
88+
- cmake
89+
- builder
90+
name: ${{ matrix.config.name }}
91+
steps:
92+
- name: Checkout
93+
uses: actions/checkout@v3
94+
- name: Waf Clean
95+
run: python3 waf clean --no_resolve
96+
- name: Waf Configure
97+
run: python3 waf configure --git_protocol=git@ --cmake_toolchain=${{ matrix.config.toolchain }} --cmake_verbose
98+
- name: Waf Build
99+
run: python3 waf build --run_tests
100+
101+
windows_cmake:
102+
timeout-minutes: 45
103+
strategy:
104+
fail-fast: false
105+
runs-on:
106+
- self-hosted
107+
- windows
108+
- vm
109+
- windows-current
110+
name: Windows
111+
steps:
112+
- name: Checkout
113+
uses: actions/checkout@v3
114+
- name: Waf Clean
115+
run: python waf clean --no_resolve
116+
- name: Waf Configure
117+
run: python waf configure --git_protocol=git@ --cmake_verbose
118+
- name: Waf Build
119+
run: python waf build --run_tests
120+
121+
workflow-keepalive:
122+
if: github.event_name == 'schedule'
123+
runs-on: [self-hosted, vm, ubuntu-current]
124+
permissions:
125+
actions: write
126+
steps:
127+
- name: Install GitHub CLI
128+
run: |
129+
sudo apt update
130+
sudo apt install -y gh
131+
- uses: liskin/gh-workflow-keepalive@v1

.github/workflows/linux_cmake.yml

Lines changed: 0 additions & 24 deletions
This file was deleted.

.github/workflows/linux_mkspecs.yml

Lines changed: 0 additions & 21 deletions
This file was deleted.

.github/workflows/macos_cmake.yml

Lines changed: 0 additions & 24 deletions
This file was deleted.

.github/workflows/macos_mkspecs.yml

Lines changed: 0 additions & 21 deletions
This file was deleted.

.github/workflows/windows_cmake.yml

Lines changed: 0 additions & 24 deletions
This file was deleted.

.github/workflows/windows_mkspecs.yml

Lines changed: 0 additions & 21 deletions
This file was deleted.

CMakeLists.txt

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ if(NOT DEFINED STEINWURF_RESOLVE)
1616
endif()
1717

1818
set(STEINWURF_RESOLVE "${CMAKE_CURRENT_SOURCE_DIR}/resolve_symlinks")
19-
set(STEINWURF_TOP_NAME expected)
2019
endif()
2120

2221
# Define library
@@ -38,6 +37,9 @@ install(
3837
# Is top level project?
3938
if(${CMAKE_PROJECT_NAME} STREQUAL ${PROJECT_NAME})
4039
# Build executables
41-
add_executable(format example/main.cpp)
42-
target_link_libraries(format expected)
40+
add_executable(example_expected example/main.cpp)
41+
target_link_libraries(example_expected expected)
42+
43+
enable_testing()
44+
add_test(example_expected example_expected)
4345
endif()

NEWS.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ every change, see the Git log.
66

77
Latest
88
------
9-
* tbd
9+
* Major: Only CMake build system is supported.
1010

1111
1.0.0
1212
-----

0 commit comments

Comments
 (0)