Skip to content

Commit

Permalink
Merge branch 'develop' into 'main'
Browse files Browse the repository at this point in the history
New GDX release 7.11.7

See merge request devel/gdx!75
  • Loading branch information
0x17 committed Sep 19, 2024
2 parents 79d9395 + 516d0f2 commit 1d38171
Show file tree
Hide file tree
Showing 46 changed files with 713 additions and 478 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,5 @@
/src/gdxcc.h
/venv/
/docs/html/
/gdx/x64/
/gdx/x64/
/src/__pycache__
113 changes: 63 additions & 50 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ stages:
- image-build
- apiwrap
- fetch-scripts
- install-gams
- build
- analyze
- test
Expand All @@ -15,13 +14,15 @@ stages:

include:
- project: 'devel/ciscripts'
file: .install-jobs.yml
file: '.shared-vars.yml'
- project: 'devel/ciscripts'
file: .shared-vars.yml
file: '.codechecker.yml'
- project: 'devel/ciscripts'
file: .image-build.yml
file: '.shared-snippets.yml'
- project: 'devel/ciscripts'
file: .codechecker.yml
file: '.fetch-job.yml'
- project: 'devel/ciscripts'
file: '.image-build.yml'

variables:
extends: .shared-variables
Expand Down Expand Up @@ -74,7 +75,7 @@ apigenerator:
- |
for f in "gdxcc.h" "gdxcc.c" "gdxcclib.cpp" "gclgms.h" "gdx.h" "gdxcwrap.hpp" "gdxcppwrap.h"; do
echo "Diffing 'apifiles/$f' with 'generated/$f'"
if ! diff apifiles/$f generated/$f; then
if ! diff -w --strip-trailing-cr apifiles/$f generated/$f; then
echo "Warning: $f stored in repo and freshly generated differ!"
fi
done
Expand All @@ -85,31 +86,19 @@ apigenerator:

#=======================================================================================================================

install-gamsdist-leg:
extends: .install-gams-leg

install-gamsdist-deg:
extends: .install-gams-deg

install-gamsdist-dac:
extends: .install-gams-dac

install-gamsdist-wei:
extends: .install-gams-wei

#=======================================================================================================================

build-leg:
stage: build
tags: [linux]
image:
name: $MACHINES_CONTAINER_REG/leg/builder-full:latest
name: $MACHINES_CONTAINER_REG/leg/builder-devel:latest
entrypoint: [""]
script:
- !reference [.get-gams]
- !reference [.gams-folder-leg]
- cp apifiles/* src/
- cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_VERBOSE_MAKEFILE:BOOL=ON CMakeLists.txt
- cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_VERBOSE_MAKEFILE:BOOL=OFF CMakeLists.txt
- cmake --build . 2>&1 | tee build_log.txt
- python3 ci/report_for_log.py gcc build_log.txt warnings.xml
- python3 ciscripts/report_for_log.py gcc build_log.txt warnings.xml
- mv libgdx-static.a libgdx-linux.a
needs: [fetch-ci-scripts,apigenerator]
artifacts:
Expand All @@ -123,11 +112,13 @@ build-debug-leg:
stage: build
tags: [linux]
image:
name: $MACHINES_CONTAINER_REG/leg/builder-full:latest
name: $MACHINES_CONTAINER_REG/leg/builder-devel:latest
entrypoint: [""]
script:
- !reference [.get-gams]
- !reference [.gams-folder-leg]
- cp apifiles/* src/
- cmake -DCMAKE_BUILD_TYPE=Debug -DCMAKE_VERBOSE_MAKEFILE:BOOL=ON CMakeLists.txt
- cmake -DCMAKE_BUILD_TYPE=Debug -DCMAKE_VERBOSE_MAKEFILE:BOOL=OFF CMakeLists.txt
- cmake --build . 2>&1
- mv gdxtest gdxtest_dbg
needs: [fetch-ci-scripts,apigenerator]
Expand All @@ -138,12 +129,14 @@ build-debug-leg:

build-deg:
stage: build
tags: [carla] # macOS x64
tags: [macos]
script:
- !reference [.get-gams]
- !reference [.gams-folder-deg]
- cp apifiles/* src/
- cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_VERBOSE_MAKEFILE:BOOL=ON -DCMAKE_CXX_COMPILER=clang++ CMakeLists.txt
- cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_VERBOSE_MAKEFILE:BOOL=OFF -DCMAKE_CXX_COMPILER=clang++ CMakeLists.txt
- cmake --build . 2>&1 | tee build_log.txt
- python3 ci/report_for_log.py clang build_log.txt warnings.xml
- python3 ciscripts/report_for_log.py clang build_log.txt warnings.xml
- mv libgdx-static.a libgdx-macos.a
needs: [fetch-ci-scripts,apigenerator]
artifacts:
Expand All @@ -157,12 +150,14 @@ build-dac:
stage: build
tags: [macos-arm64]
script:
- !reference [.get-gams]
- !reference [.gams-folder-dac]
- mv libgdxcclib64.dylib libgdxcclib64_deg.dylib
- mv libgdx-macos.a libgdx-macos-deg.a
- cp apifiles/* src/
- cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_VERBOSE_MAKEFILE:BOOL=ON -DCMAKE_CXX_COMPILER=clang++ CMakeLists.txt
- cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_VERBOSE_MAKEFILE:BOOL=OFF -DCMAKE_CXX_COMPILER=clang++ CMakeLists.txt
- cmake --build . 2>&1 | tee build_log.txt
- python3 ci/report_for_log.py clang build_log.txt warnings.xml
- python3 ciscripts/report_for_log.py clang build_log.txt warnings.xml
- mv libgdxcclib64.dylib libgdxcclib64_dac.dylib
- mv libgdx-static.a libgdx-macos-dac.a
- lipo -create libgdxcclib64_deg.dylib libgdxcclib64_dac.dylib -output libgdxcclib64.dylib
Expand All @@ -177,14 +172,16 @@ build-dac:

build-wei:
stage: build
tags: [pond]
tags: [windows]
image:
name: $MACHINES_CONTAINER_REG/wei/builder-full:latest
script:
- !reference [.get-gams-wei]
- !reference [.gams-folder-wei]
- cp apifiles/* src/
- cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_VERBOSE_MAKEFILE:BOOL=ON CMakeLists.txt
- cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_VERBOSE_MAKEFILE:BOOL=OFF CMakeLists.txt
- cmake --build . --config Release -- -m | Tee-Object -FilePath 'build_log.txt'
- python ci/report_for_log.py msvc build_log.txt warnings.xml
- python ciscripts/report_for_log.py msvc build_log.txt warnings.xml
needs: [fetch-ci-scripts,apigenerator]
artifacts:
name: gdx-wei
Expand All @@ -199,19 +196,23 @@ codechecker-leg:
extends: .codechecker-leg
needs: [fetch-ci-scripts,apigenerator]
script:
- !reference [.get-gams]
- !reference [.gams-folder-leg]
- cp apifiles/* src/
- !reference [.default-codecheck-script, script]

#=======================================================================================================================

test-leg:
stage: test
tags: [puma]
tags: [linux]
image:
name: $MACHINES_CONTAINER_REG/leg/builder-full:latest
name: $MACHINES_CONTAINER_REG/leg/builder-devel:latest
entrypoint: [""]
needs: [build-leg,install-gamsdist-leg]
needs: [fetch-ci-scripts,build-leg]
script:
- !reference [ .get-gams ]
- !reference [ .gams-folder-leg ]
- GAMS_PATH=/cache/gams-installs/`cat gams_folder_leg.txt`/
- PATH=$GAMS_PATH:$PATH LD_LIBRARY_PATH="$GAMS_PATH" GMSPYTHONLIB="$GAMS_PATH/GMSPython/lib/libpython3.12.so" ./gdxtest --reporters=junit --out=doctest_results_linux.xml
- LD_LIBRARY_PATH=`pwd` ./gdxwraptest --reporters=junit --out=doctest_results_wrap_linux.xml
Expand All @@ -224,9 +225,11 @@ test-leg:

test-deg:
stage: test
tags: [carla] # macOS x64
needs: [build-deg,install-gamsdist-deg]
tags: [macos]
needs: [fetch-ci-scripts,build-deg]
script:
- !reference [ .get-gams ]
- !reference [ .gams-folder-deg ]
- GAMS_PATH=$HOME/cache/gams-installs/`cat gams_folder_deg.txt`
- PATH=$GAMS_PATH:$PATH DYLD_LIBRARY_PATH=$(pwd)/lib:$GAMS_PATH GMSPYTHONLIB=$GAMS_PATH/GMSPython/lib/libpython3.12.dylib ./gdxtest --reporters=junit --out=doctest_results_deg.xml
- ./gdxwraptest --reporters=junit --out=doctest_results_wrap_deg.xml
Expand All @@ -239,8 +242,10 @@ test-deg:
test-dac:
stage: test
tags: [macos-arm64]
needs: [build-dac,install-gamsdist-dac]
needs: [fetch-ci-scripts,build-dac]
script:
- !reference [ .get-gams ]
- !reference [ .gams-folder-dac ]
- GAMS_PATH=$HOME/cache/gams-installs/`cat gams_folder_dac.txt`
- PATH=$GAMS_PATH:$PATH DYLD_LIBRARY_PATH=$(pwd)/lib:$GAMS_PATH GMSPYTHONLIB=$GAMS_PATH/GMSPython/lib/libpython3.12.dylib ./gdxtest --reporters=junit --out=doctest_results_dac.xml
- ./gdxwraptest --reporters=junit --out=doctest_results_wrap_dac.xml
Expand All @@ -252,11 +257,13 @@ test-dac:

test-wei:
stage: test
tags: [pond]
tags: [windows]
image:
name: $MACHINES_CONTAINER_REG/wei/builder-full:latest
needs: [build-wei,install-gamsdist-wei]
needs: [fetch-ci-scripts,build-wei]
script:
- !reference [ .get-gams-wei ]
- !reference [ .gams-folder-wei ]
- $gmsdirname = Get-Content mygmsdir.tmp -Raw
- $GAMS_PATH = "C:\Cache\gams-installs\$gmsdirname"
- $env:Path = "$GAMS_PATH;$GAMS_PATH\gbin;" + $env:Path
Expand All @@ -273,17 +280,21 @@ test-wei:

leak-check-leg:
stage: leak-check
tags: [puma]
tags: [linux]
image:
name: registry.gams.com/devel/ciscripts/leg/builder-valgrind-codequality:latest
entrypoint: [""]
needs: [fetch-ci-scripts,build-debug-leg,install-gamsdist-leg]
when: manual # FIXME: resolve GLIBC_2.* not found!
needs: [fetch-ci-scripts,build-debug-leg]
script:
- !reference [ .get-gams ]
- !reference [ .gams-folder-leg ]
- GAMS_PATH=/cache/gams-installs/`cat gams_folder_leg.txt`/
- ulimit -n 1024
- PATH=$GAMS_PATH:$PATH LD_LIBRARY_PATH="$GAMS_PATH" GMSPYTHONLIB="$GAMS_PATH/GMSPython/lib/libpython3.12.so" valgrind --leak-check=yes ./gdxtest_dbg
- PATH=$GAMS_PATH:$PATH LD_LIBRARY_PATH="$GAMS_PATH" GMSPYTHONLIB="$GAMS_PATH/GMSPython/lib/libpython3.12.so" valgrind --leak-check=yes --xml=yes --xml-file=valgrind_out.xml ./gdxtest_dbg
- PYTHONPATH=$PYTHONPATH:valgrind-codequality python3 -m valgrind_codequality --input-file valgrind_out.xml --output-file valgrind_out.json
- python3 ci/codechecker_to_xml.py valgrind_out.json valgrind_junit.xml
- python3 ciscripts/codechecker_to_xml.py valgrind_out.json valgrind_junit.xml
artifacts:
name: leak-check-results-leg
expire_in: 2 hours
Expand All @@ -296,13 +307,15 @@ leak-check-leg:

perf-check-leg:
stage: perf-check
tags: [puma]
tags: [linux]
image:
name: $MACHINES_CONTAINER_REG/leg/builder-full:latest
name: $MACHINES_CONTAINER_REG/leg/builder-devel:latest
entrypoint: [""]
needs: [fetch-ci-scripts,build-leg,install-gamsdist-leg]
needs: [fetch-ci-scripts,build-leg]
when: manual
script:
- !reference [ .get-gams ]
- !reference [ .gams-folder-leg ]
- SUITE_NAME=gdxfiles
- PERF_CALL="gams gdxperf procTreeMemMonitor=1 --RUN=suite --SUITE=${SUITE_NAME} --RUNDEFAULT=0 --RUNCAPI=1"
- ARCHIVE_NAME="gdxfiles.zip"
Expand All @@ -314,8 +327,8 @@ perf-check-leg:
- GAMS_PATH=`pwd`/mygamsdist/
- ${GAMS_PATH}apilib gdxperf
- PATH=$GAMS_PATH:$PATH LD_LIBRARY_PATH="$GAMS_PATH" GMSPYTHONLIB="$GAMS_PATH/GMSPython/lib/libpython3.12.so" ${PERF_CALL} | tee cppgdx.log
# - python3 ci/fetch_gams.py fetch_and_install dist43 $SSH_KEY_PORTING
# - python3 ci/fetch_gams.py version $PF_CUSTOM_BRANCH $SSH_KEY_PORTING > gams43_folder_leg.txt
# - python3 ciscripts/fetch_gams.py fetch_and_install dist43 $SSH_KEY_PORTING
# - python3 ciscripts/fetch_gams.py version $PF_CUSTOM_BRANCH $SSH_KEY_PORTING > gams43_folder_leg.txt
# - GAMS_PATH=/cache/gams-installs/`cat gams43_folder_leg.txt`/
- G43_ARCHIVE="gamsdist43.tar.bz2"
- G43_CLOUD_URL="$GAMS43_CLOUD_URL"
Expand Down Expand Up @@ -348,7 +361,7 @@ doxygen-html:
stage: docs
tags: [linux]
image:
name: $MACHINES_CONTAINER_REG/leg/builder-full:latest
name: $MACHINES_CONTAINER_REG/leg/builder-devel:latest
entrypoint: [""]
script:
- python3 ci/readme_filter.py
Expand Down
2 changes: 2 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ endif ()
if (UNIX)
# -fsanitize=undefined -fno-inline
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wreturn-type -Wmissing-declarations -Wno-unknown-pragmas")
#set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wconversion -funsigned-char") # aggressive signage warnings
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DZ_HAVE_UNISTD_H")
if (NOT APPLE AND NOT CMAKE_C_COMPILER_ID STREQUAL "Clang")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wformat-truncation=0")
Expand Down Expand Up @@ -82,6 +83,7 @@ set(gdx-core
src/gdlib/utils.cpp
src/gdlib/strutilx.h
src/gdlib/strutilx.cpp
src/gdlib/strindexbuf.h

# GDX specific units
src/gxfile.h
Expand Down
10 changes: 7 additions & 3 deletions changelog.yaml
Original file line number Diff line number Diff line change
@@ -1,8 +1,12 @@
---
- 7.11.7:
- Fix building GDX on arm64 with GCC (char is unsigned by default there).
- Multiple cosmetic changes.
- Another batch of changes to infrastructure code and CI pipeline that is not directly affecting GDX.
- 7.11.6:
- Make building (so far) unused infrastructure classes in CMake project optional
- Added toggles to disable building tests and examples as part of CMake project (use -DNO_TESTS=ON or -DNO_EXAMPLES=ON)
- Extended README with short recipe for quickly building a minimal GDX library with CMake
- Make building (so far) unused infrastructure classes in CMake project optional.
- Added toggles to disable building tests and examples as part of CMake project (use -DNO_TESTS=ON or -DNO_EXAMPLES=ON).
- Extended README with short recipe for quickly building a minimal GDX library with CMake.
- 7.11.5:
- Fixed gdxOpenAppend not indicating a problem (in the return code) when trying to append to a GDX file with format version before 7 (incompatible for appending).
- Fixed gdxDataReadMap crashing when record (user-mapped) UEL indices are out of bounds (index exceeds number of UELs).
Expand Down
4 changes: 2 additions & 2 deletions generated/gdxcwrap.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ int gdxFilterRegisterStart( TGXFileRec_t *pgdx, int FilterNr );
int gdxFindSymbol( TGXFileRec_t *pgdx, const char *SyId, int *SyNr );
int gdxGetElemText( TGXFileRec_t *pgdx, int TxtNr, char *Txt, int *Node );
int gdxGetLastError( TGXFileRec_t *pgdx);
int gdxGetMemoryUsed( TGXFileRec_t *pgdx);
INT64 gdxGetMemoryUsed( TGXFileRec_t *pgdx);
int gdxGetSpecialValues( TGXFileRec_t *pgdx, double *AVals );
int gdxGetUEL( TGXFileRec_t *pgdx, int UelNr, char *Uel );
int gdxMapValue( TGXFileRec_t *pgdx, double D, int *sv );
Expand Down Expand Up @@ -461,7 +461,7 @@ GDX_INLINE int gdxGetLastError( TGXFileRec_t *pgx)
return reinterpret_cast<gdx::TGXFileObj *>( pgx )->gdxGetLastError();
}

GDX_INLINE int gdxGetMemoryUsed( TGXFileRec_t *pgx)
GDX_INLINE INT64 gdxGetMemoryUsed( TGXFileRec_t *pgx)
{
return reinterpret_cast<gdx::TGXFileObj *>( pgx )->gdxGetMemoryUsed();
}
Expand Down
Loading

0 comments on commit 1d38171

Please sign in to comment.