<commit_before>name: CI

on: [push]

jobs:

  build-linux:
    runs-on: ubuntu-16.04

    env:
      ANDROID_NDK_ROOT: /opt/android-ndk-r15c

    strategy:
      matrix:
        haxe-version: [3.4.7, 4.0.5, 4.1.1]

    steps:
    - uses: actions/checkout@v2
      with:
        submodules: true
    - uses: haxeui/haxeui-core/.github/actions/haxe@master
      with:
        haxe-version: ${{ matrix.haxe-version }}
    - uses: actions/setup-java@v1
      with:
        java-version: 8

    - name: Install dependencies
      run: |
        haxelib install hxcpp --quiet
        haxelib install format  --quiet
        haxelib install hxp  --quiet
        sudo apt-get install -y libgl1-mesa-dev libglu1-mesa-dev g++-multilib gcc-multilib libasound2-dev libx11-dev libxext-dev libxi-dev libxrandr-dev libxinerama-dev

    - name: Install Android NDK
      run: |
        mkdir $ANDROID_NDK_ROOT
        wget -O android-ndk.zip --quiet https://dl.google.com/android/repository/android-ndk-r15c-linux-x86_64.zip
        unzip -qq android-ndk.zip -d $ANDROID_NDK_ROOT/..
        rm android-ndk.zip

    - name: Install "lime" command alias
      run: |
        haxelib dev lime $GITHUB_WORKSPACE
        haxelib run lime setup -alias -y

    - name: Configure Lime for Android
      run: |
        lime config ANDROID_SDK $ANDROID_HOME
        haxelib run lime config ANDROID_NDK_ROOT $ANDROID_NDK_ROOT
        haxelib run lime config JAVA_HOME $JAVA_HOME
        haxelib run lime config ANDROID_SETUP true
        haxelib run lime config

    - name: Rebuild Lime tools
      run: |
        lime rebuild tools -nocolor -verbose

    - name: Rebuild Lime binaries
      run: |
        lime rebuild linux -64 -release -verbose -nocolor
        lime rebuild linux -32 -release -verbose -nocolor
        lime rebuild hl -64 -release -verbose -nocolor
        lime rebuild android -release -verbose -nocolor

  build-macos:
    runs-on: macos-latest

    env:
      ANDROID_NDK_ROOT: /opt/android-ndk-r15c

    strategy:
      matrix:
        haxe-version: [3.4.7, 4.0.5, 4.1.1]

    steps:
    - uses: actions/checkout@v2
      with:
        submodules: true
    - uses: haxeui/haxeui-core/.github/actions/haxe@master
      with:
        haxe-version: ${{ matrix.haxe-version }}

    - name: Install dependencies
      run: |
        haxelib install hxcpp  --quiet
        haxelib install format  --quiet
        haxelib install hxp  --quiet

    - name: Install Android NDK r15c
      run: |
        mkdir $ANDROID_NDK_ROOT
        wget -O android-ndk.zip --quiet https://dl.google.com/android/repository/android-ndk-r15c-darwin-x86_64.zip
        unzip -qq android-ndk.zip -d $ANDROID_NDK_ROOT/..
        rm android-ndk.zip

    - name: Install "lime" command alias
      run: |
        haxelib dev lime $GITHUB_WORKSPACE
        haxelib run lime setup -alias -y

    - name: Configure Lime for Android
      run: |
        lime config ANDROID_SDK $ANDROID_HOME
        haxelib run lime config ANDROID_NDK_ROOT $ANDROID_NDK_ROOT
        haxelib run lime config JAVA_HOME $JAVA_HOME
        haxelib run lime config ANDROID_SETUP true
        haxelib run lime config

    - name: Rebuild Lime tools
      run: |
        lime rebuild tools -nocolor -verbose

    - name: Rebuild Lime binaries
      run: |
        lime rebuild mac -release -verbose -nocolor
        lime rebuild hl -release -verbose -nocolor
        lime rebuild ios -release -verbose -nocolor
        lime rebuild android -release -verbose -nocolor

  build-windows:
    runs-on: windows-latest

    env:
      ANDROID_NDK_ROOT: C:\android-ndk-r15c

    strategy:
      matrix:
        haxe-version: [3.4.7, 4.0.5, 4.1.1]

    steps:
    - uses: actions/checkout@v2
      with:
        submodules: true
    - uses: haxeui/haxeui-core/.github/actions/haxe@master
      with:
        haxe-version: ${{ matrix.haxe-version }}

    - name: Install dependencies
      run: |
        haxelib install hxcpp --quiet
        haxelib install format --quiet
        haxelib install hxp --quiet

    - name: Install Android NDK r15c
      run: |
        mkdir $Env:ANDROID_NDK_ROOT
        Invoke-WebRequest https://dl.google.com/android/repository/android-ndk-r15c-windows-x86_64.zip -OutFile android-ndk.zip
        Expand-Archive android-ndk.zip -DestinationPath $Env:ANDROID_NDK_ROOT/..
        rm android-ndk.zip

    - name: Install "lime" command alias
      run: |
        haxelib dev lime $Env:GITHUB_WORKSPACE
        haxelib run lime setup -alias -y

    - name: Configure Lime for Android
      run: |
        lime config ANDROID_SDK $Env:ANDROID_HOME
        haxelib run lime config ANDROID_NDK_ROOT $Env:ANDROID_NDK_ROOT
        haxelib run lime config JAVA_HOME $Env:JAVA_HOME
        haxelib run lime config ANDROID_SETUP true
        haxelib run lime config

    - name: Rebuild Lime tools
      run: |
        lime rebuild tools -nocolor -verbose

    - name: Rebuild Lime binaries
      run: |
        lime rebuild windows -32 -release -verbose -nocolor
        lime rebuild windows -64 -release -verbose -nocolor
        lime rebuild hl -32 -release -verbose -nocolor
        lime rebuild android -release -verbose -nocolor
<commit_msg>Github Actions: also compiles some samples for a bunch of platforms<commit_after>name: CI

on: [push]

jobs:

  build:

    strategy:
      matrix:
        haxe-version: [3.4.7, 4.0.5, 4.1.1]
        os: [ubuntu-16.04, macos-latest, windows-latest]

    runs-on: ${{ matrix.os }}

    steps:
    - uses: actions/checkout@v2
      with:
        submodules: true
    - uses: haxeui/haxeui-core/.github/actions/haxe@master
      with:
        haxe-version: ${{ matrix.haxe-version }}
    - uses: actions/setup-java@v1
      with:
        java-version: 8

    - name: Install Haxelib dependencies
      run: |
        haxelib install hxcpp 4.0.64 --quiet
        haxelib install format  --quiet
        haxelib install hxp  --quiet
        haxelib git lime-samples https://github.com/openfl/lime-samples --quiet

    - name: Set ANDROID_NDK_ROOT (Linux and macOS)
      if: ${{ !startsWith(matrix.os, 'windows-') }}
      run: echo "::set-env name=ANDROID_NDK_ROOT::/opt/android-ndk-r15c"

    - name: Set ANDROID_NDK_ROOT (Windows)
      if: ${{ startsWith(matrix.os, 'windows-') }}
      run: echo "::set-env name=ANDROID_NDK_ROOT::C:\android-ndk-r15c"

    - name: Install Linux dependencies
      if: ${{ startsWith(matrix.os, 'ubuntu-') }}
      run: sudo apt-get install -y libgl1-mesa-dev libglu1-mesa-dev g++-multilib gcc-multilib libasound2-dev libx11-dev libxext-dev libxi-dev libxrandr-dev libxinerama-dev

    - name: Install Android NDK (Linux)
      if: ${{ startsWith(matrix.os, 'ubuntu-') }}
      run: |
        mkdir $ANDROID_NDK_ROOT
        wget -O android-ndk.zip --quiet https://dl.google.com/android/repository/android-ndk-r15c-linux-x86_64.zip
        unzip -qq android-ndk.zip -d $ANDROID_NDK_ROOT/..
        rm android-ndk.zip

    - name: Install Android NDK r15c (macOS)
      if: ${{ startsWith(matrix.os, 'macos-') }}
      run: |
        mkdir $ANDROID_NDK_ROOT
        wget -O android-ndk.zip --quiet https://dl.google.com/android/repository/android-ndk-r15c-darwin-x86_64.zip
        unzip -qq android-ndk.zip -d $ANDROID_NDK_ROOT/..
        rm android-ndk.zip

    - name: Install Android NDK r15c (Windows)
      if: ${{ startsWith(matrix.os, 'windows-') }}
      run: |
        mkdir $Env:ANDROID_NDK_ROOT
        Invoke-WebRequest https://dl.google.com/android/repository/android-ndk-r15c-windows-x86_64.zip -OutFile android-ndk.zip
        Expand-Archive android-ndk.zip -DestinationPath $Env:ANDROID_NDK_ROOT/..
        rm android-ndk.zip

    - name: Install "lime" command alias (Linux and macOS)
      if: ${{ !startsWith(matrix.os, 'windows-') }}
      run: |
        haxelib dev lime $GITHUB_WORKSPACE
        haxelib run lime setup -alias -y

    - name: Install "lime" command alias (Windows)
      if: ${{ startsWith(matrix.os, 'windows-') }}
      run: |
        haxelib dev lime $Env:GITHUB_WORKSPACE
        haxelib run lime setup -alias -y

    - name: Configure Lime for Android (Linux and macOS)
      if: ${{ !startsWith(matrix.os, 'windows-') }}
      run: |
        lime config ANDROID_SDK $ANDROID_HOME
        haxelib run lime config ANDROID_NDK_ROOT $ANDROID_NDK_ROOT
        haxelib run lime config JAVA_HOME $JAVA_HOME
        haxelib run lime config ANDROID_SETUP true
        haxelib run lime config

    - name: Configure Lime for Android (Windows)
      if: ${{ startsWith(matrix.os, 'windows-') }}
      run: |
        lime config ANDROID_SDK $Env:ANDROID_HOME
        haxelib run lime config ANDROID_NDK_ROOT $Env:ANDROID_NDK_ROOT
        haxelib run lime config JAVA_HOME $Env:JAVA_HOME
        haxelib run lime config ANDROID_SETUP true
        haxelib run lime config

    - name: Rebuild Lime Tools
      run: |
        lime rebuild tools -nocolor -verbose

    - name: Rebuild Lime (HashLink)
      run: |
        lime rebuild hl -release -verbose -nocolor

    - name: Rebuild Lime (Android)
      run: |
        lime rebuild android -release -verbose -nocolor

    - name: Rebuild Lime (iOS)
      if: ${{ startsWith(matrix.os, 'macos-') }}
      run: |
        lime rebuild ios -release -verbose -nocolor
        lime rebuild ios -simulator -release -verbose -nocolor

    - name: Rebuild Lime (Linux)
      if: ${{ startsWith(matrix.os, 'ubuntu-') }}
      run: |
        lime rebuild linux -64 -release -verbose -nocolor
        lime rebuild linux -32 -release -verbose -nocolor

    - name: Rebuild Lime (macOS)
      if: ${{ startsWith(matrix.os, 'macos-') }}
      run: |
        lime rebuild mac -release -verbose -nocolor

    - name: Rebuild Lime (Windows)
      if: ${{ startsWith(matrix.os, 'windows-') }}
      run: |
        lime rebuild windows -32 -release -verbose -nocolor
        lime rebuild windows -64 -release -verbose -nocolor

    - name: Create Lime Samples
      run: |
        lime create HelloWorld -verbose -nocolor
        lime create SimpleImage -verbose -nocolor
        lime create SimpleAudio -verbose -nocolor

    - name: Build Lime Samples (html5)
      run: |
        lime build HelloWorld html5 -release -verbose -nocolor
        lime build HelloWorld html5 -Dcanvas -release -verbose -nocolor
        lime build HelloWorld html5 -Ddom -release -verbose -nocolor
        lime build SimpleImage html5 -release -verbose -nocolor
        lime build SimpleImage html5 -Dcanvas -release -verbose -nocolor
        lime build SimpleImage html5 -Ddom -release -verbose -nocolor
        lime build SimpleAudio html5 -release -verbose -nocolor
        lime build SimpleAudio html5 -Dcanvas -release -verbose -nocolor
        lime build SimpleAudio html5 -Ddom -release -verbose -nocolor

    - name: Build Lime Samples (flash)
      run: |
        lime build HelloWorld flash -release -verbose -nocolor
        lime build SimpleImage flash -release -verbose -nocolor
        lime build SimpleAudio flash -release -verbose -nocolor

    - name: Build Lime Samples (neko)
      run: |
        lime build HelloWorld neko -release -verbose -nocolor
        lime build SimpleImage neko -release -verbose -nocolor
        lime build SimpleAudio neko -release -verbose -nocolor

    - name: Build Lime Samples (hl)
      if: ${{ !startsWith(matrix.haxe-version, '3.') }}
      run: |
        lime build HelloWorld hl -release -verbose -nocolor
        lime build SimpleImage hl -release -verbose -nocolor
        lime build SimpleAudio hl -release -verbose -nocolor

    - name: Build Lime Samples (android)
      run: |
        lime build HelloWorld android -release -verbose -nocolor
        lime build SimpleImage android -release -verbose -nocolor
        lime build SimpleAudio android -release -verbose -nocolor

    - name: Build Lime Samples (linux)
      if: ${{ startsWith(matrix.os, 'ubuntu-') }}
      run: |
        lime build HelloWorld linux -release -verbose -nocolor
        lime build SimpleImage linux -release -verbose -nocolor
        lime build SimpleAudio linux -release -verbose -nocolor

    - name: Build Lime Samples (mac)
      if: ${{ startsWith(matrix.os, 'macos-') }}
      run: |
        lime build HelloWorld mac -release -verbose -nocolor
        lime build SimpleImage mac -release -verbose -nocolor
        lime build SimpleAudio mac -release -verbose -nocolor

    #- name: Build Lime Samples (ios)
    #  if: ${{ startsWith(matrix.os, 'macos-') }}
    #  run: |
    #    lime build HelloWorld ios -simulator -release -verbose -nocolor
    #    lime build SimpleImage ios -simulator -release -verbose -nocolor
    #    lime build SimpleAudio ios -simulator -release -verbose -nocolor

    - name: Build Lime Samples (windows)
      if: ${{ startsWith(matrix.os, 'windows-') }}
      run: |
        lime build HelloWorld windows -release -verbose -nocolor
        lime build SimpleImage windows -release -verbose -nocolor
        lime build SimpleAudio windows -release -verbose -nocolor
{'fraction_non_alphanumeric': 0.09555265381365696, 'fraction_numerical': 0.01159843305937476, 'mean_word_length': 2.233176061584306, 'pattern_counts': {'":': 2, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 7, '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': '3188855', 'n_tokens_mistral': 4586, 'n_tokens_neox': 4262, 'n_words': 1203}