Skip to content

Commit

Permalink
Merge pull request #352 from 3MFConsortium/release/2.3.0
Browse files Browse the repository at this point in the history
Release/2.3.0
  • Loading branch information
martinweismann authored Mar 12, 2024
2 parents 30d5c2e + e242855 commit c6aa869
Show file tree
Hide file tree
Showing 2,323 changed files with 852,130 additions and 20,883 deletions.
93 changes: 74 additions & 19 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,31 +1,66 @@
on: [push, pull_request]
name: Build
jobs:
build-linux:
runs-on: ubuntu-18.04
build-linux-memtest:
runs-on: ubuntu-20.04
steps:
- run: sudo apt install -y valgrind
- run: sudo apt update
- run: sudo apt install -y valgrind uuid-dev
- uses: actions/checkout@v2
with:
submodules: true
- run: sh cmake/GenerateMake.sh
- run: cmake --build . --target lib3mf_memcheck
working-directory: ./build
- run: ctest -V
working-directory: ./build
- name: Archive Linux binary
uses: actions/upload-artifact@v2

build-linux-ubi8-gcc12:
runs-on: ubuntu-20.04
steps:
- run: sudo apt update
- run: sudo apt install -y uuid-dev
- uses: actions/checkout@v2
with:
name: lib3mf.so
path: build/lib3mf.so.2
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
uses: docker/setup-buildx-action@v3
-
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
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
uses: actions/upload-artifact@v2
with:
name: lib3mf.so
path: dist/lib3mf.so.2

build-macos:
runs-on: macos-10.15
runs-on: macos-latest
steps:
- uses: actions/checkout@v2
with:
Expand All @@ -40,11 +75,10 @@ jobs:
with:
name: lib3mf.dylib
path: build/lib3mf.dylib

codecoverage-macos:
runs-on: macos-10.15
runs-on: macos-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
with:
submodules: true
- name: Install Prerequisites
Expand All @@ -61,7 +95,7 @@ jobs:
name: codecoverage.zip
path: build/codecoverage.zip
- name: Upload code coverage to codecov
uses: codecov/codecov-action@v1
uses: codecov/codecov-action@v3
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: ./build/Test_CPP_Bindings_filtered.info
Expand Down Expand Up @@ -105,6 +139,27 @@ jobs:
with:
name: lib3mf.debug.dll
path: build/Debug/lib3mf.dll
build-windows-32bit:
runs-on: windows-2019
steps:
- uses: actions/checkout@v2
with:
submodules: true
- run: ./cmake/GenerateVS2019_32bit.bat
- run: cmake --build . --config Release
working-directory: ./build_32bit
- run: ctest -V
working-directory: ./build_32bit
- name: Archive Windows 32 bit Release binary
uses: actions/upload-artifact@v2
with:
name: lib3mf_32bit.dll
path: build_32bit/Release/lib3mf.dll
- name: Archive Windows 32 bit Release lib
uses: actions/upload-artifact@v2
with:
name: lib3mf_32bit.lib
path: build_32bit/Release/lib3mf.lib
build-mingw-w64:
runs-on: windows-2019
steps:
Expand All @@ -118,8 +173,8 @@ jobs:
- run: ctest -V
working-directory: ./build
assemble-sdk:
runs-on: ubuntu-18.04
needs: [build-windows-release, build-linux, build-macos]
runs-on: ubuntu-20.04
needs: [build-windows-release, build-macos, build-linux-ubi8-gcc12]
steps:
- run: sudo apt install -y zip unzip
- run: mkdir build
Expand All @@ -140,7 +195,7 @@ jobs:
name: lib3mf_sdk.zip
path: build/lib3mf_sdk.zip
deploy-linux:
runs-on: ubuntu-18.04
runs-on: ubuntu-20.04
needs: [assemble-sdk]
steps:
- run: sudo apt install -y zip unzip
Expand Down Expand Up @@ -192,7 +247,7 @@ jobs:
cmake --build . --config Release
./Release/Example_ExtractInfo.exe ../../Files/Helix.3mf
deploy-macos:
runs-on: macos-10.15
runs-on: macos-latest
needs: [assemble-sdk]
steps:
- name: Download lib3mf_sdk artifact
Expand All @@ -214,4 +269,4 @@ jobs:
sh Examples/Cpp/GenerateMake.sh
cd Examples/Cpp/build
cmake --build .
./Example_ExtractInfo ../../Files/Helix.3mf
./Example_ExtractInfo ../../Files/Helix.3mf
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,4 @@ lib3MF.pc
Include/Model/COM/NMR_COMVersion.h
debug
.DS_Store
.vscode
22 changes: 17 additions & 5 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -1,6 +1,18 @@
[submodule "Tests/googletest"]
path = Tests/googletest
[submodule "submodules/AutomaticComponentToolkit"]
path = submodules/AutomaticComponentToolkit
url = https://github.com/Autodesk/AutomaticComponentToolkit.git
[submodule "submodules/fast_float"]
path = submodules/fast_float
url = https://github.com/fastfloat/fast_float.git
[submodule "submodules/zlib"]
path = submodules/zlib
url = https://github.com/madler/zlib.git
[submodule "submodules/cpp-base64"]
path = submodules/cpp-base64
url = https://github.com/ReneNyffenegger/cpp-base64.git
[submodule "submodules/libzip"]
path = submodules/libzip
url = https://github.com/nih-at/libzip.git
[submodule "submodules/googletest"]
path = submodules/googletest
url = https://github.com/google/googletest.git
[submodule "Tests/libressl"]
path = Tests/libressl
url = https://github.com/3MFConsortium/forks-libressl-distribution.git
33 changes: 28 additions & 5 deletions Autogenerated/Bindings/C/lib3mf.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,12 @@ ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
This file has been generated by the Automatic Component Toolkit (ACT) version 1.6.0.
This file has been generated by the Automatic Component Toolkit (ACT) version 1.8.0-develop.
Abstract: This is an autogenerated plain C Header file in order to allow an easy
use of the 3MF Library
Interface version: 2.2.0
Interface version: 2.3.0
*/

Expand All @@ -49,12 +49,23 @@ Interface version: 2.2.0
#include "lib3mf_types.h"


#ifdef __cplusplus
extern "C" {
#endif

/*************************************************************************************************************************
Class definition for Base
**************************************************************************************************************************/

/**
* Get Class Type Id
*
* @param[in] pBase - Base instance.
* @param[out] pClassTypeId - Class type as a 64 bits integer
* @return error code or 0 (success)
*/
LIB3MF_DECLSPEC Lib3MFResult lib3mf_base_classtypeid(Lib3MF_Base pBase, Lib3MF_uint64 * pClassTypeId);

/*************************************************************************************************************************
Class definition for Writer
**************************************************************************************************************************/
Expand Down Expand Up @@ -2036,7 +2047,7 @@ LIB3MF_DECLSPEC Lib3MFResult lib3mf_attachment_setrelationshiptype(Lib3MF_Attach
LIB3MF_DECLSPEC Lib3MFResult lib3mf_attachment_writetofile(Lib3MF_Attachment pAttachment, const char * pFileName);

/**
* Reads an attachment from a file. The path of this file is only read when this attachment is being written as part of the 3MF packege, or via the WriteToFile or WriteToBuffer-methods.
* Reads an attachment from a file. The path of this file is only read when this attachment is being written as part of the 3MF package, or via the WriteToFile or WriteToBuffer-methods.
*
* @param[in] pAttachment - Attachment instance.
* @param[in] pFileName - file to read from.
Expand All @@ -2045,7 +2056,7 @@ LIB3MF_DECLSPEC Lib3MFResult lib3mf_attachment_writetofile(Lib3MF_Attachment pAt
LIB3MF_DECLSPEC Lib3MFResult lib3mf_attachment_readfromfile(Lib3MF_Attachment pAttachment, const char * pFileName);

/**
* Reads a model and from the data provided by a callback function
* Reads an attachment from the data provided by a callback function. This callback function is only invoked when this attachment is being written as part of the 3MF package, or via the WriteToFile or WriteToBuffer-methods.
*
* @param[in] pAttachment - Attachment instance.
* @param[in] pTheReadCallback - Callback to call for reading a data chunk
Expand Down Expand Up @@ -2077,7 +2088,7 @@ LIB3MF_DECLSPEC Lib3MFResult lib3mf_attachment_getstreamsize(Lib3MF_Attachment p
LIB3MF_DECLSPEC Lib3MFResult lib3mf_attachment_writetobuffer(Lib3MF_Attachment pAttachment, const Lib3MF_uint64 nBufferBufferSize, Lib3MF_uint64* pBufferNeededCount, Lib3MF_uint8 * pBufferBuffer);

/**
* Reads an attachment from a memory buffer
* Reads an attachment from a memory buffer. This buffer is immediatly read (in contrast to the ReadFromCallback and ReadFromFile-methods).
*
* @param[in] pAttachment - Attachment instance.
* @param[in] nBufferBufferSize - Number of elements in buffer
Expand Down Expand Up @@ -3024,6 +3035,16 @@ LIB3MF_DECLSPEC Lib3MFResult lib3mf_model_querywriter(Lib3MF_Model pModel, const
*/
LIB3MF_DECLSPEC Lib3MFResult lib3mf_model_queryreader(Lib3MF_Model pModel, const char * pReaderClass, Lib3MF_Reader * pReaderInstance);

/**
* finds a model resource by its UniqueResourceID
*
* @param[in] pModel - Model instance.
* @param[in] nUniqueResourceID - UniqueResourceID
* @param[out] pResource - returns the resource instance
* @return error code or 0 (success)
*/
LIB3MF_DECLSPEC Lib3MFResult lib3mf_model_getresourcebyid(Lib3MF_Model pModel, Lib3MF_uint32 nUniqueResourceID, Lib3MF_Resource * pResource);

/**
* finds a model texture by its UniqueResourceID
*
Expand Down Expand Up @@ -3705,7 +3726,9 @@ LIB3MF_DECLSPEC Lib3MFResult lib3mf_getscaletransform(Lib3MF_single fFactorX, Li
*/
LIB3MF_DECLSPEC Lib3MFResult lib3mf_gettranslationtransform(Lib3MF_single fVectorX, Lib3MF_single fVectorY, Lib3MF_single fVectorZ, sLib3MFTransform * pTransform);

#ifdef __cplusplus
}
#endif

#endif // __LIB3MF_HEADER

Loading

0 comments on commit c6aa869

Please sign in to comment.