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...') {
|
||||
steps {
|
||||
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 {
|
||||
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 {
|
||||
sh '/bin/bash ./CI/CI.bash -p ci_venv'
|
||||
sh '/bin/bash ./package/MsSpec*.setup --accept -- -p ./ci_venv -y'
|
||||
sh 'make selfex'
|
||||
sh '. ./ci_venv/bin/activate && ./package/MsSpec*.setup --accept -- -y'
|
||||
}
|
||||
}
|
||||
stage('Building HTML documentation...') {
|
||||
steps {
|
||||
sh '/bin/bash ./CI/CI.bash -d ci_venv'
|
||||
sh '. ./ci_venv/bin/activate && make doc'
|
||||
}
|
||||
}
|
||||
stage('Syncing website...') {
|
||||
|
@ -32,8 +32,7 @@ pipeline {
|
|||
stage('Cleaning up...') {
|
||||
steps {
|
||||
echo 'Cleaning artifacts...'
|
||||
sh 'rm -rf ./package'
|
||||
sh 'cd ./doc && make clean'
|
||||
sh 'make clean'
|
||||
}
|
||||
}
|
||||
|
||||
|
|
16
Makefile
16
Makefile
|
@ -12,7 +12,7 @@ else
|
|||
endif
|
||||
|
||||
|
||||
.PHONY: clean version selfex
|
||||
.PHONY: clean version selfex venv doc
|
||||
|
||||
|
||||
selfex: clean
|
||||
|
@ -43,9 +43,11 @@ selfex: clean
|
|||
@mv ./src/msspec/version.py.bak ./src/msspec/version.py
|
||||
@rm ./msspec.lsm
|
||||
|
||||
|
||||
version:
|
||||
@python ./CI/update_version.py
|
||||
|
||||
|
||||
clean:
|
||||
@echo "Cleaning all..."
|
||||
@find ./src -type f -name '*.pyc' -exec rm -f {} +
|
||||
|
@ -56,3 +58,15 @@ clean:
|
|||
@+$(MAKE) -C doc/ clean $(SUPPRESS_OUPUT)
|
||||
@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