<commit_before>name: publish

on:
  push:
    tags:
      - 'v*.*.*'

env:
  draft: true

jobs:
  build-windows:
    runs-on: windows-latest
    name: ${{ matrix.config.target }}
    timeout-minutes: 10

    strategy:
      fail-fast: false
      matrix:
        config:
        - {target: wasm3-win-x64,   platform: "-A x64",     toolset: "-T ClangCL"   }
        - {target: wasm3-win-x86,   platform: "-A Win32",   toolset: "-T ClangCL"   }

    env:
      LDFLAGS: -s
      CFLAGS: -DM3_APP_MAX_STACK=1048576 -DUSE_HUMAN_FRIENDLY_ARGS
    steps:
    - uses: actions/checkout@v2
    - name: Configure
      run: |
        mkdir build
        cd build
        cmake ${{ matrix.config.platform }} ${{ matrix.config.toolset }} ..
    - name: Build
      run: |
        cmake --build build --config Release
        cp ./build/Release/wasm3.exe ./build/${{ matrix.config.target }}.exe
    - name: Publish
      uses: softprops/action-gh-release@v1
      with:
        draft: ${{ env.draft }}
        files: ./build/*.exe
      env:
        GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

  build-wasi:
    runs-on: ubuntu-latest
    timeout-minutes: 10

    env:
      LDFLAGS: -s
      CFLAGS: -DM3_APP_MAX_STACK=1048576 -DUSE_HUMAN_FRIENDLY_ARGS
    steps:
    - uses: actions/checkout@v2
    - name: Install Wasienv
      run: curl https://raw.githubusercontent.com/wasienv/wasienv/master/install.sh | sh
    - name: Configure
      run: |
        source $HOME/.wasienv/wasienv.sh
        wasienv install-sdk 8
        wasienv default-sdk 8
        mkdir build
        cd build
        wasimake cmake -DBUILD_WASI=metawasi ..
    - name: Build
      run: |
        source $HOME/.wasienv/wasienv.sh
        cmake --build build
    - name: Publish
      uses: softprops/action-gh-release@v1
      with:
        draft: ${{ env.draft }}
        files: ./build/wasm3.wasi
      env:
        GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

  build-android:
    runs-on: ubuntu-latest
    timeout-minutes: 10
    steps:
    - uses: actions/checkout@v2
    - uses: seanmiddleditch/gha-setup-ninja@master
    - name: Set up JDK 1.8
      uses: actions/setup-java@v1
      with:
        java-version: 1.8
    - name: Build
      run: |
        cd platforms/android
        ./gradlew build
        cp ./app/build/outputs/apk/debug/app-debug.apk ./wasm3-android-test.apk
    - name: Publish
      uses: softprops/action-gh-release@v1
      with:
        draft: ${{ env.draft }}
        files: ./wasm3-android-test.apk<commit_msg>Try fixing publish<commit_after>name: publish

on:
  push:
    tags:
      - "v*.*.*"

env:
  draft: true

jobs:
  build-windows:
    runs-on: windows-latest
    name: ${{ matrix.config.target }}
    timeout-minutes: 10

    strategy:
      fail-fast: false
      matrix:
        config:
        - {target: wasm3-win-x64,   platform: "-A x64",     toolset: "-T ClangCL"   }
        - {target: wasm3-win-x86,   platform: "-A Win32",   toolset: "-T ClangCL"   }

    env:
      LDFLAGS: -s
      CFLAGS: -DM3_APP_MAX_STACK=1048576 -DUSE_HUMAN_FRIENDLY_ARGS
    steps:
    - uses: actions/checkout@v2
    - name: Configure
      run: |
        mkdir build
        cd build
        cmake ${{ matrix.config.platform }} ${{ matrix.config.toolset }} ..
    - name: Build
      run: |
        cmake --build build --config Release
        cp ./build/Release/wasm3.exe ./${{ matrix.config.target }}.exe
    - name: Publish
      uses: softprops/action-gh-release@v1
      with:
        draft: ${{ env.draft }}
        files: "*.exe"
      env:
        GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

  build-wasi:
    runs-on: ubuntu-latest
    name: wasm3-wasi
    timeout-minutes: 10

    env:
      LDFLAGS: -s
      CFLAGS: -DM3_APP_MAX_STACK=1048576 -DUSE_HUMAN_FRIENDLY_ARGS
    steps:
    - uses: actions/checkout@v2
    - name: Install Wasienv
      run: curl https://raw.githubusercontent.com/wasienv/wasienv/master/install.sh | sh
    - name: Configure
      run: |
        source $HOME/.wasienv/wasienv.sh
        wasienv install-sdk 8
        wasienv default-sdk 8
        mkdir build
        cd build
        wasimake cmake -DBUILD_WASI=metawasi ..
    - name: Build
      run: |
        source $HOME/.wasienv/wasienv.sh
        cmake --build build
        cp ./build/wasm3.wasm ./wasm3-wasi.wasm
    - name: Publish
      uses: softprops/action-gh-release@v1
      with:
        draft: ${{ env.draft }}
        files: "*.wasm"
      env:
        GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

  build-android:
    runs-on: ubuntu-latest
    name: wasm3-android-tests
    timeout-minutes: 10

    steps:
    - uses: actions/checkout@v2
    - uses: seanmiddleditch/gha-setup-ninja@master
    - name: Set up JDK 1.8
      uses: actions/setup-java@v1
      with:
        java-version: 1.8
    - name: Build
      run: |
        cd platforms/android
        ./gradlew build
        cp ./app/build/outputs/apk/debug/app-debug.apk ./wasm3-android-test.apk
    - name: Publish
      uses: softprops/action-gh-release@v1
      with:
        draft: ${{ env.draft }}
        files: "*.apk"
{'fraction_non_alphanumeric': 0.1251968503937008, 'fraction_numerical': 0.01968503937007874, 'mean_word_length': 1.856098931984261, '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': '749184', 'n_tokens_mistral': 1884, 'n_tokens_neox': 1793, 'n_words': 367}