Skip to content

Commit 20652ad

Browse files
committed
Fixing release to use cmake to do the building of the header
1 parent ed989c0 commit 20652ad

File tree

2 files changed

+13
-4
lines changed

2 files changed

+13
-4
lines changed

.github/workflows/release.yml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,8 +53,11 @@ jobs:
5353
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
5454
source "$HOME/.cargo/env"
5555
56-
- name: "Generate the header only library"
57-
run: ./scripts/create_single_header.sh
56+
- name: Configure build
57+
run: cmake -Bbuild -H$GITHUB_WORKSPACE -DDBC_GENERATE_SINGLE_HEADER=ON
58+
59+
- name: Generate the header file
60+
run: cmake --build build --parallel `nproc` --target single_header
5861

5962
- uses: actions/upload-artifact@v4
6063
with:

README.md

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,13 +38,19 @@ cmake -LAH ..
3838

3939
### Creating a Single Header File
4040

41-
If you want to generate one header file you will need to run the `./scripts/create_single_header.sh`.
42-
4341
It requires you have `cargo` installed from rust. See these instructions if you don't have that https://www.rust-lang.org/tools/install.
4442
It uses the https://github.com/Felerius/cpp-amalgamate crate to do the single header file creation.
4543

4644
The output will be generated in the `build/single_header/libdbc/` folder. You can run a cmake command to build this as well as other targets.
4745

46+
To just build the single header you can simply run the target:
47+
```shell
48+
cmake -Bbuild -H. -DDBC_GENERATE_SINGLE_HEADER=ON
49+
50+
cmake --build build --parallel `nproc` --target single-header
51+
```
52+
53+
4854
## Testing
4955

5056
I am trying to always make sure that this is very well tested code. I am using Catch2 to do this

0 commit comments

Comments
 (0)