Skip to content

Commit 1707b67

Browse files
committed
chore: release 1.0.0
1 parent e9e7f9c commit 1707b67

File tree

12 files changed

+306
-33
lines changed

12 files changed

+306
-33
lines changed

.github/release-please-config.json

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"$schema": "https://raw.githubusercontent.com/googleapis/release-please/main/schemas/config.json",
3+
"release-type": "simple",
4+
"packages": {
5+
".": {}
6+
}
7+
}
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
".": "1.0.0"
3+
}

.github/workflows/cmake-multiple-platform.yml renamed to .github/workflows/clang.yml

Lines changed: 8 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: CMake on multiple platforms
1+
name: clang
22

33
on:
44
push:
@@ -10,11 +10,13 @@ on:
1010
- LICENSE
1111
- README.md
1212
- 'docs/**'
13+
- 'schemas/**'
1314
pull_request:
1415
paths-ignore:
1516
- LICENSE
1617
- README.md
1718
- 'docs/**'
19+
- 'schemas/**'
1820

1921
jobs:
2022
build:
@@ -24,36 +26,20 @@ jobs:
2426
fail-fast: false
2527

2628
matrix:
27-
os: [ubuntu-latest, windows-latest]
29+
os: [ubuntu-latest, macos-latest]
2830
build_type: [Release]
29-
c_compiler: [gcc, clang, cl]
30-
include:
31-
- os: windows-latest
32-
c_compiler: cl
33-
cpp_compiler: cl
34-
- os: ubuntu-latest
35-
c_compiler: gcc
36-
cpp_compiler: g++
37-
- os: ubuntu-latest
38-
c_compiler: clang
39-
cpp_compiler: clang++
40-
exclude:
41-
- os: windows-latest
42-
c_compiler: gcc
43-
- os: windows-latest
44-
c_compiler: clang
45-
- os: ubuntu-latest
46-
c_compiler: cl
31+
c_compiler: [clang]
32+
cpp_compiler: [clang++]
4733

4834
steps:
4935
- name: Checkout
5036
uses: actions/checkout@v4
5137
with:
5238
submodules: recursive
5339

54-
- name: Install clang
40+
- name: Install clang (Linux)
41+
if: matrix.os == 'ubuntu-latest'
5542
shell: bash -el {0}
56-
if: matrix.c_compiler == 'clang'
5743
run: |
5844
sudo apt install clang
5945
@@ -74,7 +60,6 @@ jobs:
7460
cmake -S . -B build -G Ninja
7561
-DCMAKE_CXX_COMPILER=${{ matrix.cpp_compiler }}
7662
-DCMAKE_C_COMPILER=${{ matrix.c_compiler }}
77-
-DCMAKE_BUILD_TYPE=${{ matrix.build_type }}
7863
7964
- name: Build
8065
shell: bash -el {0}

.github/workflows/gcc.yml

Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
name: gcc
2+
3+
on:
4+
push:
5+
tags:
6+
- 'v*'
7+
branches:
8+
- 'main'
9+
paths-ignore:
10+
- LICENSE
11+
- README.md
12+
- 'docs/**'
13+
- 'schemas/**'
14+
pull_request:
15+
paths-ignore:
16+
- LICENSE
17+
- README.md
18+
- 'docs/**'
19+
- 'schemas/**'
20+
21+
jobs:
22+
build:
23+
runs-on: ${{ matrix.os }}
24+
25+
strategy:
26+
fail-fast: false
27+
28+
matrix:
29+
os: [ubuntu-latest]
30+
build_type: [Release]
31+
c_compiler: [gcc]
32+
cpp_compiler: [g++]
33+
34+
steps:
35+
- name: Checkout
36+
uses: actions/checkout@v4
37+
with:
38+
submodules: recursive
39+
40+
- name: Setup Visual Studio environment
41+
uses: ilammy/msvc-dev-cmd@v1
42+
with:
43+
arch: x64
44+
45+
- name: Setup CMake
46+
uses: lukka/get-cmake@latest
47+
48+
- name: Cache build dependencies
49+
uses: actions/cache@v3
50+
with:
51+
path: |
52+
build/_deps
53+
~/.vcpkg
54+
~/.cache
55+
key: ${{ runner.os }}-build-${{ hashFiles('**/CMakeLists.txt') }}
56+
restore-keys: |
57+
${{ runner.os }}-build-
58+
59+
- name: Configure CMake
60+
shell: bash -el {0}
61+
run: >
62+
cmake -S . -B build -G Ninja
63+
-DCMAKE_CXX_COMPILER=${{ matrix.cpp_compiler }}
64+
-DCMAKE_C_COMPILER=${{ matrix.c_compiler }}
65+
66+
- name: Build
67+
shell: bash -el {0}
68+
run: cmake --build build --target dynohook --config ${{ matrix.build_type }} --parallel
69+
70+
# - name: Test
71+
# shell: bash -el {0}
72+
# working-directory: build
73+
# run: ctest --build-config ${{ matrix.build_type }}

.github/workflows/msvc.yml

Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
name: msvc
2+
3+
on:
4+
push:
5+
tags:
6+
- 'v*'
7+
branches:
8+
- 'main'
9+
paths-ignore:
10+
- LICENSE
11+
- README.md
12+
- 'docs/**'
13+
- 'schemas/**'
14+
pull_request:
15+
paths-ignore:
16+
- LICENSE
17+
- README.md
18+
- 'docs/**'
19+
- 'schemas/**'
20+
21+
jobs:
22+
build:
23+
runs-on: ${{ matrix.os }}
24+
25+
strategy:
26+
fail-fast: false
27+
28+
matrix:
29+
os: [windows-latest]
30+
build_arch: [x64]
31+
build_type: [Release]
32+
c_compiler: [cl]
33+
cpp_compiler: [cl]
34+
35+
steps:
36+
- name: Checkout
37+
uses: actions/checkout@v4
38+
with:
39+
submodules: recursive
40+
41+
- name: Cache build dependencies
42+
uses: actions/cache@v3
43+
with:
44+
path: |
45+
build/_deps
46+
~/.vcpkg
47+
~/.cache
48+
key: ${{ runner.os }}-build-${{ hashFiles('**/CMakeLists.txt') }}
49+
restore-keys: |
50+
${{ runner.os }}-build-
51+
52+
- name: Configure CMake
53+
shell: bash -el {0}
54+
run: >
55+
cmake -S . -B build -G Ninja
56+
57+
- name: Build
58+
shell: bash -el {0}
59+
run: cmake --build build --target dynohook --config ${{ matrix.build_type }} --parallel
60+
61+
# - name: Test
62+
# shell: bash -el {0}
63+
# working-directory: build
64+
# run: ctest --build-config ${{ matrix.build_type }}

.github/workflows/msys2.yml

Lines changed: 80 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,80 @@
1+
name: msys2-mingw
2+
3+
on:
4+
push:
5+
tags:
6+
- 'v*'
7+
branches:
8+
- 'main'
9+
paths-ignore:
10+
- LICENSE
11+
- README.md
12+
- 'docs/**'
13+
- 'schemas/**'
14+
pull_request:
15+
paths-ignore:
16+
- LICENSE
17+
- README.md
18+
- 'docs/**'
19+
- 'schemas/**'
20+
21+
jobs:
22+
build:
23+
runs-on: ${{ matrix.os }}
24+
25+
defaults:
26+
run:
27+
shell: msys2 {0}
28+
29+
strategy:
30+
fail-fast: false
31+
32+
matrix:
33+
os: [windows-latest]
34+
build_type: [Release]
35+
c_compiler: [gcc]
36+
cpp_compiler: [g++]
37+
38+
steps:
39+
- name: Checkout
40+
uses: actions/checkout@v4
41+
with:
42+
submodules: recursive
43+
44+
- name: Setup MSYS2
45+
uses: msys2/setup-msys2@v2
46+
with:
47+
update: true
48+
msystem: UCRT64
49+
install: git base-devel mingw-w64-ucrt-x86_64-gcc mingw-w64-ucrt-x86_64-cmake mingw-w64-ucrt-x86_64-ninja mingw-w64-ucrt-x86_64-toolchain mingw-w64-ucrt-x86_64-headers-git
50+
51+
- name: Add MSYS2 to PATH
52+
run: echo "C:/msys64/usr/bin" >> $GITHUB_PATH
53+
shell: pwsh
54+
55+
- name: Cache build dependencies
56+
uses: actions/cache@v3
57+
with:
58+
path: |
59+
build/_deps
60+
~/.vcpkg
61+
~/.cache
62+
key: ${{ runner.os }}-build-${{ hashFiles('**/CMakeLists.txt') }}
63+
restore-keys: |
64+
${{ runner.os }}-build-
65+
66+
- name: Configure CMake
67+
shell: bash -el {0}
68+
run: >
69+
cmake -S . -B build -G Ninja
70+
-DCMAKE_CXX_COMPILER=${{ matrix.cpp_compiler }}
71+
-DCMAKE_C_COMPILER=${{ matrix.c_compiler }}
72+
73+
- name: Build
74+
shell: bash -el {0}
75+
run: cmake --build build --target dynohook --config ${{ matrix.build_type }} --parallel
76+
77+
# - name: Test
78+
# shell: bash -el {0}
79+
# working-directory: build
80+
# run: ctest --build-config ${{ matrix.build_type }}

.github/workflows/publish.yml

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
name: Build
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
paths-ignore:
8+
- LICENSE
9+
- README.md
10+
- 'docs/**'
11+
- 'schemas/**'
12+
pull_request:
13+
paths-ignore:
14+
- LICENSE
15+
- README.md
16+
- 'docs/**'
17+
- 'schemas/**'
18+
19+
env:
20+
BUILD_TYPE: Release
21+
22+
jobs:
23+
setup:
24+
permissions:
25+
contents: write
26+
pull-requests: write
27+
issues: write
28+
repository-projects: write
29+
runs-on: ubuntu-latest
30+
outputs:
31+
release_created: ${{ steps.release.outputs.release_created }}
32+
tag_name: ${{ steps.release.outputs.tag_name }}
33+
steps:
34+
- name: Generate Release
35+
uses: googleapis/release-please-action@v4
36+
id: release
37+
with:
38+
token: ${{ secrets.GITHUB_TOKEN }}
39+
config-file: .github/release-please-config.json
40+
manifest-file: .github/release-please-manifest.json

CMakeLists.txt

Lines changed: 19 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,26 @@ if(POLICY CMP0092)
55
endif()
66

77

8-
project(dynohook)
8+
file(READ "${CMAKE_CURRENT_SOURCE_DIR}/version.txt" DYNOHOOK_VERSION)
9+
string(STRIP "${DYNOHOOK_VERSION}" DYNOHOOK_VERSION)
10+
message(STATUS "Dynohook Version: ${DYNOHOOK_VERSION}")
11+
12+
# version.txt may contain a SemVer of the form 1.2.3-xxx+xxx
13+
# Extract the first 3 numbers into CMake variables
14+
string(REGEX REPLACE "[.+-]" ";" DYNOHOOK_VERSION_LIST ${DYNOHOOK_VERSION})
15+
list(GET DYNOHOOK_VERSION_LIST 0 DYNOHOOK_VERSION_MAJOR)
16+
list(GET DYNOHOOK_VERSION_LIST 1 DYNOHOOK_VERSION_MINOR)
17+
list(GET DYNOHOOK_VERSION_LIST 2 DYNOHOOK_VERSION_PATCH)
18+
19+
20+
project(dynohook VERSION "${DYNOHOOK_VERSION_MAJOR}.${DYNOHOOK_VERSION_MINOR}.${DYNOHOOK_VERSION_PATCH}" DESCRIPTION "DynHook Core" HOMEPAGE_URL "https://github.com/qubka/DynoHook" LANGUAGES C CXX)
921
include(CMakePackageConfigHelpers)
1022

23+
if(NOT CMAKE_BUILD_TYPE MATCHES "Debug|Devel|MinSizeRel|RelWithDebInfo|Release")
24+
message(STATUS "CMAKE_BUILD_TYPE not set, defaulting to Release.")
25+
set(CMAKE_BUILD_TYPE Release)
26+
endif()
27+
1128
set(CMAKE_CXX_STANDARD 20)
1229
set(CMAKE_CXX_STANDARD_REQUIRED ON)
1330
set(CMAKE_CXX_EXTENSIONS OFF)
@@ -40,7 +57,7 @@ include(git.cmake)
4057
# Options
4158
#
4259

43-
option(DYNOHOOK_BUILD_TESTS "Build dll & lib instead of tests" OFF)
60+
option(DYNOHOOK_BUILD_TESTS "Build dll & lib instead of tests" ON)
4461

4562
option(DYNOHOOK_BUILD_SHARED_LIB "Build dynohook as shared library" OFF)
4663
option(DYNOHOOK_BUILD_SHARED_ASMTK "Build asmtk as shared library" OFF)

0 commit comments

Comments
 (0)