<commit_before>#! /bin/bash
# Copyright (C) 2020-2021  The SymbiFlow Authors.
#
# Use of this source code is governed by a ISC-style
# license that can be found in the LICENSE file or at
# https://opensource.org/licenses/ISC
#
# SPDX-License-Identifier:ISC

set -e

source .github/workflows/common.sh

##########################################################################

# Output status information.
start_section Status
(
    set +e
    set -x
    git status
    git branch -v
    git log -n 5 --graph
    git log --format=oneline -n 20 --graph
)
end_section

##########################################################################

# Update submodules
start_section Submodules
(
    git submodule update --init --recursive
)
end_section

##########################################################################

#Install yosys
start_section Install-Yosys
(
    echo '=========================='
    echo 'Making env with yosys and Surelog'
    echo '=========================='
    if [ "$BUILD_UPSTREAM" = "0" ]
    then
	mkdir -p ~/.local-src
	mkdir -p ~/.local-bin
	cd ~/.local-src
	git clone https://github.com/antmicro/yosys.git -b uhdm-plugin
	cd yosys
	PREFIX=$HOME/.local-bin make CONFIG=gcc ENABLE_NDEBUG=1 -j$(nproc)
	PREFIX=$HOME/.local-bin make install
	cd ..
	git clone --recursive https://github.com/chipsalliance/Surelog.git -b master
	cd Surelog
	cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=$HOME/.local-bin -DCMAKE_POSITION_INDEPENDENT_CODE=ON -S . -B build
	cmake --build build -j $(nproc)
	cmake --install build
	cd ../..
    else
	make env
	make enter
    fi
    echo $(which yosys)
    echo $(which yosys-config)
    echo $(yosys-config --datdir)
)
end_section

##########################################################################
<commit_msg>Add orderedmultidict to Surelog dependencies<commit_after>#! /bin/bash
# Copyright (C) 2020-2021  The SymbiFlow Authors.
#
# Use of this source code is governed by a ISC-style
# license that can be found in the LICENSE file or at
# https://opensource.org/licenses/ISC
#
# SPDX-License-Identifier:ISC

set -e

source .github/workflows/common.sh

##########################################################################

# Output status information.
start_section Status
(
    set +e
    set -x
    git status
    git branch -v
    git log -n 5 --graph
    git log --format=oneline -n 20 --graph
)
end_section

##########################################################################

# Update submodules
start_section Submodules
(
    git submodule update --init --recursive
)
end_section

##########################################################################

#Install yosys
start_section Install-Yosys
(
    echo '=========================='
    echo 'Making env with yosys and Surelog'
    echo '=========================='
    if [ "$BUILD_UPSTREAM" = "0" ]
    then
	mkdir -p ~/.local-src
	mkdir -p ~/.local-bin
	cd ~/.local-src
	git clone https://github.com/antmicro/yosys.git -b uhdm-plugin
	cd yosys
	PREFIX=$HOME/.local-bin make CONFIG=gcc ENABLE_NDEBUG=1 -j$(nproc)
	PREFIX=$HOME/.local-bin make install
	cd ..
	git clone --recursive https://github.com/chipsalliance/Surelog.git -b master
	cd Surelog
	pip install orderedmultidict
	cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=$HOME/.local-bin -DCMAKE_POSITION_INDEPENDENT_CODE=ON -S . -B build
	cmake --build build -j $(nproc)
	cmake --install build
	cd ../..
    else
	make env
	make enter
    fi
    echo $(which yosys)
    echo $(which yosys-config)
    echo $(yosys-config --datdir)
)
end_section

##########################################################################

{'fraction_non_alphanumeric': 0.2803175472214618, 'fraction_numerical': 0.0071174377224199285, 'mean_word_length': 3.931174089068826, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 6, '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': '6406514', 'n_tokens_mistral': 1168, 'n_tokens_neox': 1098, 'n_words': 311}