Skip to content

Commit eac3a57

Browse files
committed
rename gf to gdbf to avoid confusion.
1 parent 2b440f3 commit eac3a57

19 files changed

+374
-389
lines changed

.github/tools/README.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
# gf Build Tools
1+
# gdbf Build Tools
22

3-
This directory contains tools for building reproducible gf binaries.
3+
This directory contains tools for building reproducible gdbf binaries.
44

55
## Reproducible Builds
66

@@ -25,7 +25,7 @@ To build a reproducible binary locally:
2525
./.github/tools/build-reproducible.sh [output-dir]
2626
```
2727

28-
The binary will be created in the output directory (default: `build-reproducible/gf`).
28+
The binary will be created in the output directory (default: `build-reproducible/gdbf`).
2929

3030
### Requirements
3131

@@ -37,7 +37,7 @@ The binary will be created in the output directory (default: `build-reproducible
3737
The reproducible build runs automatically when a new release is published on GitHub. The workflow:
3838

3939
1. Builds the binary using the reproducible Dockerfile
40-
2. Creates a tarball with version name (e.g., `gf-v1.0.0-linux-x86_64.tar.gz`)
40+
2. Creates a tarball with version name (e.g., `gdbf-v1.0.0-linux-x86_64.tar.gz`)
4141
3. Generates SHA256 checksum
4242
4. Uploads the binary and checksum to the GitHub release
4343

@@ -55,11 +55,11 @@ After building, verify the binary works:
5555

5656
```bash
5757
# Check binary information
58-
file build-reproducible/gf
59-
ldd build-reproducible/gf
58+
file build-reproducible/gdbf
59+
ldd build-reproducible/gdbf
6060

6161
# Run the binary
62-
./build-reproducible/gf --help
62+
./build-reproducible/gdbf --help
6363
```
6464

6565
### Portability
@@ -107,7 +107,7 @@ To verify reproducibility, build twice and compare:
107107
```bash
108108
./.github/tools/build-reproducible.sh output1
109109
./.github/tools/build-reproducible.sh output2
110-
sha256sum output1/gf output2/gf
110+
sha256sum output1/gdbf output2/gdbf
111111
```
112112

113113
The hashes should be identical.
Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
#!/bin/bash
22
set -euo pipefail
33

4-
# Build reproducible gf binary using Docker
4+
# Build reproducible gdbf binary using Docker
55
# Usage: ./.github/tools/build-reproducible.sh [output-dir]
66

77
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
88
REPO_ROOT="$(cd "$SCRIPT_DIR/../.." && pwd)"
99
OUTPUT_DIR="${1:-$REPO_ROOT/build-reproducible}"
1010

11-
echo "Building reproducible gf binary..."
11+
echo "Building reproducible gdbf binary..."
1212
echo "Repository root: $REPO_ROOT"
1313
echo "Output directory: $OUTPUT_DIR"
1414

@@ -19,17 +19,17 @@ docker buildx build \
1919
--file "$REPO_ROOT/.github/tools/reproducible.Dockerfile" \
2020
--target exporter \
2121
--output "type=local,dest=$OUTPUT_DIR" \
22-
--build-arg "GF_BUILD_JOBS=$(nproc)" \
22+
--build-arg "GDBF_BUILD_JOBS=$(nproc)" \
2323
"$REPO_ROOT"
2424

2525
echo ""
2626
echo "Build complete!"
27-
echo "Binary location: $OUTPUT_DIR/gf"
27+
echo "Binary location: $OUTPUT_DIR/gdbf"
2828
echo ""
2929
echo "Binary info:"
30-
file "$OUTPUT_DIR/gf"
30+
file "$OUTPUT_DIR/gdbf"
3131
echo ""
32-
echo "Size: $(du -h "$OUTPUT_DIR/gf" | cut -f1)"
32+
echo "Size: $(du -h "$OUTPUT_DIR/gdbf" | cut -f1)"
3333
echo ""
3434
echo "Linked libraries:"
35-
ldd "$OUTPUT_DIR/gf" || true
35+
ldd "$OUTPUT_DIR/gdbf" || true

.github/tools/reproducible.Dockerfile

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -30,26 +30,26 @@ RUN wget https://apt.llvm.org/llvm.sh && \
3030
./llvm.sh 18 && \
3131
rm llvm.sh
3232

33-
ARG _GF_CLANG_VERSION=21.1.4
34-
ARG _GF_CMAKE_VERSION=3.27.6
33+
ARG _GDBF_CLANG_VERSION=21.1.4
34+
ARG _GDBF_CMAKE_VERSION=3.27.6
3535

3636
# Download CMake and LLVM sources
3737
RUN curl -fsSL -o /cmake.tar.gz \
38-
https://github.com/Kitware/CMake/releases/download/v${_GF_CMAKE_VERSION}/cmake-${_GF_CMAKE_VERSION}.tar.gz && \
38+
https://github.com/Kitware/CMake/releases/download/v${_GDBF_CMAKE_VERSION}/cmake-${_GDBF_CMAKE_VERSION}.tar.gz && \
3939
curl -fsSL -o /llvm-project.tar.xz \
40-
https://github.com/llvm/llvm-project/releases/download/llvmorg-${_GF_CLANG_VERSION}/llvm-project-${_GF_CLANG_VERSION}.src.tar.xz
40+
https://github.com/llvm/llvm-project/releases/download/llvmorg-${_GDBF_CLANG_VERSION}/llvm-project-${_GDBF_CLANG_VERSION}.src.tar.xz
4141

4242
# Build and install CMake
4343
RUN tar xf /cmake.tar.gz && \
44-
cd cmake-${_GF_CMAKE_VERSION} && \
45-
echo 'set(CMAKE_USE_OPENSSL OFF CACHE BOOL "" FORCE)' > gf-init.cmake && \
46-
./bootstrap --parallel=$(nproc) --init=gf-init.cmake --generator=Ninja && \
44+
cd cmake-${_GDBF_CMAKE_VERSION} && \
45+
echo 'set(CMAKE_USE_OPENSSL OFF CACHE BOOL "" FORCE)' > gdbf-init.cmake && \
46+
./bootstrap --parallel=$(nproc) --init=gdbf-init.cmake --generator=Ninja && \
4747
ninja install && \
4848
cd / && rm -rf /cmake* cmake-*
4949

5050
# Build and install Clang/LLVM toolchain using LLVM 18 as bootstrap compiler
5151
RUN tar xf /llvm-project.tar.xz && \
52-
cmake -S llvm-project-${_GF_CLANG_VERSION}.src/llvm -B build-toolchain -GNinja \
52+
cmake -S llvm-project-${_GDBF_CLANG_VERSION}.src/llvm -B build-toolchain -GNinja \
5353
-DCMAKE_C_COMPILER=clang-18 \
5454
-DCMAKE_CXX_COMPILER=clang++-18 \
5555
-DCMAKE_C_FLAGS="-march=x86-64" \
@@ -86,14 +86,14 @@ ENV CMAKE_TOOLCHAIN_FILE=/pinnedtoolchain/pinnedtoolchain.cmake
8686

8787
FROM builder AS build
8888

89-
ARG GF_BUILD_JOBS
89+
ARG GDBF_BUILD_JOBS
9090

91-
COPY / /gf
91+
COPY / /gdbf
9292

93-
RUN cmake -S /gf -B build \
93+
RUN cmake -S /gdbf -B build \
9494
-DCMAKE_BUILD_TYPE=Release \
9595
-GNinja && \
96-
cmake --build build ${GF_BUILD_JOBS:+-j$GF_BUILD_JOBS}
96+
cmake --build build ${GDBF_BUILD_JOBS:+-j$GDBF_BUILD_JOBS}
9797

9898
FROM scratch AS exporter
99-
COPY --from=build /build/gf /gf
99+
COPY --from=build /build/gdbf /gdbf

.github/workflows/release.yml

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ permissions:
1515

1616
jobs:
1717
build-reproducible:
18-
name: Build Reproducible gf Binary
18+
name: Build Reproducible gdbf Binary
1919
runs-on: ubuntu-latest
2020
steps:
2121
- name: Checkout
@@ -24,44 +24,44 @@ jobs:
2424
- name: Set up Docker Buildx
2525
uses: docker/setup-buildx-action@v3
2626

27-
- name: Build reproducible gf binary
27+
- name: Build reproducible gdbf binary
2828
uses: docker/build-push-action@v5
2929
with:
3030
context: .
3131
file: .github/tools/reproducible.Dockerfile
3232
target: exporter
3333
outputs: type=local,dest=./output
3434
build-args: |
35-
GF_BUILD_JOBS=${{ runner.hw.cpu-count }}
35+
GDBF_BUILD_JOBS=${{ runner.hw.cpu-count }}
3636
3737
- name: Verify binary
3838
run: |
3939
ls -lh output/
40-
file output/gf
41-
ldd output/gf || true
40+
file output/gdbf
41+
ldd output/gdbf || true
4242
4343
- name: Create tarball
4444
run: |
4545
cd output
46-
tar -czf gf-${{ github.ref_name }}-linux-x86_64.tar.gz gf
47-
sha256sum gf-${{ github.ref_name }}-linux-x86_64.tar.gz > gf-${{ github.ref_name }}-linux-x86_64.tar.gz.sha256
46+
tar -czf gdbf-${{ github.ref_name }}-linux-x86_64.tar.gz gdbf
47+
sha256sum gdbf-${{ github.ref_name }}-linux-x86_64.tar.gz > gdbf-${{ github.ref_name }}-linux-x86_64.tar.gz.sha256
4848
4949
- name: Upload artifact
5050
uses: actions/upload-artifact@v4
5151
with:
52-
name: gf-linux-x86_64
52+
name: gdbf-linux-x86_64
5353
path: |
54-
output/gf-${{ github.ref_name }}-linux-x86_64.tar.gz
55-
output/gf-${{ github.ref_name }}-linux-x86_64.tar.gz.sha256
54+
output/gdbf-${{ github.ref_name }}-linux-x86_64.tar.gz
55+
output/gdbf-${{ github.ref_name }}-linux-x86_64.tar.gz.sha256
5656
compression-level: 0
5757

5858
- name: Upload to Release
5959
if: github.event_name == 'release' || inputs.upload-to-release
6060
uses: softprops/action-gh-release@v1
6161
with:
6262
files: |
63-
output/gf-${{ github.ref_name }}-linux-x86_64.tar.gz
64-
output/gf-${{ github.ref_name }}-linux-x86_64.tar.gz.sha256
63+
output/gdbf-${{ github.ref_name }}-linux-x86_64.tar.gz
64+
output/gdbf-${{ github.ref_name }}-linux-x86_64.tar.gz.sha256
6565
tag_name: ${{ github.ref_name }}
6666
env:
6767
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,4 +15,4 @@ build_*
1515
compile_commands.json
1616
.aider*
1717
.env
18-
.gf
18+
.gdbf

CMakeLists.txt

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -10,16 +10,16 @@
1010
cmake_minimum_required(VERSION 3.24...4.0)
1111

1212
# Extract version from gf.hpp
13-
file(STRINGS "${CMAKE_CURRENT_SOURCE_DIR}/src/gf.hpp" GF_VERSION_MAJOR_LINE REGEX "^#define GF_VERSION_MAJOR ")
14-
file(STRINGS "${CMAKE_CURRENT_SOURCE_DIR}/src/gf.hpp" GF_VERSION_MINOR_LINE REGEX "^#define GF_VERSION_MINOR ")
15-
file(STRINGS "${CMAKE_CURRENT_SOURCE_DIR}/src/gf.hpp" GF_VERSION_PATCH_LINE REGEX "^#define GF_VERSION_PATCH ")
13+
file(STRINGS "${CMAKE_CURRENT_SOURCE_DIR}/src/gf.hpp" GDBF_VERSION_MAJOR_LINE REGEX "^#define GDBF_VERSION_MAJOR ")
14+
file(STRINGS "${CMAKE_CURRENT_SOURCE_DIR}/src/gf.hpp" GDBF_VERSION_MINOR_LINE REGEX "^#define GDBF_VERSION_MINOR ")
15+
file(STRINGS "${CMAKE_CURRENT_SOURCE_DIR}/src/gf.hpp" GDBF_VERSION_PATCH_LINE REGEX "^#define GDBF_VERSION_PATCH ")
1616

17-
string(REGEX REPLACE "^#define GF_VERSION_MAJOR[ \t]+([0-9]+).*$" "\\1" GF_VERSION_MAJOR "${GF_VERSION_MAJOR_LINE}")
18-
string(REGEX REPLACE "^#define GF_VERSION_MINOR[ \t]+([0-9]+).*$" "\\1" GF_VERSION_MINOR "${GF_VERSION_MINOR_LINE}")
19-
string(REGEX REPLACE "^#define GF_VERSION_PATCH[ \t]+([0-9]+).*$" "\\1" GF_VERSION_PATCH "${GF_VERSION_PATCH_LINE}")
20-
set(DETECTED_GF_VERSION "${GF_VERSION_MAJOR}.${GF_VERSION_MINOR}.${GF_VERSION_PATCH}")
17+
string(REGEX REPLACE "^#define GDBF_VERSION_MAJOR[ \t]+([0-9]+).*$" "\\1" GDBF_VERSION_MAJOR "${GDBF_VERSION_MAJOR_LINE}")
18+
string(REGEX REPLACE "^#define GDBF_VERSION_MINOR[ \t]+([0-9]+).*$" "\\1" GDBF_VERSION_MINOR "${GDBF_VERSION_MINOR_LINE}")
19+
string(REGEX REPLACE "^#define GDBF_VERSION_PATCH[ \t]+([0-9]+).*$" "\\1" GDBF_VERSION_PATCH "${GDBF_VERSION_PATCH_LINE}")
20+
set(DETECTED_GDBF_VERSION "${GDBF_VERSION_MAJOR}.${GDBF_VERSION_MINOR}.${GDBF_VERSION_PATCH}")
2121

22-
project(gf VERSION ${DETECTED_GF_VERSION} LANGUAGES CXX)
22+
project(gdbf VERSION ${DETECTED_GDBF_VERSION} LANGUAGES CXX)
2323

2424
set(CMAKE_CXX_STANDARD 23)
2525
set(CMAKE_CXX_EXTENSIONS OFF)
@@ -71,7 +71,7 @@ if (NOT MSVC)
7171
endif()
7272

7373
## ------------------------------------------------------------------------------------
74-
## gf
74+
## gdbf
7575
## ------------------------------------------------------------------------------------
7676
if (NOT MSVC)
7777
add_executable(${PROJECT_NAME} WIN32 src/gf.cpp src/main.cpp src/re/cpp.cpp src/re/gdb.cpp)
@@ -80,7 +80,7 @@ if (NOT MSVC)
8080

8181
target_include_directories(${PROJECT_NAME} PRIVATE src deps/include )
8282
target_link_libraries(${PROJECT_NAME} luigi Threads::Threads)
83-
target_compile_definitions(${PROJECT_NAME} PRIVATE GF_VERSION_STRING="${PROJECT_VERSION}")
83+
target_compile_definitions(${PROJECT_NAME} PRIVATE GDBF_VERSION_STRING="${PROJECT_VERSION}")
8484
endif ()
8585

8686

0 commit comments

Comments
 (0)