|  | 
| 17 | 17 | jobs: | 
| 18 | 18 |   analyze: | 
| 19 | 19 |     name: Analyze | 
| 20 |  | -    runs-on: ubuntu-latest | 
|  | 20 | +    runs-on: windows-2019 | 
| 21 | 21 |     permissions: | 
| 22 | 22 |       contents: read | 
| 23 | 23 |       actions: read | 
|  | 
| 49 | 49 | 
 | 
| 50 | 50 |     # Autobuild attempts to build any compiled languages  (C/C++, C#, or Java). | 
| 51 | 51 |     # If this step fails, then you should remove it and run the build manually (see below) | 
| 52 |  | -    - name: Autobuild | 
| 53 |  | -      uses: github/codeql-action/autobuild@v3 | 
|  | 52 | +    # - name: Autobuild | 
|  | 53 | +    #   uses: github/codeql-action/autobuild@v3 | 
|  | 54 | +    - name: Build | 
|  | 55 | +      env: | 
|  | 56 | +        SKIP_ARM_BUILD: 1 | 
|  | 57 | +        SKIP_ARM64_BUILD: 1 | 
|  | 58 | +        PlatformToolset: v142 | 
|  | 59 | +        VSTOOLS_VERSION: vs2019 | 
|  | 60 | +      shell: cmd | 
|  | 61 | +      if: matrix.language == 'cpp' | 
|  | 62 | +      run: build-all.bat | 
| 54 | 63 | 
 | 
| 55 | 64 |     # ℹ️ Command-line programs to run using the OS shell. | 
| 56 | 65 |     # 📚 https://git.io/JvXDl | 
|  | 
| 63 | 72 |     #   make bootstrap | 
| 64 | 73 |     #   make release | 
| 65 | 74 | 
 | 
|  | 75 | +    - name: Perform CodeQL Analysis | 
|  | 76 | +      uses: github/codeql-action/analyze@v2 | 
|  | 77 | + | 
|  | 78 | +  analyze-java: | 
|  | 79 | +    name: Analyze Java | 
|  | 80 | +    runs-on: windows-latest | 
|  | 81 | +    permissions: | 
|  | 82 | +      contents: read | 
|  | 83 | +      actions: read | 
|  | 84 | +      security-events: write | 
|  | 85 | + | 
|  | 86 | +    strategy: | 
|  | 87 | +      fail-fast: false | 
|  | 88 | +     | 
|  | 89 | +    steps: | 
|  | 90 | +    - name: Checkout | 
|  | 91 | +      uses: actions/checkout@v2 | 
|  | 92 | +      continue-on-error: true | 
|  | 93 | + | 
|  | 94 | +    - name: Update submodules | 
|  | 95 | +      run: | | 
|  | 96 | +        git submodule sync | 
|  | 97 | +        git config --global submodule.lib/modules.update none | 
|  | 98 | +        git -c protocol.version=2 submodule update --init --force --depth=1 | 
|  | 99 | +
 | 
|  | 100 | +    - name: Initialize CodeQL | 
|  | 101 | +      uses: github/codeql-action/init@v3 | 
|  | 102 | +      with: | 
|  | 103 | +        languages: java | 
|  | 104 | + | 
|  | 105 | +    - name: Setup Java | 
|  | 106 | +      uses: actions/setup-java@v3 | 
|  | 107 | +      with: | 
|  | 108 | +        distribution: 'adopt' | 
|  | 109 | +        java-version: '11' | 
|  | 110 | +    - name: Remove default github maven configuration | 
|  | 111 | +      run: rm $Env:USERPROFILE\.m2\settings.xml | 
|  | 112 | +    - name: Setup Android SDK | 
|  | 113 | +      uses: android-actions/setup-android@v2 | 
|  | 114 | +    - name: Install NDK | 
|  | 115 | +      run: | | 
|  | 116 | +        java -version | 
|  | 117 | +        gci env:* | sort-object name | 
|  | 118 | +        new-item "C:\Users\runneradmin\.android\repositories.cfg" -ItemType "file" | 
|  | 119 | +        echo yes | .\sdkmanager.bat "ndk-bundle" "cmake;3.10.2.4988404" "ndk;21.4.7075529" --sdk_root=$Env:ANDROID_SDK_ROOT | 
|  | 120 | +      working-directory: ${{ env.ANDROID_SDK_ROOT }}\cmdline-tools\7.0\bin | 
|  | 121 | +    - name: Chocolatey | 
|  | 122 | +      run: | | 
|  | 123 | +        choco install --no-progress -y ninja | 
|  | 124 | +    - name: List CMake | 
|  | 125 | +      run: | | 
|  | 126 | +        pwd | 
|  | 127 | +        echo "==================" | 
|  | 128 | +        gci -r -i "CMake*" -Name | 
|  | 129 | +        echo "==================" | 
|  | 130 | +        gci -r -i "gtest-all*" -Name | 
|  | 131 | +        echo "==================" | 
|  | 132 | +        gci third_party/ -Name | 
|  | 133 | +        echo "==================" | 
|  | 134 | +        gci third_party/googletest -Name | 
|  | 135 | +    - name: Gradle Build | 
|  | 136 | +      run: | | 
|  | 137 | +        .\gradlew.bat maesdk:assemble app:assemble | 
|  | 138 | +      working-directory: lib\android_build | 
|  | 139 | + | 
| 66 | 140 |     - name: Perform CodeQL Analysis | 
| 67 | 141 |       uses: github/codeql-action/analyze@v3 | 
0 commit comments