Commit b3f90a29 authored by IOhannes m zmölnig's avatar IOhannes m zmölnig
Browse files

introduce IEM_CI_PROJECT_NAME (when the repository name does not match library name)

parent 2e0a6caf
...@@ -11,7 +11,10 @@ ...@@ -11,7 +11,10 @@
### - DESTDIR: base directory for 'make install' ### - DESTDIR: base directory for 'make install'
### - pkglibdir: directory to put externals into (relative to DESTDIR) ### - pkglibdir: directory to put externals into (relative to DESTDIR)
### some more expectations: ### some more expectations:
### - 'make install' will put all relevant files into ${DESTDIR}/${pkglibdir}/${CI_PROJECT_NAME} ### - 'make install' will put all relevant files into ${DESTDIR}/${pkglibdir}/${IEM_CI_PROJECT_NAME}
### with:
### - IEM_CI_PROJECT_NAME: the name of the project (defaults to ${CI_PROJECT_NAME}, but should match
### the Pd-library name (e.g. pd-lib-builder's "lib.name")
### ###
### one well known build-system that can be used straight away is ### one well known build-system that can be used straight away is
### "pd-lib-builder" -> https://github.com/pure-data/pd-lib-builder/ ### "pd-lib-builder" -> https://github.com/pure-data/pd-lib-builder/
...@@ -22,6 +25,8 @@ variables: ...@@ -22,6 +25,8 @@ variables:
SRCDIR: . SRCDIR: .
IEM_CI_TMPDIR: .git-ci/_build/ IEM_CI_TMPDIR: .git-ci/_build/
IEM_CI_PKGLIBDIR: "" IEM_CI_PKGLIBDIR: ""
IEM_CI_PROJECT_NAME: ${CI_PROJECT_NAME}
####################################################################### #######################################################################
...@@ -39,8 +44,8 @@ variables: ...@@ -39,8 +44,8 @@ variables:
.script:make_install: &script_make_install .script:make_install: &script_make_install
- rm -rf "${IEM_CI_TMPDIR}" - rm -rf "${IEM_CI_TMPDIR}"
- make -C "${SRCDIR}" install ${pd_extension:+extension=}${pd_extension} ${TARGETARCH:+PLATFORM=}${TARGETARCH} DESTDIR="$(pwd)" pkglibdir="/${IEM_CI_TMPDIR}/${IEM_CI_PKGLIBDIR}${IEM_CI_PKGLIBDIR:+/${CI_JOB_NAME}/}" - make -C "${SRCDIR}" install ${pd_extension:+extension=}${pd_extension} ${TARGETARCH:+PLATFORM=}${TARGETARCH} DESTDIR="$(pwd)" pkglibdir="/${IEM_CI_TMPDIR}/${IEM_CI_PKGLIBDIR}${IEM_CI_PKGLIBDIR:+/${CI_JOB_NAME}/}"
- rm -rf "${IEM_CI_PKGLIBDIR:-${CI_PROJECT_NAME}}" - rm -rf "${IEM_CI_PKGLIBDIR:-${IEM_CI_PROJECT_NAME}}"
- mv "${IEM_CI_TMPDIR}/${IEM_CI_PKGLIBDIR:-${CI_PROJECT_NAME}}" . - mv "${IEM_CI_TMPDIR}/${IEM_CI_PKGLIBDIR:-${IEM_CI_PROJECT_NAME}}" .
####################################################################### #######################################################################
### configuration templates (to be used for snapshot and release builds) ### configuration templates (to be used for snapshot and release builds)
...@@ -53,7 +58,7 @@ variables: ...@@ -53,7 +58,7 @@ variables:
artifacts: artifacts:
name: ${CI_PROJECT_NAME}_${CI_COMMIT_REF_NAME}_${CI_JOB_NAME%_*} name: ${CI_PROJECT_NAME}_${CI_COMMIT_REF_NAME}_${CI_JOB_NAME%_*}
paths: paths:
- "${IEM_CI_PKGLIBDIR:-${CI_PROJECT_NAME}}" - "${IEM_CI_PKGLIBDIR:-${IEM_CI_PROJECT_NAME}}"
.snapshot: .snapshot:
except: except:
...@@ -107,7 +112,7 @@ variables: ...@@ -107,7 +112,7 @@ variables:
- export PD=$(find /Applications/Pd*.app/Contents/Resources/bin/ type f -name pd -print -quit) - export PD=$(find /Applications/Pd*.app/Contents/Resources/bin/ type f -name pd -print -quit)
after_script: after_script:
- *script_fetch_localdeps - *script_fetch_localdeps
- if [ -x .git-ci/localdeps.macos.sh ]; then find "${IEM_CI_PKGLIBDIR:-${CI_PROJECT_NAME}}" -type f "(" -name "*.pd_darwin" -o -name "*.so" ")" -exec .git-ci/localdeps.macos.sh {} +; fi - if [ -x .git-ci/localdeps.macos.sh ]; then find "${IEM_CI_PKGLIBDIR:-${IEM_CI_PROJECT_NAME}}" -type f "(" -name "*.pd_darwin" -o -name "*.so" ")" -exec .git-ci/localdeps.macos.sh {} +; fi
.build:w32: &build_w32 .build:w32: &build_w32
extends: .build:script extends: .build:script
...@@ -125,7 +130,7 @@ variables: ...@@ -125,7 +130,7 @@ variables:
- export PD="${PROGRAMFILESX86}/pd/bin/pd.com" - export PD="${PROGRAMFILESX86}/pd/bin/pd.com"
after_script: after_script:
- *script_fetch_localdeps - *script_fetch_localdeps
- if [ -x .git-ci/localdeps.win.sh ]; then find "${IEM_CI_PKGLIBDIR:-${CI_PROJECT_NAME}}" -type f "(" -name "*.${pd_extension:-m_i386}" -o -name "*.dll" -o -name "*.exe" -o -name "*.com" ")" -exec .git-ci/localdeps.win.sh {} +; fi - if [ -x .git-ci/localdeps.win.sh ]; then find "${IEM_CI_PKGLIBDIR:-${IEM_CI_PROJECT_NAME}}" -type f "(" -name "*.${pd_extension:-m_i386}" -o -name "*.dll" -o -name "*.exe" -o -name "*.com" ")" -exec .git-ci/localdeps.win.sh {} +; fi
.build:w64: &build_w64 .build:w64: &build_w64
extends: .build:script extends: .build:script
...@@ -144,7 +149,7 @@ variables: ...@@ -144,7 +149,7 @@ variables:
- export PD="${PROGRAMFILES}/pd/bin/pd.com" - export PD="${PROGRAMFILES}/pd/bin/pd.com"
after_script: after_script:
- *script_fetch_localdeps - *script_fetch_localdeps
- if [ -x .git-ci/localdeps.win.sh ]; then find "${IEM_CI_PKGLIBDIR:-${CI_PROJECT_NAME}}" -type f "(" -name "*.${pd_extension:-m_amd64}" -o -name "*.dll" -o -name "*.exe" -o -name "*.com" ")" -exec .git-ci/localdeps.win.sh {} +; fi - if [ -x .git-ci/localdeps.win.sh ]; then find "${IEM_CI_PKGLIBDIR:-${IEM_CI_PROJECT_NAME}}" -type f "(" -name "*.${pd_extension:-m_amd64}" -o -name "*.dll" -o -name "*.exe" -o -name "*.com" ")" -exec .git-ci/localdeps.win.sh {} +; fi
####################################################################### #######################################################################
### the actual jobs: (linux,macos,windows)*(release,snapshot) ### the actual jobs: (linux,macos,windows)*(release,snapshot)
...@@ -184,11 +189,11 @@ variables: ...@@ -184,11 +189,11 @@ variables:
script: script:
- chmod -R go-w . - chmod -R go-w .
# create source package # create source package
- git archive --format=tar --prefix=tmp/${CI_PROJECT_NAME}/ HEAD | tar xf - - git archive --format=tar --prefix=tmp/${IEM_CI_PROJECT_NAME}/ HEAD | tar xf -
- deken package --version="${CI_COMMIT_TAG#v}" "tmp/${CI_PROJECT_NAME}" - deken package --version="${CI_COMMIT_TAG#v}" "tmp/${IEM_CI_PROJECT_NAME}"
# create binary package # create binary package
- test -z "${IEM_CI_PKGLIBDIR}" && deken package --version="${CI_COMMIT_TAG#v}" "${CI_PROJECT_NAME}" - test -z "${IEM_CI_PKGLIBDIR}" && deken package --version="${CI_COMMIT_TAG#v}" "${IEM_CI_PROJECT_NAME}"
- test -z "${IEM_CI_PKGLIBDIR}" || find "${IEM_CI_PKGLIBDIR}" -maxdepth 2 -type d -name "${CI_PROJECT_NAME}" -exec deken package --version="${CI_COMMIT_TAG#v}" {} + - test -z "${IEM_CI_PKGLIBDIR}" || find "${IEM_CI_PKGLIBDIR}" -maxdepth 2 -type d -name "${IEM_CI_PROJECT_NAME}" -exec deken package --version="${CI_COMMIT_TAG#v}" {} +
# upload deken packages # upload deken packages
- test -z "${CI_COMMIT_TAG}" || test -z "${DEKEN_USERNAME}" || test -z "${DEKEN_PASSWORD}" || deken upload --no-source-error ./*.dek - test -z "${CI_COMMIT_TAG}" || test -z "${DEKEN_USERNAME}" || test -z "${DEKEN_PASSWORD}" || deken upload --no-source-error ./*.dek
artifacts: artifacts:
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment