Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
39 changes: 39 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -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
Comment on lines +28 to +39
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do you use something similar for the presolver? Maybe its nice to have this automated.. but maybe not necessary (we can always do releases manually).

4 changes: 2 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@dance858 are you okay with starting at 0.1.0? The last number usually is for patch fixes, and minor for new features.

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}")

Expand Down