<commit_before>#!/bin/bash
# SPDX-License-Identifier: GPL-2.0+
#
# Copyright (C) 2017, <NAME> <<EMAIL>>
#
#
# Script to build release-archives with. This requires a checkout from git.
# WARNING: This script is very dangerous! It may delete any untracked files.

set -e

have_version=0
NUMCPUS=$(grep -c '^processor' /proc/cpuinfo)

usage()
{
        echo "Usage: $0 -v version"
}

args=$(getopt -o v:s -- "$@")
if [ $? -ne 0 ] ; then
        usage
        exit 1
fi
eval set -- "$args"
while [ $# -gt 0 ]
do
        case "$1" in
        -v)
                version=$2
                have_version=1
                shift
                ;;
        --)
                shift
                break
                ;;
        *)
                echo "Invalid option: $1"
                usage
                exit 1
                ;;
        esac
        shift
done

# Do we have a desired version number?
if [ "$have_version" -gt 0 ] ; then
       echo "trying to build version $version"
else
       echo "please specify a version"
       usage
       exit 1
fi

# Version number sanity check
if grep ${version} configure.ac
then
       echo "configurations seems ok"
else
       echo "please check your configure.ac"
       exit 1
fi

# Check that we are on master
branch=$(git rev-parse --abbrev-ref HEAD)
echo "we are on branch $branch"

if [ ! "${branch}" = "master" ] ; then
	echo "you don't seem to be on the master branch"
	exit 1
fi

if git diff-index --quiet HEAD --; then
	# no changes
	echo "there are no uncommitted changes (version bump)"
	exit 1
fi
echo "======================================================"
echo "    are you fine with the following version bump?"
echo "======================================================"
git diff
echo "======================================================"
read -p "           Press enter to continue"
echo "======================================================"

./autogen.sh
./configure --disable-dependency-tracking
make distclean

# Linux all modules build test
./configure --disable-dependency-tracking \
	--enable-cy8mrln-palmpre \
	--enable-dmc_dus3000 \
	--enable-galax \
	--enable-arctic2 \
	--enable-corgi \
	--enable-collie \
	--enable-dmc \
	--enable-h3600 \
	--enable-linear-h2200 \
	--enable-mk712 \
	--enable-ucb1x00

make -j${NUMCPUS}
make clean
make distclean

# Linux SDL2 build test
./configure --disable-dependency-tracking \
	--with-sdl2

make -j${NUMCPUS}
make clean
make distclean

# static build test
./configure --disable-dependency-tracking \
	--disable-shared --enable-static \
	--enable-input=static \
	--enable-arctic2=static \
	--enable-collie=static \
	--enable-corgi=static \
	--enable-cy8mrln-palmpre=static \
	--enable-dmc_dus3000=static \
	--enable-dmc=static \
	--enable-galax=static \
	--enable-h3600=static \
	--enable-mk712=static \
	--enable-tatung=static \
	--enable-touchkit=static \
	--enable-ucb1x00=static \
	--enable-waveshare=static \
	--enable-skip=static \
	--enable-pthres=static \
	--enable-debounce=static \
	--enable-median=static \
	--enable-iir=static \
	--enable-invert=static \
	--enable-variance=static \
	--enable-dejitter=static \
	--enable-linear=static \
	--enable-linear-h2200=static \
	--enable-lowpass=static

make -j${NUMCPUS}
make clean
make distclean
./autogen-clean.sh
<commit_msg>release.sh: don't manually disable dependency tracking<commit_after>#!/bin/bash
# SPDX-License-Identifier: GPL-2.0+
#
# Copyright (C) 2017, <NAME> <<EMAIL>>
#
#
# Script to build release-archives with. This requires a checkout from git.
# WARNING: This script is very dangerous! It may delete any untracked files.

set -e

have_version=0
NUMCPUS=$(grep -c '^processor' /proc/cpuinfo)

usage()
{
        echo "Usage: $0 -v version"
}

args=$(getopt -o v:s -- "$@")
if [ $? -ne 0 ] ; then
        usage
        exit 1
fi
eval set -- "$args"
while [ $# -gt 0 ]
do
        case "$1" in
        -v)
                version=$2
                have_version=1
                shift
                ;;
        --)
                shift
                break
                ;;
        *)
                echo "Invalid option: $1"
                usage
                exit 1
                ;;
        esac
        shift
done

# Do we have a desired version number?
if [ "$have_version" -gt 0 ] ; then
       echo "trying to build version $version"
else
       echo "please specify a version"
       usage
       exit 1
fi

# Version number sanity check
if grep ${version} configure.ac
then
       echo "configurations seems ok"
else
       echo "please check your configure.ac"
       exit 1
fi

# Check that we are on master
branch=$(git rev-parse --abbrev-ref HEAD)
echo "we are on branch $branch"

if [ ! "${branch}" = "master" ] ; then
	echo "you don't seem to be on the master branch"
	exit 1
fi

if git diff-index --quiet HEAD --; then
	# no changes
	echo "there are no uncommitted changes (version bump)"
	exit 1
fi
echo "======================================================"
echo "    are you fine with the following version bump?"
echo "======================================================"
git diff
echo "======================================================"
read -p "           Press enter to continue"
echo "======================================================"

./autogen.sh
./configure
make distclean

# Linux all modules build test
./configure --enable-cy8mrln-palmpre \
	--enable-dmc_dus3000 \
	--enable-galax \
	--enable-arctic2 \
	--enable-corgi \
	--enable-collie \
	--enable-dmc \
	--enable-h3600 \
	--enable-linear-h2200 \
	--enable-mk712 \
	--enable-ucb1x00

make -j${NUMCPUS}
make clean
make distclean

# Linux SDL2 build test
./configure --with-sdl2

make -j${NUMCPUS}
make clean
make distclean

# static build test
./configure --disable-shared --enable-static \
	--enable-input=static \
	--enable-arctic2=static \
	--enable-collie=static \
	--enable-corgi=static \
	--enable-cy8mrln-palmpre=static \
	--enable-dmc_dus3000=static \
	--enable-dmc=static \
	--enable-galax=static \
	--enable-h3600=static \
	--enable-mk712=static \
	--enable-tatung=static \
	--enable-touchkit=static \
	--enable-ucb1x00=static \
	--enable-waveshare=static \
	--enable-skip=static \
	--enable-pthres=static \
	--enable-debounce=static \
	--enable-median=static \
	--enable-iir=static \
	--enable-invert=static \
	--enable-variance=static \
	--enable-dejitter=static \
	--enable-linear=static \
	--enable-linear-h2200=static \
	--enable-lowpass=static

make -j${NUMCPUS}
make clean
make distclean
./autogen-clean.sh

{'fraction_non_alphanumeric': 0.19025735294117646, 'fraction_numerical': 0.019301470588235295, 'mean_word_length': 2.4076200417536535, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, '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': '5119282', 'n_tokens_mistral': 2246, 'n_tokens_neox': 2078, 'n_words': 571}