* github-actions: install missing cython package for creating sdist wheel

* remove VERSION from gitignore and keep VERSION file
This commit is contained in:
2021-09-21 15:56:24 +02:00
parent 71a39e90e4
commit a099849caa
5 changed files with 24 additions and 13 deletions

View File

@@ -18,8 +18,9 @@ CC = g++ -std=c++17
OPT = -O3 -Wall -Wconversion -Wpedantic -Werror -Wunused-variable -Wsign-compare
# determine git version/commit and release tag
GTAG := $(shell git tag -l --sort=version:refname | tail -n1)
GTAG := $(shell git tag -l --sort=version:refname | tail -n1 | sed "s/$^v//g")
GHSH := $(shell git rev-parse HEAD | head -c8)
GVSN := $(shell cat python/VERSION | tr -d ' \n')
# current timestamp
TMS = $(shell date +%Y%m%dT%H%M%S)
@@ -31,11 +32,11 @@ INST := /usr/local/bin
# C++ and CLI tool
# build exectuable
$(EXE) : main.o
$(EXE): check-tags $(GVSN) main.o
$(CC) $(OPT) main.o -o $@
# build main.cpp and include git version/commit tag
main.o : src/main.cpp $(HPP)
main.o: src/main.cpp $(HPP)
@cp $< $<.cpp
@sed -i 's/TAGSTRING/$(GTAG)/g' $<.cpp
@sed -i 's/HASHSTRING/$(GHSH)/g' $<.cpp
@@ -43,13 +44,13 @@ main.o : src/main.cpp $(HPP)
$(CC) -c $(OPT) -I $(LIB) $<.cpp -o $@
@rm $<.cpp
install : $(EXE)
install: $(EXE)
cp $< $(INST)/
uninstall : $(INST)/$(EXE)
uninstall: $(INST)/$(EXE)
rm $<
cpp-clean :
cpp-clean:
rm -vf $(EXE)
rm -vf *.o
@@ -59,10 +60,21 @@ cpp-clean :
check-code:
cppcheck --enable=all -I lib/ src/main.cpp
#-----------------------------------------------------------------------------#
# versions
$(GTAG):
@echo "consistent versions check successful: building $(GTAG)"
check-tags:
@echo "latest git tag: $(GTAG)"
@echo "latest git hash: $(GHSH)"
@echo "python version: $(GVSN)"
#-----------------------------------------------------------------------------#
# Docker
docker-build :
docker-build:
docker build ./ --tag imctermite:0.1
docker-run:
@@ -71,7 +83,7 @@ docker-run:
#-----------------------------------------------------------------------------#
# python
python-build:
python-build: check-tags $(GVSN)
make -C python/ build-inplace
cp python/IMCtermite*.so ./ -v