Work on continuous integration.
Changes in the main Makefile to include a "venv" and a "doc" targets The Jenkinsfile now uses only the Makefile. The CI/CI.bash shell script should not bu used anymore and will be deleted in a future commit.
This commit is contained in:
parent
9d76465b11
commit
fb671a065e
|
@ -4,24 +4,24 @@ pipeline {
|
||||||
stage('Initial setup...') {
|
stage('Initial setup...') {
|
||||||
steps {
|
steps {
|
||||||
echo 'Create or update the virtual Python environment'
|
echo 'Create or update the virtual Python environment'
|
||||||
sh '/bin/bash ./CI/CI.bash -i ci_venv'
|
sh 'make venv'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
stage('Testing the package...') {
|
stage('Build the code and generate tests results...') {
|
||||||
steps {
|
steps {
|
||||||
sh '/bin/bash ./CI/CI.bash -t ci_venv'
|
sh '. ./ci_venv/bin/activate && make -C src results'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
stage('Creating a setup file and test installation...') {
|
stage('Create a setup file and test installation...') {
|
||||||
steps {
|
steps {
|
||||||
sh '/bin/bash ./CI/CI.bash -p ci_venv'
|
sh 'make selfex'
|
||||||
sh '/bin/bash ./package/MsSpec*.setup --accept -- -p ./ci_venv -y'
|
sh '. ./ci_venv/bin/activate && ./package/MsSpec*.setup --accept -- -y'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
stage('Building HTML documentation...') {
|
stage('Building HTML documentation...') {
|
||||||
steps {
|
steps {
|
||||||
sh '/bin/bash ./CI/CI.bash -d ci_venv'
|
sh '. ./ci_venv/bin/activate && make doc'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
stage('Syncing website...') {
|
stage('Syncing website...') {
|
||||||
|
@ -32,8 +32,7 @@ pipeline {
|
||||||
stage('Cleaning up...') {
|
stage('Cleaning up...') {
|
||||||
steps {
|
steps {
|
||||||
echo 'Cleaning artifacts...'
|
echo 'Cleaning artifacts...'
|
||||||
sh 'rm -rf ./package'
|
sh 'make clean'
|
||||||
sh 'cd ./doc && make clean'
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
16
Makefile
16
Makefile
|
@ -12,7 +12,7 @@ else
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
|
||||||
.PHONY: clean version selfex
|
.PHONY: clean version selfex venv doc
|
||||||
|
|
||||||
|
|
||||||
selfex: clean
|
selfex: clean
|
||||||
|
@ -43,9 +43,11 @@ selfex: clean
|
||||||
@mv ./src/msspec/version.py.bak ./src/msspec/version.py
|
@mv ./src/msspec/version.py.bak ./src/msspec/version.py
|
||||||
@rm ./msspec.lsm
|
@rm ./msspec.lsm
|
||||||
|
|
||||||
|
|
||||||
version:
|
version:
|
||||||
@python ./CI/update_version.py
|
@python ./CI/update_version.py
|
||||||
|
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
@echo "Cleaning all..."
|
@echo "Cleaning all..."
|
||||||
@find ./src -type f -name '*.pyc' -exec rm -f {} +
|
@find ./src -type f -name '*.pyc' -exec rm -f {} +
|
||||||
|
@ -56,3 +58,15 @@ clean:
|
||||||
@+$(MAKE) -C doc/ clean $(SUPPRESS_OUPUT)
|
@+$(MAKE) -C doc/ clean $(SUPPRESS_OUPUT)
|
||||||
@rm -rf package
|
@rm -rf package
|
||||||
|
|
||||||
|
|
||||||
|
venv:
|
||||||
|
@virtualenv --python=python3 --system-site-packages ci_venv
|
||||||
|
@. "./ci_venv/bin/activate" && pip install --upgrade pip numpy ase h5py lxml pint terminaltables pycairo sphinx
|
||||||
|
|
||||||
|
doc:
|
||||||
|
@echo "Building pdf and html documentation..."
|
||||||
|
@mkdir -p package/
|
||||||
|
@+$(MAKE) -C doc/ latexpdf $(SUPPRESS_OUPUT)
|
||||||
|
@rm -rf package/*.pdf
|
||||||
|
@cp "doc/build/latex/MsSpec-python.pdf" "./package/MsSpec-${VERSION}.pdf"
|
||||||
|
@+$(MAKE) -C doc/ html $(SUPPRESS_OUPUT)
|
||||||
|
|
Loading…
Reference in New Issue