Commit a6cfd593 authored by Fabian Müller's avatar Fabian Müller
Browse files

Replace disable-debugging-macro with shell script

parent 7f1281f0
Loading
Loading
Loading
Loading
+2 −6
Original line number Diff line number Diff line
@@ -66,10 +66,6 @@ stages:
    echo "Commit time was $CI_COMMIT_TIMESTAMP"
    ("echo 'System time is'", "Get-Date -Format 'dddd dd/MM/yyyy HH:mm K'") | Invoke-Expression

.disable-debugging-macro: &disable-debugging-macro
# automatically disable #DEBUGGING macro in options.h using /**/-comment
  - sed -i.bak -e "s/^[[:space:]]*\(#define[[:space:]]*DEBUGGING\)/\/\*\1\*\//g" lib_com/options.h

.enable-debugging-macro: &enable-debugging-macro
# automatically enable #DEBUGGING macro in options.h using either /**/-comment or //-comment
  - sed -i.bak -e "s/\/\*\ *\(#define\ *DEBUGGING\ *\)\*\//\1/g" lib_com/options.h
@@ -86,7 +82,7 @@ stages:

.merge-request-comparison-setup-codec: &merge-request-comparison-setup-codec 
  ### build test binaries, initial clean for paranoia reasons
  - *disable-debugging-macro
  - bash "${CI_PROJECT_DIR}"/.gitlab-ci/snippets/disable-debugging-macro.sh
  - make clean
  - mkdir build
  - cd build
@@ -109,7 +105,7 @@ stages:
  - echo "Building reference codec at commit $target_commit"

  ### build reference binaries
  - *disable-debugging-macro
  - bash "${CI_PROJECT_DIR}"/.gitlab-ci/snippets/disable-debugging-macro.sh
  - cd build
  - cmake ..
  - make -j
+8 −0
Original line number Diff line number Diff line
#! /bin/bash

set -euo pipefail

cd "${CI_PROJECT_DIR}"

# automatically disable #DEBUGGING macro in options.h using /**/-comment
sed -i.bak -e "s/^[[:space:]]*\(#define[[:space:]]*DEBUGGING\)/\/\*\1\*\//g" lib_com/options.h