<commit_before>name: Rust

on: [push, pull_request]

env:
  CARGO_TERM_COLOR: always
  SHELL: /bin/bash

jobs:
  Build:
    runs-on: ${{ matrix.os }}
    strategy:
      fail-fast: false
      matrix:
        os: [macos-latest, ubuntu-latest, windows-latest]
        rust: [beta, stable]
        features: ["--features debugmozjs", ""]
        exclude:
          - os: windows-latest
            rust: beta
    steps:
    - uses: actions/checkout@v2
    - name: Install deps on osx
      if: startsWith(matrix.os, 'macOS')
      run: |
        brew install python autoconf@2.13 ccache llvm yasm
    - name: Install deps on linux
      if: startsWith(matrix.os, 'ubuntu')
      run: |
        sudo apt install autoconf2.13 gcc-7 g++-7 ccache llvm -y
    - name: Install deps on windows
      if: startsWith(matrix.os, 'windows')
      working-directory: "C:\\"
      run: |
        cp D:\a C:\ -Recurse
        Start-BitsTransfer -Source https://ftp.mozilla.org/pub/mozilla/libraries/win32/MozillaBuildSetup-Latest.exe -Destination ./MozillaBuildSetup.exe
        .\MozillaBuildSetup.exe /S | Out-Null
        iwr -useb get.scoop.sh | iex
        scoop install llvm --global
        echo "C:\ProgramData\scoop\shims;C:\Users\runneradmin\scoop\shims" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
    - uses: actions-rs/toolchain@v1
      with:
          profile: minimal
          toolchain: ${{ matrix.rust }}
          override: true,
          default: true,
    - name: ccache cache files
      if: startsWith(matrix.os, 'windows') != true
      uses: actions/cache@v1.1.0
      with:
        path: .ccache
        key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.toml') }}
    - name: Build POSIX
      if: startsWith(matrix.os, 'windows') != true
      run: |
        ccache -z
        ccache cargo build --verbose ${{ matrix.features }}
        ccache cargo test --verbose ${{ matrix.features }}
        ccache -s
    - name: Build Windows
      if: startsWith(matrix.os, 'windows')
      shell: cmd
      working-directory: "C:\\a\\${{ github.event.repository.name }}\\${{ github.event.repository.name }}"
      env:
        MOZTOOLS_PATH: 'C:\mozilla-build\msys\bin;C:\mozilla-build\bin'
        AUTOCONF: "C:/mozilla-build/msys/local/bin/autoconf-2.13"
        LINKER: "lld-link.exe"
        CC: "clang-cl.exe"
        CXX: "clang-cl.exe"
        NATIVE_WIN32_PYTHON: "C:\\mozilla-build\\python\\python.exe"
        PYTHON3: "C:\\mozilla-build\\python3\\python3.exe"
        LIBCLANG_PATH: "C:\\ProgramData\\scoop\\apps\\llvm\\current\\lib"
      run: |
        cargo test --verbose --verbose ${{ matrix.features }} --lib<commit_msg>CARGO_HOME<commit_after>name: Rust

on: [push, pull_request]

env:
  CARGO_TERM_COLOR: always
  SHELL: /bin/bash

jobs:
  Build:
    runs-on: ${{ matrix.os }}
    strategy:
      fail-fast: false
      matrix:
        os: [macos-latest, ubuntu-latest, windows-latest]
        rust: [beta, stable]
        features: ["--features debugmozjs", ""]
        exclude:
          - os: windows-latest
            rust: beta
    steps:
    - uses: actions/checkout@v2
    - name: Install deps on osx
      if: startsWith(matrix.os, 'macOS')
      run: |
        brew install python autoconf@2.13 ccache llvm yasm
    - name: Install deps on linux
      if: startsWith(matrix.os, 'ubuntu')
      run: |
        sudo apt install autoconf2.13 gcc-7 g++-7 ccache llvm -y
    - name: Install deps on windows
      if: startsWith(matrix.os, 'windows')
      run: |
        Start-BitsTransfer -Source https://ftp.mozilla.org/pub/mozilla/libraries/win32/MozillaBuildSetup-Latest.exe -Destination ./MozillaBuildSetup.exe
        .\MozillaBuildSetup.exe /S | Out-Null
        iwr -useb get.scoop.sh | iex
        scoop install llvm --global
        echo "C:\ProgramData\scoop\shims;C:\Users\runneradmin\scoop\shims" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
    - uses: actions-rs/toolchain@v1
      with:
          profile: minimal
          toolchain: ${{ matrix.rust }}
          override: true,
          default: true,
    - name: ccache cache files
      if: startsWith(matrix.os, 'windows') != true
      uses: actions/cache@v1.1.0
      with:
        path: .ccache
        key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.toml') }}
    - name: Build POSIX
      if: startsWith(matrix.os, 'windows') != true
      run: |
        ccache -z
        ccache cargo build --verbose ${{ matrix.features }}
        ccache cargo test --verbose ${{ matrix.features }}
        ccache -s
    - name: Build Windows
      if: startsWith(matrix.os, 'windows')
      shell: cmd
      env:
        MOZTOOLS_PATH: 'C:\mozilla-build\msys\bin;C:\mozilla-build\bin'
        AUTOCONF: "C:/mozilla-build/msys/local/bin/autoconf-2.13"
        LINKER: "lld-link.exe"
        CC: "clang-cl.exe"
        CXX: "clang-cl.exe"
        NATIVE_WIN32_PYTHON: "C:\\mozilla-build\\python\\python.exe"
        PYTHON3: "C:\\mozilla-build\\python3\\python3.exe"
        LIBCLANG_PATH: "C:\\ProgramData\\scoop\\apps\\llvm\\current\\lib"
        CARGO_HOME: ${{ env.GITHUB_WORKSPACE }}\..\.cargo
      run: |
        cargo test --verbose --verbose ${{ matrix.features }} --lib
{'fraction_non_alphanumeric': 0.14192433262915305, 'fraction_numerical': 0.009218359900134435, 'mean_word_length': 2.1449275362318843, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 2, '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': '6312893', 'n_tokens_mistral': 1829, 'n_tokens_neox': 1746, 'n_words': 382}