diff --git a/script/get-dataset-cognata-mlcommons/customize.py b/script/get-dataset-cognata-mlcommons/customize.py index 1a070e0ab..be725599d 100644 --- a/script/get-dataset-cognata-mlcommons/customize.py +++ b/script/get-dataset-cognata-mlcommons/customize.py @@ -28,11 +28,6 @@ def preprocess(i): env['MLC_DATASET_COGNATA_POC_TEXT_MD5_FILE_PATH'] = os.path.join( i['run_script_input']['path'], 'checksums', 'cognata_poc.txt') - # Check if user requests path not in CM cache - # - # --path (env MLC_TMP_PATH) shows where to store Cognata data set instead of CM cahe - # --import tells CM to import existing Cognata from a given path and skip further download/processing - # import_path = env.get( 'MLC_DATASET_MLCOMMONS_COGNATA_IMPORT_PATH', '').strip() @@ -75,7 +70,7 @@ def postprocess(i): if not os.path.isdir(mlc_cache_dataset_path): return { - 'return': 1, 'error': 'Dataset corrupted - CM cache path not found: {}'.format(mlc_cache_dataset_path)} + 'return': 1, 'error': 'Dataset corrupted - MLC cache path not found: {}'.format(mlc_cache_dataset_path)} if env.get('MLC_DATASET_MLCOMMONS_COGNATA_FILE_NAMES', '') == '': env['MLC_DATASET_MLCOMMONS_COGNATA_PATH'] = os.path.dirname( diff --git a/script/get-generic-sys-util/meta.yaml b/script/get-generic-sys-util/meta.yaml index 8f75171de..5f366d775 100644 --- a/script/get-generic-sys-util/meta.yaml +++ b/script/get-generic-sys-util/meta.yaml @@ -97,6 +97,20 @@ variations: brew: '' dnf: dmidecode yum: dmidecode + flex: + env: + MLC_SYS_UTIL_NAME: flex + MLC_SYS_UTIL_VERSION_CMD: flex --version # tbd: regular expression for version + MLC_TMP_VERSION_DETECT_GROUP_NUMBER: 0 + new_env_keys: + - MLC_FLEX_VERSION + state: + flex: # tbd: complete for other flavours of linux + apt: flex + brew: flex + dnf: flex + yum: flex + ffmpeg: env: MLC_SYS_UTIL_NAME: ffmpeg diff --git a/script/get-git-repo/meta.yaml b/script/get-git-repo/meta.yaml index 962b9281f..efdf3bf63 100644 --- a/script/get-git-repo/meta.yaml +++ b/script/get-git-repo/meta.yaml @@ -36,7 +36,7 @@ post_deps: - pull-git-repo tags: pull,git,repo print_env_at_the_end: - MLC_GIT_CHECKOUT_PATH: CM cache path to the Git repo + MLC_GIT_CHECKOUT_PATH: MLC cache path to the Git repo tags: - get - git diff --git a/script/install-gcc-src/customize.py b/script/install-gcc-src/customize.py index dba1f0d56..7edf5103b 100644 --- a/script/install-gcc-src/customize.py +++ b/script/install-gcc-src/customize.py @@ -17,16 +17,6 @@ def preprocess(i): recursion_spaces = i['recursion_spaces'] - need_version = env.get('MLC_VERSION', '') - if need_version == '': - return {'return': 1, - 'error': 'internal problem - MLC_VERSION is not defined in env'} - - logger.info(f"{recursion_spaces} # Requested version: {need_version}") - - if 'MLC_GIT_CHECKOUT' not in env: - env['MLC_GIT_CHECKOUT'] = 'releases/gcc-' + need_version - env['MLC_GCC_INSTALLED_PATH'] = os.path.join(os.getcwd(), 'install', 'bin') return {'return': 0} diff --git a/script/install-gcc-src/meta.yaml b/script/install-gcc-src/meta.yaml index c463860ed..741ab39b6 100644 --- a/script/install-gcc-src/meta.yaml +++ b/script/install-gcc-src/meta.yaml @@ -3,9 +3,27 @@ automation_alias: script automation_uid: 5b4e0237da074764 cache: true category: Compiler automation -default_version: '12' deps: - tags: detect,os +- tags: detect,cpu +- tags: get,generic-sys-util,_flex +- env: + MLC_GIT_CHECKOUT_PATH_ENV_NAME: MLC_GCC_SRC_REPO_PATH + extra_cache_tags: gcc,src,gcc-src,gcc-src-repo + force_env_keys: + - MLC_GIT_* + names: + - gcc-src-repo + tags: get,git,repo + update_tags_from_env_with_prefix: + _branch.: + - MLC_GIT_CHECKOUT + _repo.: + - MLC_GIT_URL + _sha.: + - MLC_GIT_CHECKOUT_SHA + _tag.: + - MLC_GIT_CHECKOUT_TAG env: MLC_GIT_URL: git://gcc.gnu.org/git/gcc.git post_deps: @@ -19,7 +37,24 @@ tags: - gcc - src-gcc uid: faae0ebd6e1242db -versions: +tests: + run_inputs: + - {} +variations: master: + group: version + default: true env: MLC_GIT_CHECKOUT: master + version.#: + group: version + env: + MLC_GIT_CHECKOUT: releases/gcc-# + branch.#: + group: version + env: + MLC_GIT_CHECKOUT: '#' + lang.#: + env: + +MLC_GCC_ENABLED_LANGUAGES: + - '#' diff --git a/script/install-gcc-src/run.sh b/script/install-gcc-src/run.sh index c3631255d..c8b1ca291 100644 --- a/script/install-gcc-src/run.sh +++ b/script/install-gcc-src/run.sh @@ -4,12 +4,14 @@ CUR_DIR=$PWD echo "******************************************************" +echo ${MLC_GCC_SRC_REPO_PATH} + if [ ! -d "src" ]; then - echo "Cloning GCC from ${MLC_GIT_URL} with branch ${MLC_GIT_CHECKOUT}..." - git clone -b "${MLC_GIT_CHECKOUT}" ${MLC_GIT_URL} src - if [ "${?}" != "0" ]; then exit 1; fi + cp -r ${MLC_GCC_SRC_REPO_PATH} src + test $? -eq 0 || exit $? fi + mkdir -p install mkdir -p build @@ -22,16 +24,17 @@ cd ../build ../src/configure --prefix="${INSTALL_DIR}" --with-gcc-major-version-only --disable-multilib -if [ "${?}" != "0" ]; then exit 1; fi +test $? -eq 0 || exit $? echo "******************************************************" MLC_MAKE_CORES=${MLC_MAKE_CORES:-${MLC_HOST_CPU_TOTAL_CORES}} MLC_MAKE_CORES=${MLC_MAKE_CORES:-2} make -j${MLC_MAKE_CORES} -if [ "${?}" != "0" ]; then exit 1; fi +test $? -eq 0 || exit $? + make install -if [ "${?}" != "0" ]; then exit 1; fi +test $? -eq 0 || exit $? # Clean build directory (too large) cd ${CUR_DIR}