<commit_before>#!/bin/bash

# this script runs as root inside the chroot environment and updates the depot tools, go environment,
# and skia source.

# need to mount /dev/shm first so that python will execute properly.

mount /dev/shm

SKIA_BUILD=/skia_build
cd ${SKIA_BUILD}

# Install depot_tools.
if [ -d depot_tools ]; then
  (cd depot_tools && git pull);
else
  git clone https://chromium.googlesource.com/chromium/tools/depot_tools.git;
fi
export PATH=$PATH:${SKIA_BUILD}/depot_tools

# Sometimes you need to test patches on the server, to do that uncomment
# the following commented out lines and update the PATCH env variable to the
# name of the codereview to use.

# rm -rf skia

# Checkout the skia code and dependencies.
mkdir skia
cd skia
gclient config --name . https://skia.googlesource.com/skia.git
gclient sync
git checkout master

# PATCH=issue196723021_100001.diff
# rm $PATCH
# wget https://codereview.chromium.org/download/$PATCH
# git apply $PATCH

SKIA_GYP_OUTPUT_DIR=${SKIA_BUILD}/skia/out GYP_GENERATORS=ninja ./gyp_skia -Dskia_mesa=1

ninja -C ${SKIA_BUILD}/skia/out/Release skia_lib skgputest pdf libjpeg libSkKTX libetc1 flags sk_tool_utils resources
<commit_msg>also build skflate during fiddle setup<commit_after>#!/bin/bash

# this script runs as root inside the chroot environment and updates the depot tools, go environment,
# and skia source.

# need to mount /dev/shm first so that python will execute properly.

mount /dev/shm

SKIA_BUILD=/skia_build
cd ${SKIA_BUILD}

# Install depot_tools.
if [ -d depot_tools ]; then
  (cd depot_tools && git pull);
else
  git clone https://chromium.googlesource.com/chromium/tools/depot_tools.git;
fi
export PATH=$PATH:${SKIA_BUILD}/depot_tools

# Sometimes you need to test patches on the server, to do that uncomment
# the following commented out lines and update the PATCH env variable to the
# name of the codereview to use.

# rm -rf skia

# Checkout the skia code and dependencies.
mkdir skia
cd skia
gclient config --name . https://skia.googlesource.com/skia.git
gclient sync
git checkout master

# PATCH=issue196723021_100001.diff
# rm $PATCH
# wget https://codereview.chromium.org/download/$PATCH
# git apply $PATCH

SKIA_GYP_OUTPUT_DIR=${SKIA_BUILD}/skia/out GYP_GENERATORS=ninja ./gyp_skia -Dskia_mesa=1

ninja -C ${SKIA_BUILD}/skia/out/Release skia_lib skgputest skflate pdf libjpeg libSkKTX libetc1 flags sk_tool_utils resources

{'fraction_non_alphanumeric': 0.08612836438923395, 'fraction_numerical': 0.014078674948240166, 'mean_word_length': 4.631701631701632, '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': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6186145', 'n_tokens_mistral': 874, 'n_tokens_neox': 820, 'n_words': 268}