<commit_before>variables:
  RELEASE_VERSION: "0.12.5.1"
  GIT_STRATEGY: "clone"
  MAKEJOBS: "-j4"
  CCACHE_SIZE: "100M"
  CROWN_CONFIG_ALL: "--disable-reduced-exports --disable-dependency-tracking --prefix=$CI_PROJECT_DIR/depends/$HOST --bindir=$CI_PROJECT_DIR/$OUTDIR/bin --libdir=$CI_PROJECT_DIR/$OUTDIR/lib"
  SDK_URL: "https://bitcoincore.org/depends-sources/sdks"
  WINEDEBUG: "fixme-all"

cache:
  paths:
  - depends/built
  - depends/sdk-sources

.job_template: &job_definition
  stage: build
  before_script:
    - if [ -n "$PACKAGES" ]; then sudo apt-get update; fi
    - if [ -n "$PACKAGES" ]; then sudo apt-get install --no-install-recommends --no-upgrade -qq $PACKAGES; fi
    - unset CC; unset CXX
    - mkdir -p depends/SDKs depends/sdk-sources out
    - if [ -n "$OSX_SDK" -a ! -f depends/sdk-sources/MacOSX${OSX_SDK}.sdk.tar.gz ]; then curl --location --fail $SDK_URL/MacOSX${OSX_SDK}.sdk.tar.gz -o depends/sdk-sources/MacOSX${OSX_SDK}.sdk.tar.gz; fi
    - if [ -n "$OSX_SDK" -a -f depends/sdk-sources/MacOSX${OSX_SDK}.sdk.tar.gz ]; then tar -C depends/SDKs -xf depends/sdk-sources/MacOSX${OSX_SDK}.sdk.tar.gz; fi
    - make $MAKEJOBS -C depends HOST=$HOST $DEP_OPTS
  script:
    - ./autogen.sh
    - mkdir build && cd build
    - ../configure --cache-file=config.cache $CROWN_CONFIG_ALL $CROWN_CONFIG
    - make distdir VERSION=$HOST
    - cd crown-$HOST
    - ./configure --cache-file=../config.cache $CROWN_CONFIG_ALL $CROWN_CONFIG
    - make $MAKEJOBS $GOAL || ( echo "Build failure. Verbose build follows." && make $GOAL V=1 ; false )
    - if [ -n "$OSX_SDK" ]; then cp Crown-Qt.dmg ../../Crown-Qt.dmg; fi

.job_template: &win64_definition
  variables:
    CROWN_CONFIG: "--enable-mingw"
    HOST: "x86_64-w64-mingw32"
    GOAL: "install"
    OUTDIR: "Crown-${RELEASE_VERSION}-Win64"
    PACKAGES: "nsis gcc-mingw-w64-x86-64 g++-mingw-w64-x86-64 binutils-mingw-w64-x86-64 wine1.6 bc"

.job_template: &win32_definition
  variables:
    CROWN_CONFIG: ""
    HOST: "i686-w64-mingw32"
    GOAL: "install"
    OUTDIR: "Crown-${RELEASE_VERSION}-Win32"
    PACKAGES: "nsis g++-mingw-w64-i686 gcc-mingw-w64-i686 binutils-mingw-w64-i686 wine1.6 bc"

.job_template: &linux64_definition
  variables:
    CROWN_CONFIG: "--enable-glibc-back-compat"
    HOST: "x86_64-unknown-linux-gnu"
    GOAL: "install"
    OUTDIR: "Crown-${RELEASE_VERSION}-Linux64"
    DEP_OPTS: "USE_LINUX_STATIC_QT5=1"

.job_template: &linux32_definition
  variables:
    CROWN_CONFIG: "--enable-glibc-back-compat"
    HOST: "i686-pc-linux-gnu"
    GOAL: "install"
    DEP_OPTS: "USE_LINUX_STATIC_QT5=1"
    OUTDIR: "Crown-${RELEASE_VERSION}-Linux32"
    PACKAGES: "g++-multilib bc"

.job_template: &raspberrypi_definition
  variables:
    CROWN_CONFIG: "--enable-glibc-back-compat"
    HOST: "arm-linux-gnueabihf"
    GOAL: "install"
    OUTDIR: "Crown-${RELEASE_VERSION}-RaspberryPi"
    PACKAGES: "g++-arm-linux-gnueabihf"

.job_template: &osx_definition
  variables:
    CROWN_CONFIG: ""
    HOST: "x86_64-apple-darwin11"
    GOAL: "install deploy"
    OSX_SDK: "10.7"
    OUTDIR: "Crown-${RELEASE_VERSION}-Osx"
    PACKAGES: "cmake gcc-multilib g++-multilib libcap-dev libbz2-dev"

# Artifact settings for releases and snapshots
.job_template: &release_definition
  artifacts:
    name: "$OUTDIR"
    paths:
    - $OUTDIR
  only:
    - master
    - tags

.job_template: &snapshot_definition
  artifacts:
    name: "$OUTDIR"
    paths:
    - $OUTDIR
    expire_in: 2 weeks
  except:
    - master
    - tags

.job_template: &macos_release_definition
  artifacts:
    name: "$OUTDIR"-dmg
    paths:
    - Crown-Qt.dmg
  only:
    - master
    - tags

.job_template: &macos_snapshot_definition
  artifacts:
    name: "$OUTDIR"-dmg
    paths:
    - Crown-Qt.dmg
    expire_in: 2 weeks
  except:
    - master
    - tags


# Job definitions for releases
Win64:
  <<: *win64_definition 
  <<: *job_definition 
  <<: *release_definition 
  
Win32:
  <<: *win32_definition 
  <<: *job_definition
  <<: *release_definition 

Linux64:
  <<: *linux64_definition 
  <<: *job_definition
  <<: *release_definition 

Linux32:
  <<: *linux32_definition 
  <<: *job_definition 
  <<: *release_definition 

RaspberryPi:
  <<: *raspberrypi_definition
  <<: *job_definition
  <<: *release_definition 

Osx:
  <<: *osx_definition
  <<: *job_definition 
  <<: *release_definition

Osx-dmg:
  <<: *osx_definition
  <<: *job_definition 
  <<: *macos_release_definition

# Job definitions for temporary builds (snapshots)
Win64-snapshot:
  <<: *win64_definition 
  <<: *job_definition 
  <<: *snapshot_definition 
  
Win32-snapshot:
  <<: *win32_definition 
  <<: *job_definition
  <<: *snapshot_definition 

Linux64-snapshot:
  <<: *linux64_definition 
  <<: *job_definition
  <<: *snapshot_definition 

Linux32-snapshot:
  <<: *linux32_definition 
  <<: *job_definition 
  <<: *snapshot_definition 

RaspberryPi-snapshot:
  <<: *raspberrypi_definition
  <<: *job_definition
  <<: *snapshot_definition 

Osx-snapshot:
  <<: *osx_definition
  <<: *job_definition 
  <<: *snapshot_definition 

Osx-snapshot-dmg:
  <<: *osx_definition
  <<: *job_definition 
  <<: *macos_snapshot_definition 

# Trigger the docker build and delivery
trigger_docker_build:
  stage: deploy
  script:
  - curl --request POST --form "token=$CI_JOB_TOKEN" --form ref=master  --form "variables[VERSION_TAG]=$CI_COMMIT_TAG" https://gitlab.crown.tech/api/v4/projects/17/trigger/pipeline
  only:
  - tags
<commit_msg>Fixed postfix<commit_after>variables:
  RELEASE_VERSION: "0.12.5.1"
  GIT_STRATEGY: "clone"
  MAKEJOBS: "-j4"
  CCACHE_SIZE: "100M"
  CROWN_CONFIG_ALL: "--disable-reduced-exports --disable-dependency-tracking --prefix=$CI_PROJECT_DIR/depends/$HOST --bindir=$CI_PROJECT_DIR/$OUTDIR/bin --libdir=$CI_PROJECT_DIR/$OUTDIR/lib"
  SDK_URL: "https://bitcoincore.org/depends-sources/sdks"
  WINEDEBUG: "fixme-all"

cache:
  paths:
  - depends/built
  - depends/sdk-sources

.job_template: &job_definition
  stage: build
  before_script:
    - if [ -n "$PACKAGES" ]; then sudo apt-get update; fi
    - if [ -n "$PACKAGES" ]; then sudo apt-get install --no-install-recommends --no-upgrade -qq $PACKAGES; fi
    - unset CC; unset CXX
    - mkdir -p depends/SDKs depends/sdk-sources out
    - if [ -n "$OSX_SDK" -a ! -f depends/sdk-sources/MacOSX${OSX_SDK}.sdk.tar.gz ]; then curl --location --fail $SDK_URL/MacOSX${OSX_SDK}.sdk.tar.gz -o depends/sdk-sources/MacOSX${OSX_SDK}.sdk.tar.gz; fi
    - if [ -n "$OSX_SDK" -a -f depends/sdk-sources/MacOSX${OSX_SDK}.sdk.tar.gz ]; then tar -C depends/SDKs -xf depends/sdk-sources/MacOSX${OSX_SDK}.sdk.tar.gz; fi
    - make $MAKEJOBS -C depends HOST=$HOST $DEP_OPTS
  script:
    - ./autogen.sh
    - mkdir build && cd build
    - ../configure --cache-file=config.cache $CROWN_CONFIG_ALL $CROWN_CONFIG
    - make distdir VERSION=$HOST
    - cd crown-$HOST
    - ./configure --cache-file=../config.cache $CROWN_CONFIG_ALL $CROWN_CONFIG
    - make $MAKEJOBS $GOAL || ( echo "Build failure. Verbose build follows." && make $GOAL V=1 ; false )
    - if [ -n "$OSX_SDK" ]; then cp Crown-Qt.dmg ../../Crown-Qt.dmg; fi

.job_template: &win64_definition
  variables:
    CROWN_CONFIG: "--enable-mingw"
    HOST: "x86_64-w64-mingw32"
    GOAL: "install"
    OUTDIR: "Crown-${RELEASE_VERSION}-Win64"
    PACKAGES: "nsis gcc-mingw-w64-x86-64 g++-mingw-w64-x86-64 binutils-mingw-w64-x86-64 wine1.6 bc"

.job_template: &win32_definition
  variables:
    CROWN_CONFIG: ""
    HOST: "i686-w64-mingw32"
    GOAL: "install"
    OUTDIR: "Crown-${RELEASE_VERSION}-Win32"
    PACKAGES: "nsis g++-mingw-w64-i686 gcc-mingw-w64-i686 binutils-mingw-w64-i686 wine1.6 bc"

.job_template: &linux64_definition
  variables:
    CROWN_CONFIG: "--enable-glibc-back-compat"
    HOST: "x86_64-unknown-linux-gnu"
    GOAL: "install"
    OUTDIR: "Crown-${RELEASE_VERSION}-Linux64"
    DEP_OPTS: "USE_LINUX_STATIC_QT5=1"

.job_template: &linux32_definition
  variables:
    CROWN_CONFIG: "--enable-glibc-back-compat"
    HOST: "i686-pc-linux-gnu"
    GOAL: "install"
    DEP_OPTS: "USE_LINUX_STATIC_QT5=1"
    OUTDIR: "Crown-${RELEASE_VERSION}-Linux32"
    PACKAGES: "g++-multilib bc"

.job_template: &raspberrypi_definition
  variables:
    CROWN_CONFIG: "--enable-glibc-back-compat"
    HOST: "arm-linux-gnueabihf"
    GOAL: "install"
    OUTDIR: "Crown-${RELEASE_VERSION}-RaspberryPi"
    PACKAGES: "g++-arm-linux-gnueabihf"

.job_template: &osx_definition
  variables:
    CROWN_CONFIG: ""
    HOST: "x86_64-apple-darwin11"
    GOAL: "install deploy"
    OSX_SDK: "10.7"
    OUTDIR: "Crown-${RELEASE_VERSION}-Osx"
    PACKAGES: "cmake gcc-multilib g++-multilib libcap-dev libbz2-dev"

# Artifact settings for releases and snapshots
.job_template: &release_definition
  artifacts:
    name: "$OUTDIR"
    paths:
    - $OUTDIR
  only:
    - master
    - tags

.job_template: &snapshot_definition
  artifacts:
    name: "$OUTDIR"
    paths:
    - $OUTDIR
    expire_in: 2 weeks
  except:
    - master
    - tags

.job_template: &macos_release_definition
  artifacts:
    name: "$OUTDIR-dmg"
    paths:
    - Crown-Qt.dmg
  only:
    - master
    - tags

.job_template: &macos_snapshot_definition
  artifacts:
    name: "$OUTDIR-dmg"
    paths:
    - Crown-Qt.dmg
    expire_in: 2 weeks
  except:
    - master
    - tags


# Job definitions for releases
Win64:
  <<: *win64_definition 
  <<: *job_definition 
  <<: *release_definition 
  
Win32:
  <<: *win32_definition 
  <<: *job_definition
  <<: *release_definition 

Linux64:
  <<: *linux64_definition 
  <<: *job_definition
  <<: *release_definition 

Linux32:
  <<: *linux32_definition 
  <<: *job_definition 
  <<: *release_definition 

RaspberryPi:
  <<: *raspberrypi_definition
  <<: *job_definition
  <<: *release_definition 

Osx:
  <<: *osx_definition
  <<: *job_definition 
  <<: *release_definition

Osx-dmg:
  <<: *osx_definition
  <<: *job_definition 
  <<: *macos_release_definition

# Job definitions for temporary builds (snapshots)
Win64-snapshot:
  <<: *win64_definition 
  <<: *job_definition 
  <<: *snapshot_definition 
  
Win32-snapshot:
  <<: *win32_definition 
  <<: *job_definition
  <<: *snapshot_definition 

Linux64-snapshot:
  <<: *linux64_definition 
  <<: *job_definition
  <<: *snapshot_definition 

Linux32-snapshot:
  <<: *linux32_definition 
  <<: *job_definition 
  <<: *snapshot_definition 

RaspberryPi-snapshot:
  <<: *raspberrypi_definition
  <<: *job_definition
  <<: *snapshot_definition 

Osx-snapshot:
  <<: *osx_definition
  <<: *job_definition 
  <<: *snapshot_definition 

Osx-snapshot-dmg:
  <<: *osx_definition
  <<: *job_definition 
  <<: *macos_snapshot_definition 

# Trigger the docker build and delivery
trigger_docker_build:
  stage: deploy
  script:
  - curl --request POST --form "token=$CI_JOB_TOKEN" --form ref=master  --form "variables[VERSION_TAG]=$CI_COMMIT_TAG" https://gitlab.crown.tech/api/v4/projects/17/trigger/pipeline
  only:
  - tags

{'fraction_non_alphanumeric': 0.14477064220183486, 'fraction_numerical': 0.02495412844036697, 'mean_word_length': 3.4493877551020407, 'pattern_counts': {'":': 0, '<': 171, '<?xml version=': 0, '>': 3, 'https://': 4, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 2, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '53887', 'n_tokens_mistral': 4477, 'n_tokens_neox': 4152, 'n_words': 733}