Skip to content

Commit

Permalink
run time
Browse files Browse the repository at this point in the history
  • Loading branch information
alnkapa committed May 27, 2024
1 parent 82771c7 commit c6ef52f
Show file tree
Hide file tree
Showing 3 changed files with 42 additions and 6 deletions.
24 changes: 19 additions & 5 deletions .github/workflows/c-cpp.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,23 @@ jobs:
submodules: true
- run: cmake .
- run: cmake --build .
- name: Run
uses: GuillaumeFalourd/[email protected]
- name: Create Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
command_line: ./my_allocator_03 ; ./my_allocator
output_file_name: output.txt
display_file_content: YES # this is also the default value if not informed
tag_name: ${{ github.run_number }}
release_name: Release ${{ github.run_number }}
draft: false
prerelease: false
- name: Upload Release Asset
id: upload-release-asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./MyAllocator-0.0.1-Linux.deb
asset_name: MyAllocator-0.0.1-Linux.deb
asset_content_type: application/vnd.debian.binary-package
20 changes: 20 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -29,3 +29,23 @@ set_target_properties(my_allocator PROPERTIES
CXX_STANDARD_REQUIRED ON
)

install(
TARGETS my_allocator_03
COMPONENT ${PROJECT_NAME}
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} # bin
)

install(
TARGETS my_allocator
COMPONENT ${PROJECT_NAME}
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} # bin
)

SET(CPACK_GENERATOR "DEB")
SET(CPACK_PACKAGE_VERSION_MAJOR ${PROJECT_VERSION_MAJOR})
SET(CPACK_PACKAGE_VERSION_MINOR ${PROJECT_VERSION_MINOR})
SET(CPACK_PACKAGE_VERSION_PATCH ${PROJECT_VERSION_PATCH})
SET(CPACK_PACKAGE_NAME ${CMAKE_PROJECT_NAME})
SET(CPACK_PACKAGE_CONTACT "my")
INCLUDE(CPack)

4 changes: 3 additions & 1 deletion run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,7 @@
# mkdir -p build
#cd build
# rm -rf *
cmake .. -DCMAKE_INSTALL_PREFIX=~
cmake .. -DPATCH_VERSION=3 -DBUILD_GMOCK=OFF -DINSTALL_GTEST=OFF -DCMAKE_INSTALL_PREFIX=~
cmake --build .
cmake --build . --target=install
cmake --build . --target=package

0 comments on commit c6ef52f

Please sign in to comment.