-
Notifications
You must be signed in to change notification settings - Fork 96
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Improvements to CMake + Introduction of CPack based packages #346
Merged
gangatp
merged 40 commits into
3MFConsortium:feature/cmake-improvements
from
vijaiaeroastro:develop
Apr 15, 2024
Merged
Changes from all commits
Commits
Show all changes
40 commits
Select commit
Hold shift + click to select a range
13dc8dd
Include CMake config to make lib3mf into a valid CMake package and ch…
vijaiaeroastro b75f5ec
Update gitignore
vijaiaeroastro 397d572
Comment out unnecessary workflows for easier debugging
vijaiaeroastro 931ad81
.
vijaiaeroastro 7034f68
Disable memtest workflow too. Its expensive
vijaiaeroastro 181d62b
Include CPack generation for all 3 platforms
vijaiaeroastro 13ae405
Included CPack artifact archiving for all 3 platforms (First version)
vijaiaeroastro 0e0fad5
Fix erroneous paths in windows and osx. Linux works (but double zippi…
vijaiaeroastro 9465875
Update dll path in CMake script
vijaiaeroastro e9aa144
Include Debian and RPM build too (Testing)
vijaiaeroastro 5b9477b
Install RPM build
vijaiaeroastro a4dbd99
Make a variable called CDYNAMIC_SOURCE available for the CDynamic var…
vijaiaeroastro a34e7ec
Make changes to make LIB3MF_LIBRARY_LOCATION available to source file…
vijaiaeroastro caf9207
Check if artifact is single or double zipped
vijaiaeroastro be09ed2
Test SDK generation again
vijaiaeroastro 372804d
Testing sdk generation
vijaiaeroastro ff7256b
Inclue cpacked artifacts to assemble SDK
vijaiaeroastro a461025
Make necessary changes to ensure that linking does not happen in CDyn…
vijaiaeroastro 3ded78b
First steps toward testing cpacked SDK's
vijaiaeroastro 65f213d
Including Linux CppDynamic + Cpacked Cmake build
vijaiaeroastro 9625d60
Include DL also to CppDynamic linking
vijaiaeroastro 55bab75
Include Cpp variant example for Cpacked Linux package
vijaiaeroastro af3745b
Cpp failure is due to a lower CMake version. First version of routine…
vijaiaeroastro a955a12
Remove erroneous ls command from windows deployment
vijaiaeroastro 2cc3470
First tests for debian package
vijaiaeroastro 0267604
Include examples for debian package too
vijaiaeroastro 7b2a70f
Check the path once for debian
vijaiaeroastro 660dfd2
Check if debian is being double zipped
vijaiaeroastro f8f66f7
.
vijaiaeroastro 9d8eb4f
Check the type of debian archive
vijaiaeroastro 62680b0
.
vijaiaeroastro 1be809f
Debian tests should go through
vijaiaeroastro 30f7430
Include architecture to debian package
vijaiaeroastro 24a034b
Calling find_package twice is problematic. So we fix the issue
vijaiaeroastro e9a3209
Fix a minor mistake in Examples
vijaiaeroastro dffabe7
Re-enable all blocks of the pipeline. Maintainer email has not been c…
vijaiaeroastro c967681
Update maintainer email
vijaiaeroastro 0b212ba
A preliminary addition to config.cmake to copy libraries. The functio…
vijaiaeroastro 0331062
Update CMake to remove global warning flags
vijaiaeroastro 5be552e
Dynamically choose the library directory based on the type of tool chain
vijaiaeroastro File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,9 @@ | ||
on: [push, pull_request] | ||
env: | ||
LIB3MF_VERSION: "2.3.0" | ||
name: Build | ||
jobs: | ||
|
||
build-linux-memtest: | ||
runs-on: ubuntu-20.04 | ||
steps: | ||
|
@@ -23,41 +26,65 @@ jobs: | |
submodules: true | ||
- run: mkdir -p build | ||
- run: zip -r build/bindings.zip Autogenerated/Bindings | ||
|
||
- name: Archive bindings | ||
uses: actions/upload-artifact@v2 | ||
with: | ||
name: bindings.zip | ||
path: build/bindings.zip | ||
- | ||
name: Set up Docker Buildx | ||
- name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v3 | ||
- | ||
name: Docker Build | ||
- name: Docker Build | ||
uses: docker/build-push-action@v5 | ||
with: | ||
context: . | ||
file: ./CI/Dockerfile | ||
platforms: linux/amd64 | ||
tags: lib3mf_ubi8:latest | ||
load: true | ||
- | ||
name: Docker Extract | ||
- name: Docker Extract | ||
uses: shrink/[email protected] | ||
id: extract | ||
with: | ||
image: lib3mf_ubi8:latest | ||
path: out.zip | ||
destination: dist | ||
|
||
- run: unzip out.zip | ||
working-directory: ./dist | ||
- | ||
name: Upload Artifact | ||
- name: Upload Artifact | ||
uses: actions/upload-artifact@v2 | ||
with: | ||
name: lib3mf.so | ||
path: dist/lib3mf.so.2 | ||
path: dist/lib3mf.so.2 | ||
- name: Extract File Name (CPacked Archive) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Is this Archive still necessary ? |
||
run: | | ||
ZIP_FILE=$(ls dist/lib3mf-*.zip) | ||
echo "ARTIFACT_NAME_ZIP=$(basename ${ZIP_FILE})" >> $GITHUB_ENV | ||
shell: bash | ||
- name: Upload Artifact (CPacked Archive) | ||
uses: actions/upload-artifact@v2 | ||
with: | ||
name: ${{ env.ARTIFACT_NAME_ZIP }} | ||
path: dist/${{ env.ARTIFACT_NAME_ZIP }} | ||
- name: Extract File Name (Debian) | ||
run: | | ||
DEB_FILE=$(ls dist/lib3mf-*.deb) | ||
echo "ARTIFACT_NAME_DEB=$(basename ${DEB_FILE})" >> $GITHUB_ENV | ||
shell: bash | ||
- name: Upload Artifact (Debian Archive) | ||
uses: actions/upload-artifact@v2 | ||
with: | ||
name: ${{ env.ARTIFACT_NAME_DEB }} | ||
path: dist/${{ env.ARTIFACT_NAME_DEB }} | ||
- name: Extract File Name (RPM) | ||
run: | | ||
RPM_FILE=$(ls dist/lib3mf-*.rpm) | ||
echo "ARTIFACT_NAME_RPM=$(basename ${RPM_FILE})" >> $GITHUB_ENV | ||
shell: bash | ||
- name: Upload Artifact (RPM Archive) | ||
uses: actions/upload-artifact@v2 | ||
with: | ||
name: ${{ env.ARTIFACT_NAME_RPM }} | ||
path: dist/${{ env.ARTIFACT_NAME_RPM }} | ||
|
||
build-macos: | ||
runs-on: macos-latest | ||
|
@@ -70,11 +97,24 @@ jobs: | |
working-directory: ./build | ||
- run: ctest -V | ||
working-directory: ./build | ||
- run: cpack -G ZIP -C Release | ||
working-directory: ./build | ||
- name: Extract File Name | ||
run: | | ||
ZIP_FILE=$(ls build/lib3mf-*.zip) | ||
echo "ARTIFACT_NAME=$(basename ${ZIP_FILE})" >> $GITHUB_ENV | ||
shell: bash | ||
- name: Archive Mac binary | ||
uses: actions/upload-artifact@v2 | ||
with: | ||
name: lib3mf.dylib | ||
path: build/lib3mf.dylib | ||
- name: Upload Artifact (CPacked Archive) | ||
uses: actions/upload-artifact@v2 | ||
with: | ||
name: ${{ env.ARTIFACT_NAME }} | ||
path: build/${{ env.ARTIFACT_NAME }} | ||
|
||
codecoverage-macos: | ||
runs-on: macos-latest | ||
steps: | ||
|
@@ -113,6 +153,13 @@ jobs: | |
working-directory: ./build | ||
- run: ctest -V | ||
working-directory: ./build | ||
- run: cpack -G ZIP -C Release | ||
working-directory: ./build | ||
- name: Extract File Name | ||
run: | | ||
$zipFile = Get-ChildItem build\lib3mf-*.zip -Name | ||
echo "ARTIFACT_NAME=$zipFile" | Out-File -FilePath $env:GITHUB_ENV -Append | ||
shell: pwsh | ||
- name: Archive Windows Release binary | ||
uses: actions/upload-artifact@v2 | ||
with: | ||
|
@@ -123,6 +170,12 @@ jobs: | |
with: | ||
name: lib3mf.lib | ||
path: build/Release/lib3mf.lib | ||
- name: Upload Artifact (CPacked Archive) | ||
uses: actions/upload-artifact@v2 | ||
with: | ||
name: ${{ env.ARTIFACT_NAME }} | ||
path: build/${{ env.ARTIFACT_NAME }} | ||
|
||
build-windows-debug: | ||
runs-on: windows-2019 | ||
steps: | ||
|
@@ -172,6 +225,8 @@ jobs: | |
working-directory: ./build | ||
- run: ctest -V | ||
working-directory: ./build | ||
|
||
|
||
assemble-sdk: | ||
runs-on: ubuntu-20.04 | ||
needs: [build-windows-release, build-macos, build-linux-ubi8-gcc12] | ||
|
@@ -189,16 +244,43 @@ jobs: | |
- run: unzip bindings.zip/bindings.zip | ||
working-directory: ./build | ||
- run: bash SDK/GenerateSDK_github.sh | ||
- name: Archive SDK artifact | ||
- name: Archive SDK artifact (Comprehensive) | ||
uses: actions/upload-artifact@v2 | ||
with: | ||
name: lib3mf_sdk.zip | ||
path: build/lib3mf_sdk.zip | ||
- name: Archive SDK artifact (CPack - Linux) | ||
uses: actions/upload-artifact@v2 | ||
with: | ||
name: lib3mf-${{ env.LIB3MF_VERSION }}-Linux.zip | ||
path: build/lib3mf-${{ env.LIB3MF_VERSION }}-Linux.zip | ||
- name: Archive SDK artifact (CPack - Windows) | ||
uses: actions/upload-artifact@v2 | ||
with: | ||
name: lib3mf-${{ env.LIB3MF_VERSION }}-Windows.zip | ||
path: build/lib3mf-${{ env.LIB3MF_VERSION }}-Windows.zip | ||
- name: Archive SDK artifact (CPack - Darwin) | ||
uses: actions/upload-artifact@v2 | ||
with: | ||
name: lib3mf-${{ env.LIB3MF_VERSION }}-Darwin.zip | ||
path: build/lib3mf-${{ env.LIB3MF_VERSION }}-Darwin.zip | ||
- name: Archive SDK artifact (CPack - Debian) | ||
uses: actions/upload-artifact@v2 | ||
with: | ||
name: lib3mf-${{ env.LIB3MF_VERSION }}-Linux.deb | ||
path: build/lib3mf-${{ env.LIB3MF_VERSION }}-Linux.deb | ||
- name: Archive SDK artifact (CPack - RPM) | ||
uses: actions/upload-artifact@v2 | ||
with: | ||
name: lib3mf-${{ env.LIB3MF_VERSION }}-Linux.rpm | ||
path: build/lib3mf-${{ env.LIB3MF_VERSION }}-Linux.rpm | ||
|
||
|
||
deploy-linux: | ||
runs-on: ubuntu-20.04 | ||
needs: [assemble-sdk] | ||
steps: | ||
- run: sudo apt install -y zip unzip | ||
- run: sudo apt install -y zip unzip file | ||
- run: pwd | ||
- run: ls -Rl . | ||
- name: Download lib3mf_sdk artifact | ||
|
@@ -222,6 +304,54 @@ jobs: | |
cd Examples/Cpp/build | ||
cmake --build . | ||
./Example_ExtractInfo ../../Files/Helix.3mf | ||
- name: Download lib3mf cpack (Linux) | ||
uses: actions/download-artifact@v2 | ||
with: | ||
name: lib3mf-${{ env.LIB3MF_VERSION }}-Linux.zip | ||
path: lib3mf-${{ env.LIB3MF_VERSION }}-Linux.zip | ||
- run: ls -Rl . | ||
- name: Unpack the cpacked SDK | ||
run: | | ||
unzip lib3mf-${{ env.LIB3MF_VERSION }}-Linux.zip/lib3mf-${{ env.LIB3MF_VERSION }}-Linux.zip | ||
- name: Build CppDynamicNew | ||
run: | | ||
sh Examples/CppDynamicNew/GenerateMake.sh | ||
cd Examples/CppDynamicNew/build | ||
cmake --build . | ||
./Example_ExtractInfo ../../Files/Helix.3mf | ||
- name: Build CppNew | ||
run: | | ||
sh Examples/CppNew/GenerateMake.sh | ||
cd Examples/CppNew/build | ||
cmake --build . | ||
./Example_ExtractInfo ../../Files/Helix.3mf | ||
- name: Download lib3mf (Debian Linux) | ||
uses: actions/download-artifact@v2 | ||
with: | ||
name: lib3mf-${{ env.LIB3MF_VERSION }}-Linux.deb | ||
path: lib3mf-${{ env.LIB3MF_VERSION }}-Linux.deb | ||
- name: Check the file type | ||
run: | | ||
file lib3mf-${{ env.LIB3MF_VERSION }}-Linux.deb | ||
file lib3mf-${{ env.LIB3MF_VERSION }}-Linux.deb/lib3mf-${{ env.LIB3MF_VERSION }}-Linux.deb | ||
- run: pwd | ||
- run: ls -Rl . | ||
- name: Install the debian package | ||
run: | | ||
sudo dpkg -i lib3mf-${{ env.LIB3MF_VERSION }}-Linux.deb/lib3mf-${{ env.LIB3MF_VERSION }}-Linux.deb | ||
- name: Build CppDynamicNew (Debian) | ||
run: | | ||
sh Examples/CppDynamicNew/GenerateMake.sh | ||
cd Examples/CppDynamicNew/build | ||
cmake --build . | ||
./Example_ExtractInfo ../../Files/Helix.3mf | ||
- name: Build CppNew (Debian) | ||
run: | | ||
sh Examples/CppNew/GenerateMake.sh | ||
cd Examples/CppNew/build | ||
cmake --build . | ||
./Example_ExtractInfo ../../Files/Helix.3mf | ||
|
||
deploy-windows: | ||
runs-on: windows-2019 | ||
needs: [assemble-sdk] | ||
|
@@ -246,6 +376,27 @@ jobs: | |
cd Examples/Cpp/build | ||
cmake --build . --config Release | ||
./Release/Example_ExtractInfo.exe ../../Files/Helix.3mf | ||
- name: Download lib3mf cpack (Windows) | ||
uses: actions/download-artifact@v2 | ||
with: | ||
name: lib3mf-${{ env.LIB3MF_VERSION }}-Windows.zip | ||
path: lib3mf-${{ env.LIB3MF_VERSION }}-Windows.zip | ||
- name: Unpack the cpacked SDK | ||
run: | | ||
unzip lib3mf-${{ env.LIB3MF_VERSION }}-Windows.zip/lib3mf-${{ env.LIB3MF_VERSION }}-Windows.zip | ||
- name: Build CppDynamic (Windows) | ||
run: | | ||
./Examples/CppDynamic/GenerateVS2019.bat | ||
cd Examples/CppDynamic/build | ||
cmake --build . --config Release | ||
./Release/Example_ExtractInfo.exe ../../Files/Helix.3mf | ||
- name: Build Cpp (Windows) | ||
run: | | ||
./Examples/Cpp/GenerateVS2019.bat | ||
cd Examples/Cpp/build | ||
cmake --build . --config Release | ||
./Release/Example_ExtractInfo.exe ../../Files/Helix.3mf | ||
|
||
deploy-macos: | ||
runs-on: macos-latest | ||
needs: [assemble-sdk] | ||
|
@@ -269,4 +420,25 @@ jobs: | |
sh Examples/Cpp/GenerateMake.sh | ||
cd Examples/Cpp/build | ||
cmake --build . | ||
./Example_ExtractInfo ../../Files/Helix.3mf | ||
- name: Download lib3mf cpack (Darwin) | ||
uses: actions/download-artifact@v2 | ||
with: | ||
name: lib3mf-${{ env.LIB3MF_VERSION }}-Darwin.zip | ||
path: lib3mf-${{ env.LIB3MF_VERSION }}-Darwin.zip | ||
- run: ls -Rl . | ||
- name: Unpack the cpacked SDK (Darwin) | ||
run: | | ||
unzip lib3mf-${{ env.LIB3MF_VERSION }}-Darwin.zip/lib3mf-${{ env.LIB3MF_VERSION }}-Darwin.zip | ||
- name: Build CppDynamicNew (Darwin) | ||
run: | | ||
sh Examples/CppDynamicNew/GenerateMake.sh | ||
cd Examples/CppDynamicNew/build | ||
cmake --build . | ||
./Example_ExtractInfo ../../Files/Helix.3mf | ||
- name: Build CppNew (Darwin) | ||
run: | | ||
sh Examples/CppNew/GenerateMake.sh | ||
cd Examples/CppNew/build | ||
cmake --build . | ||
./Example_ExtractInfo ../../Files/Helix.3mf |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,3 +5,5 @@ Include/Model/COM/NMR_COMVersion.h | |
debug | ||
.DS_Store | ||
.vscode | ||
.idea | ||
cmake-build-* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Change the version to 2.3.1