151 lines
5.3 KiB
YAML
151 lines
5.3 KiB
YAML
#######################################################################
|
|
### .git-ci/gitlab-iem.yml for Pd externals: v1.2
|
|
###
|
|
### this can be used for any external with a build system like:
|
|
### - 'make' builds the external
|
|
### - 'make install' installs the external to be used by Pd
|
|
### the following make variables must be honoured:
|
|
### - extension: filename extension for externals
|
|
### - DESTDIR: base directory for 'make install'
|
|
### - pkglibdir: directory to put externals into (relative to DESTDIR)
|
|
###
|
|
### one well known build-system that can be used straight away is
|
|
### "pd-lib-builder" -> https://github.com/pure-data/pd-lib-builder/
|
|
#######################################################################
|
|
|
|
variables:
|
|
PDVERSION: 0.49-0
|
|
|
|
#######################################################################
|
|
### configuration templates (to be used for snapshot and release builds)
|
|
.build:snapshot: &snapshot
|
|
except:
|
|
- tags
|
|
artifacts: &snapshot_artifacts
|
|
name: ${CI_PROJECT_NAME}_${CI_COMMIT_REF_NAME}_${CI_JOB_NAME%_*}
|
|
paths:
|
|
- "${CI_PROJECT_NAME}"
|
|
expire_in: 1 week
|
|
|
|
.build:release: &release
|
|
only:
|
|
- tags
|
|
artifacts: &release_artifacts
|
|
name: ${CI_PROJECT_NAME}_${CI_COMMIT_REF_NAME}_${CI_JOB_NAME%_*}
|
|
paths:
|
|
- "${CI_PROJECT_NAME}"
|
|
|
|
.build:linux: &build_linux
|
|
image: gcc
|
|
stage: build
|
|
before_script:
|
|
- apt-get update && apt-get install -y --no-install-recommends make puredata-dev puredata
|
|
- if [ -e .git-ci/requirements.apt ]; then apt-get install -y --no-install-recommends $(cat .git-ci/requirements.apt | sed -e '/^#/d'); fi
|
|
- export PD=/usr/bin/pd
|
|
script:
|
|
- make
|
|
- make install DESTDIR=$(pwd) pkglibdir=/
|
|
|
|
.build:macos: &build_macos
|
|
tags:
|
|
- osx
|
|
stage: build
|
|
before_script:
|
|
- if [ -e .git-ci/requirements.brew ]; then brew bundle --no-upgrade --file=.git-ci/requirements.brew; fi
|
|
- wget -q -O Pd.tgz http://msp.ucsd.edu/Software/pd-${PDVERSION}.mac.tar.gz
|
|
- rm -rf /Applications/Pd*.app/
|
|
- tar xvf Pd.tgz -C /Applications/
|
|
- rm -f Pd.tgz
|
|
- export PD=$(find /Applications/Pd*.app/Contents/Resources/bin/ type f -name pd -print -quit)
|
|
script:
|
|
- make
|
|
- make install DESTDIR=$(pwd) pkglibdir=/
|
|
after_script:
|
|
- if [ -x .git-ci/localdeps.macos.sh ]; then find "${CI_PROJECT_NAME}" -type f "(" -name "*.pd_darwin" -o -name "*.so" ")" -exec .git-ci/localdeps.macos.sh {} +; fi
|
|
|
|
.build:w32: &build_w32
|
|
stage: build
|
|
tags:
|
|
- windows
|
|
variables:
|
|
IEMCI_CONFIGURATIONS: mingw32
|
|
before_script:
|
|
- if [ -e .git-ci/requirements.msys2 ]; then pacman --noconfirm -S --needed $(cat .git-ci/requirements.msys2 | sed -e 's|#.*||' -e "s|@MINGW@|${MINGW_PACKAGE_PREFIX}-|"); fi
|
|
- wget -q -O Pd.zip http://msp.ucsd.edu/Software/pd-${PDVERSION}-i386.msw.zip
|
|
- rm -rf "${PROGRAMFILESX86}/pd"; mkdir -p "${PROGRAMFILESX86}/pd"
|
|
- unzip -q Pd.zip -d "${PROGRAMFILESX86}/pd"
|
|
- mv -v "${PROGRAMFILESX86}/pd"/*/* "${PROGRAMFILESX86}/pd"
|
|
- export PD="${PROGRAMFILESX86}/pd/bin/pd.com"
|
|
script:
|
|
- make
|
|
- make install DESTDIR=$(pwd) pkglibdir=/
|
|
after_script:
|
|
- if [ -x .git-ci/localdeps.win.sh ]; then find "${CI_PROJECT_NAME}" -type f "(" -name "*.m_i386" -o -name "*.dll" -o -name "*.exe" -o -name "*.com" ")" -exec .git-ci/localdeps.win.sh {} +; fi
|
|
|
|
.build:w64: &build_w64
|
|
stage: build
|
|
tags:
|
|
- windows
|
|
variables:
|
|
IEMCI_CONFIGURATIONS: mingw64
|
|
before_script:
|
|
- if [ -e .git-ci/requirements.msys2 ]; then pacman --noconfirm -S --needed $(cat .git-ci/requirements.msys2 | sed -e 's|#.*||' -e "s|@MINGW@|${MINGW_PACKAGE_PREFIX}-|"); fi
|
|
- wget -q -O Pd.zip http://msp.ucsd.edu/Software/pd-${PDVERSION}.msw.zip
|
|
- rm -rf "${PROGRAMFILES}/pd"; mkdir -p "${PROGRAMFILES}/pd"
|
|
- unzip -q Pd.zip -d "${PROGRAMFILES}/pd"
|
|
- mv -v "${PROGRAMFILES}/pd"/*/* "${PROGRAMFILES}/pd"
|
|
- export PD="${PROGRAMFILES}/pd/bin/pd.com"
|
|
script:
|
|
- make extension=m_amd64
|
|
- make install extension=m_amd64 DESTDIR=$(pwd) pkglibdir=/
|
|
after_script:
|
|
- if [ -x .git-ci/localdeps.win.sh ]; then find "${CI_PROJECT_NAME}" -type f "(" -name "*.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)
|
|
|
|
Linux:
|
|
<<: *build_linux
|
|
<<: *release
|
|
Darwin:
|
|
<<: *build_macos
|
|
<<: *release
|
|
w32:
|
|
<<: *build_w32
|
|
<<: *release
|
|
w64:
|
|
<<: *build_w64
|
|
<<: *release
|
|
|
|
|
|
Linux_snapshot:
|
|
<<: *build_linux
|
|
<<: *snapshot
|
|
Darwin_snapshot:
|
|
<<: *build_macos
|
|
<<: *snapshot
|
|
w32_snapshot:
|
|
<<: *build_w32
|
|
<<: *snapshot
|
|
w64_snapshot:
|
|
<<: *build_w64
|
|
<<: *snapshot
|
|
|
|
#######################################################################
|
|
### create deken packages and (optionally) upload them
|
|
deken:
|
|
stage: deploy
|
|
image: debian:buster
|
|
only:
|
|
- tags
|
|
variables:
|
|
DEKEN_ROOT: "yes"
|
|
before_script:
|
|
- apt-get update && apt-get --no-install-recommends -y install deken git
|
|
script:
|
|
- chmod -R go-w .
|
|
- git archive --format=tar --prefix=tmp/${CI_PROJECT_NAME}/ HEAD | tar xf -
|
|
- deken package --version="${CI_COMMIT_TAG#v}" "tmp/${CI_PROJECT_NAME}"
|
|
- deken package --version="${CI_COMMIT_TAG#v}" "${CI_PROJECT_NAME}"
|
|
- test -z "${DEKEN_USERNAME}" || test -z "${DEKEN_PASSWORD}" || deken upload --no-source-error ./*.dek
|