Skip to content

Commit

Permalink
build
Browse files Browse the repository at this point in the history
  • Loading branch information
beutlich committed Jan 5, 2025
1 parent c226718 commit 5397843
Show file tree
Hide file tree
Showing 6 changed files with 3,592 additions and 4 deletions.
31 changes: 29 additions & 2 deletions .github/workflows/checkCI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,35 @@ defaults:
shell: bash

jobs:
build:
name: build_linux64
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 5
- name: Build with gcc
run: |
docker run --rm -v ${{ github.workspace }}:/workspace -w /workspace ubuntu:16.04 bash -c "
apt-get update &&
apt-get install -y software-properties-common build-essential &&
add-apt-repository -y ppa:ubuntu-toolchain-r/test &&
apt-get update &&
apt-get install -y gcc-4.8 g++-4.8 &&
update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-4.8 10 &&
update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-4.8 10 &&
pushd ExternData/Resources/C-Sources &&
make CFLAGS="-O3 -DNDEBUG -fPIC" CXXFLAGS="-O3 -DNDEBUG -fPIC" TARGETDIR=linux64
"
- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name: ExternData_linux64
path: ExternData/Resources/Library/linux64/*.a

test:
name: build_cmake_${{ matrix.toolchain }}
name: test_cmake_${{ matrix.toolchain }}
runs-on: ${{ matrix.os }}
timeout-minutes: 10
strategy:
Expand Down Expand Up @@ -49,7 +76,7 @@ jobs:
fi
env:
SRCDIR: ${{ github.workspace }}/ExternData/Resources
- name: Build with ${{ matrix.compiler }}
- name: Build tests with ${{ matrix.compiler }}
run: |
if [ "${{ matrix.compiler }}" == "msvc" ]; then
cmake --build build --config ${{ matrix.configuration }}
Expand Down
57 changes: 55 additions & 2 deletions ExternData/Resources/C-Sources/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ AR = ar -ru
RM = rm -f

CFLAGS = -O3
CPPFLAGS = -DHAVE_UNISTD_H=1 -DHAVE_STDARG_H=1 -DHAVE_HIDDEN=1 -DHAVE_MEMCPY=1 -DHAVE_MEMMOVE=1 -DHAVE_ZLIB=1 -DHAVE_HDF5=1 -DNDEBUG -DXML_POOR_ENTROPY -DHAVE_EXPAT_CONFIG_H -DLIBXML_STATIC
CPPFLAGS = -DHAVE_UNISTD_H=1 -DHAVE_STDARG_H=1 -DHAVE_STDINT_H=1 -DHAVE_HIDDEN=1 -DHAVE_MEMCPY=1 -DHAVE_MEMMOVE=1 -DHAVE_ZLIB=1 -DHAVE_HDF5=1 -DNDEBUG -DXML_POOR_ENTROPY -DHAVE_EXPAT_CONFIG_H -DLIBXML_STATIC
INC = -I"bsxml-json" -I"expat/lib" -I"hdf5/include" -I"inih" -I"libxls/include" -I"minizip" -I"modelica" -I"zlib" -I"parson" -I"libxml2/include"

TARGETDIR = linux64
Expand All @@ -29,6 +29,52 @@ INI_OBJS = \
JSON_OBJS = \
ED_JSONFile.o

LIBXML2_OBJS = \
libxml2/buf.o \
libxml2/c14n.o \
libxml2/catalog.o \
libxml2/chvalid.o \
libxml2/debugXML.o \
libxml2/dict.o \
libxml2/encoding.o \
libxml2/entities.o \
libxml2/error.o \
libxml2/globals.o \
libxml2/hash.o \
libxml2/HTMLparser.o \
libxml2/HTMLtree.o \
libxml2/legacy.o \
libxml2/list.o \
libxml2/nanoftp.o \
libxml2/nanohttp.o \
libxml2/parser.o \
libxml2/parserInternals.o \
libxml2/pattern.o \
libxml2/relaxng.o \
libxml2/SAX.o \
libxml2/SAX2.o \
libxml2/schematron.o \
libxml2/threads.o \
libxml2/tree.o \
libxml2/uri.o \
libxml2/valid.o \
libxml2/xinclude.o \
libxml2/xlink.o \
libxml2/xmlIO.o \
libxml2/xmlmemory.o \
libxml2/xmlmodule.o \
libxml2/xmlreader.o \
libxml2/xmlregexp.o \
libxml2/xmlsave.o \
libxml2/xmlschemas.o \
libxml2/xmlschemastypes.o \
libxml2/xmlstring.o \
libxml2/xmlunicode.o \
libxml2/xmlwriter.o \
libxml2/xpath.o \
libxml2/xpointer.o \
libxml2/xzlib.o

LIBXLS_OBJS = \
libxls/src/endian.o \
libxls/src/locale.o \
Expand All @@ -37,6 +83,9 @@ LIBXLS_OBJS = \
libxls/src/xlstool.o

MAT_OBJS = \
modelica/ModelicaIO.o \
modelica/ModelicaMatIO.o \
modelica/snprintf.o \
ED_MATFile.o

MINIZIP_OBJS = \
Expand Down Expand Up @@ -82,6 +131,7 @@ ALL_OBJS = \
$(INI_OBJS) \
$(JSON_OBJS) \
$(LIBXLS_OBJS) \
$(LIBXML2_OBJS) \
$(MAT_OBJS) \
$(MINIZIP_OBJS) \
$(PARSON_OBJS) \
Expand All @@ -93,7 +143,7 @@ ALL_OBJS = \

all: clean libs

libs: libED_CSVFile.a libED_INIFile.a libED_JSONFile.a libED_MATFile.a libED_XLSFile.a libED_XLSXFile.a libED_XMLFile.a libED_XML2File.a libbsxml-json.a libexpat.a libminizip.a libparson.a libxlsreader.a libzlib.a
libs: libED_CSVFile.a libED_INIFile.a libED_JSONFile.a libED_MATFile.a libED_XLSFile.a libED_XLSXFile.a libED_XMLFile.a libED_XML2File.a libbsxml-json.a libexpat.a libminizip.a libparson.a libxlsreader.a libxml2.a libzlib.a
mkdir -p ../Library/$(TARGETDIR)
cp $^ ../Library/$(TARGETDIR)

Expand Down Expand Up @@ -136,6 +186,9 @@ libminizip.a: $(MINIZIP_OBJS)
libxlsreader.a: $(LIBXLS_OBJS)
$(AR) $@ $(LIBXLS_OBJS)

libxml2.a: $(LIBXML2_OBJS)
$(AR) $@ $(LIBXML2_OBJS)

libzlib.a: $(ZLIB_OBJS)
$(AR) $@ $(ZLIB_OBJS)

Expand Down
Loading

0 comments on commit 5397843

Please sign in to comment.