From a8465da925490a5617b0cc04b14e26dea9e872e5 Mon Sep 17 00:00:00 2001 From: William Zijie Zhang Date: Fri, 30 Jan 2026 23:21:14 -0500 Subject: [PATCH 1/2] Add release workflow and documentation - Add .github/workflows/release.yml for automated GitHub releases on tag push - Add RELEASE.md documenting release and submodule update procedures - Bump version to 0.1.0 Co-Authored-By: Claude Opus 4.5 --- .github/workflows/release.yml | 39 ++++++++++++++++++++ CMakeLists.txt | 4 +- RELEASE.md | 69 +++++++++++++++++++++++++++++++++++ 3 files changed, 110 insertions(+), 2 deletions(-) create mode 100644 .github/workflows/release.yml create mode 100644 RELEASE.md diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..812d831 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,39 @@ +name: Release + +on: + push: + tags: + - 'v*' + +jobs: + # Run tests before creating release + test: + runs-on: ${{ matrix.os }} + strategy: + matrix: + os: [ubuntu-latest, macos-latest] + steps: + - uses: actions/checkout@v4 + + - name: Configure CMake + run: cmake -B build -S . -DCMAKE_BUILD_TYPE=Release + + - name: Build + run: cmake --build build --config Release + + - name: Run tests + run: ./build/all_tests + + # Create GitHub release after tests pass + release: + needs: test + runs-on: ubuntu-latest + permissions: + contents: write + steps: + - uses: actions/checkout@v4 + + - name: Create Release + uses: softprops/action-gh-release@v2 + with: + generate_release_notes: true diff --git a/CMakeLists.txt b/CMakeLists.txt index 0c62fcf..5d938dc 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -3,8 +3,8 @@ project(DNLP_Diff_Engine C) set(CMAKE_C_STANDARD 99) set(DIFF_ENGINE_VERSION_MAJOR 0) -set(DIFF_ENGINE_VERSION_MINOR 0) -set(DIFF_ENGINE_VERSION_PATCH 1) +set(DIFF_ENGINE_VERSION_MINOR 1) +set(DIFF_ENGINE_VERSION_PATCH 0) set(DIFF_ENGINE_VERSION "${DIFF_ENGINE_VERSION_MAJOR}.${DIFF_ENGINE_VERSION_MINOR}.${DIFF_ENGINE_VERSION_PATCH}") add_compile_definitions(DIFF_ENGINE_VERSION="${DIFF_ENGINE_VERSION}") diff --git a/RELEASE.md b/RELEASE.md new file mode 100644 index 0000000..8c5edc1 --- /dev/null +++ b/RELEASE.md @@ -0,0 +1,69 @@ +# Release Procedures + +This document describes how to create releases and update the DNLP submodule. + +## Creating a New Release + +1. **Update version in `CMakeLists.txt`**: + ```cmake + set(DIFF_ENGINE_VERSION_MAJOR 0) + set(DIFF_ENGINE_VERSION_MINOR 2) + set(DIFF_ENGINE_VERSION_PATCH 0) + ``` + +2. **Commit the version bump**: + ```bash + git add CMakeLists.txt + git commit -m "Bump version to 0.2.0" + git push origin main + ``` + +3. **Create and push tag**: + ```bash + git tag v0.2.0 + git push origin v0.2.0 + ``` + +4. **Automatic release**: GitHub Actions will: + - Run tests on the tagged commit (ubuntu-latest, macos-latest) + - Create a GitHub release with auto-generated release notes + +## Updating DNLP Submodule + +After creating a release in diff_engine_core, update the DNLP repository: + +1. **Update submodule to the new tag**: + ```bash + cd DNLP + cd diff_engine_core + git fetch --tags + git checkout v0.2.0 + cd .. + ``` + +2. **Commit the submodule update**: + ```bash + git add diff_engine_core + git commit -m "Update diff_engine_core to v0.2.0" + git push + ``` + +## Versioning Scheme + +We follow [Semantic Versioning](https://semver.org/): + +- **MAJOR**: Breaking API changes (function signatures, struct layouts) +- **MINOR**: New features, backward compatible (new atoms, optimizations) +- **PATCH**: Bug fixes only + +## Verifying a Release + +After pushing a tag, verify the release was created: + +1. Check [GitHub Actions](../../actions) for the release workflow status +2. Check [Releases](../../releases) for the new release entry +3. Test the submodule update in DNLP: + ```bash + cd diff_engine_core && git checkout v0.2.0 && cd .. + git status # Should show submodule change + ``` From 0dafe896f0f579d1d8988fe3a90e5d7dc7d04dc3 Mon Sep 17 00:00:00 2001 From: William Zijie Zhang Date: Fri, 30 Jan 2026 23:24:54 -0500 Subject: [PATCH 2/2] Move RELEASE.md to DNLP repository Co-Authored-By: Claude Opus 4.5 --- RELEASE.md | 69 ------------------------------------------------------ 1 file changed, 69 deletions(-) delete mode 100644 RELEASE.md diff --git a/RELEASE.md b/RELEASE.md deleted file mode 100644 index 8c5edc1..0000000 --- a/RELEASE.md +++ /dev/null @@ -1,69 +0,0 @@ -# Release Procedures - -This document describes how to create releases and update the DNLP submodule. - -## Creating a New Release - -1. **Update version in `CMakeLists.txt`**: - ```cmake - set(DIFF_ENGINE_VERSION_MAJOR 0) - set(DIFF_ENGINE_VERSION_MINOR 2) - set(DIFF_ENGINE_VERSION_PATCH 0) - ``` - -2. **Commit the version bump**: - ```bash - git add CMakeLists.txt - git commit -m "Bump version to 0.2.0" - git push origin main - ``` - -3. **Create and push tag**: - ```bash - git tag v0.2.0 - git push origin v0.2.0 - ``` - -4. **Automatic release**: GitHub Actions will: - - Run tests on the tagged commit (ubuntu-latest, macos-latest) - - Create a GitHub release with auto-generated release notes - -## Updating DNLP Submodule - -After creating a release in diff_engine_core, update the DNLP repository: - -1. **Update submodule to the new tag**: - ```bash - cd DNLP - cd diff_engine_core - git fetch --tags - git checkout v0.2.0 - cd .. - ``` - -2. **Commit the submodule update**: - ```bash - git add diff_engine_core - git commit -m "Update diff_engine_core to v0.2.0" - git push - ``` - -## Versioning Scheme - -We follow [Semantic Versioning](https://semver.org/): - -- **MAJOR**: Breaking API changes (function signatures, struct layouts) -- **MINOR**: New features, backward compatible (new atoms, optimizations) -- **PATCH**: Bug fixes only - -## Verifying a Release - -After pushing a tag, verify the release was created: - -1. Check [GitHub Actions](../../actions) for the release workflow status -2. Check [Releases](../../releases) for the new release entry -3. Test the submodule update in DNLP: - ```bash - cd diff_engine_core && git checkout v0.2.0 && cd .. - git status # Should show submodule change - ```