<commit_before>version: 2
jobs:
    build:
        docker:
            - image: buildpack-deps:xenial
        working_directory: ~/NetCraft
        steps:
            - checkout
            - run: 
                name: Setup dependencies
                command: |
                  apt update
                  apt install -y cmake libglew-dev xorg-dev libcurl4-openssl-dev
                  apt install -y libglfw3-dev
                  mkdir native-build
                  (cd native-build && cmake ..)
                  # http://kripken.github.io/emscripten-site/docs/getting_started/downloads.html#platform-notes-installation-instructions-portable-sdk
                  apt install -y python2.7
                  apt install -y nodejs
                  apt install -y default-jre
                  wget https://s3.amazonaws.com/mozilla-games/emscripten/releases/emsdk-portable.tar.gz
                  tar xf emsdk-portable.tar.gz -C ~
                  ~/emsdk-portable/emsdk update
                  ~/emsdk-portable/emsdk install latest
                  ~/emsdk-portable/emsdk activate latest
                  source ~/emsdk-portable/emsdk_env.sh
                  # fixes for https://github.com/satoshinm/emscripten/commits/netcraft
                  curl -o ~/emscripten-fixes.patch 'https://gist.githubusercontent.com/satoshinm/1c5f517fd9cec6c0831302de9619a914/raw/93f3f67d008a57acd192709228f9fa5cdc4fe7db/emscripten-1.37.9+netcraftfixes.patch'
                  (cd ~/emsdk-portable/emscripten/1.37.9 && patch -p1 < ~/emscripten-fixes.patch)
                  mkdir release-build-js
                  (cd release-build-js && cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_TOOLCHAIN_FILE=$EMSCRIPTEN/cmake/Modules/Platform/Emscripten.cmake ..)
                  mkdir wasm-build
                  (cd wasm-build && cmake -DWASM=1 -DCMAKE_BUILD_TYPE=Release -DCMAKE_TOOLCHAIN_FILE=$EMSCRIPTEN/cmake/Modules/Platform/Emscripten.cmake ..)
            - run:
                name: native-build
                command: cd native-build && make
            - run:
                name: release-build-js
                command: cd release-build-js && source ~/emsdk-portable/emsdk_env.sh && make
            - run:
                name: wasm-build
                command: cd wasm-build && source ~/emsdk-portable/emsdk_env.sh && make<commit_msg>Store build artifacts for web builds in CircleCI<commit_after>version: 2
jobs:
    build:
        docker:
            - image: buildpack-deps:xenial
        working_directory: ~/NetCraft
        steps:
            - checkout
            - run: 
                name: Setup dependencies
                command: |
                  apt update
                  apt install -y cmake libglew-dev xorg-dev libcurl4-openssl-dev
                  apt install -y libglfw3-dev
                  mkdir native-build
                  (cd native-build && cmake ..)
                  # http://kripken.github.io/emscripten-site/docs/getting_started/downloads.html#platform-notes-installation-instructions-portable-sdk
                  apt install -y python2.7
                  apt install -y nodejs
                  apt install -y default-jre
                  wget https://s3.amazonaws.com/mozilla-games/emscripten/releases/emsdk-portable.tar.gz
                  tar xf emsdk-portable.tar.gz -C ~
                  ~/emsdk-portable/emsdk update
                  ~/emsdk-portable/emsdk install latest
                  ~/emsdk-portable/emsdk activate latest
                  source ~/emsdk-portable/emsdk_env.sh
                  # fixes for https://github.com/satoshinm/emscripten/commits/netcraft
                  curl -o ~/emscripten-fixes.patch 'https://gist.githubusercontent.com/satoshinm/1c5f517fd9cec6c0831302de9619a914/raw/93f3f67d008a57acd192709228f9fa5cdc4fe7db/emscripten-1.37.9+netcraftfixes.patch'
                  (cd ~/emsdk-portable/emscripten/1.37.9 && patch -p1 < ~/emscripten-fixes.patch)
                  mkdir release-build-js
                  (cd release-build-js && cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_TOOLCHAIN_FILE=$EMSCRIPTEN/cmake/Modules/Platform/Emscripten.cmake ..)
                  mkdir wasm-build
                  (cd wasm-build && cmake -DWASM=1 -DCMAKE_BUILD_TYPE=Release -DCMAKE_TOOLCHAIN_FILE=$EMSCRIPTEN/cmake/Modules/Platform/Emscripten.cmake ..)
                  mkdir -p /tmp/artifacts/{release-build-js,wasm-build}
            - run:
                name: native-build
                command: cd native-build && make
            - run:
                name: release-build-js
                command: |
                    cd release-build-js
                    source ~/emsdk-portable/emsdk_env.sh
                    make
                    cp craft.* /tmp/artifacts/release-build-js
            - store_artifacts:
                path: /tmp/artifacts/release-build-js
            - run:
                name: wasm-build
                command: |
                    cd wasm-build
                    source ~/emsdk-portable/emsdk_env.sh
                    make
                    cp craft.* /tmp/artifacts/wasm-build
            - store_artifacts:
                path: /tmp/artifacts/wasm-build
{'fraction_non_alphanumeric': 0.09155606847470668, 'fraction_numerical': 0.02308136180034622, 'mean_word_length': 1.4809160305343512, 'pattern_counts': {'":': 0, '<': 5, '<?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': '5589359', 'n_tokens_mistral': 1674, 'n_tokens_neox': 1508, 'n_words': 251}