Skip to content

Commit c5cc89d

Browse files
authored
Merge branch 'main' into ajadusum/powbroadasync
2 parents 1af4043 + c480743 commit c5cc89d

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

46 files changed

+88
-3750
lines changed

.github/workflows/codeql-analysis.yml

+79-5
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ on:
1717
jobs:
1818
analyze:
1919
name: Analyze
20-
runs-on: ubuntu-latest
20+
runs-on: windows-2019
2121
permissions:
2222
contents: read
2323
actions: read
@@ -28,7 +28,7 @@ jobs:
2828
matrix:
2929
# Override automatic language detection by changing the below list
3030
# Supported options are ['csharp', 'cpp', 'go', 'java', 'javascript', 'python']
31-
language: ['cpp']
31+
language: ['cpp', 'javascript', 'python']
3232
# Learn more...
3333
# https://docs.github.com/en/github/finding-security-vulnerabilities-and-errors-in-your-code/configuring-code-scanning#overriding-automatic-language-detection
3434

@@ -39,7 +39,7 @@ jobs:
3939

4040
# Initializes the CodeQL tools for scanning.
4141
- name: Initialize CodeQL
42-
uses: github/codeql-action/init@v2
42+
uses: github/codeql-action/init@v3
4343
with:
4444
languages: ${{ matrix.language }}
4545
# If you wish to specify custom queries, you can do so here or in a config file.
@@ -49,8 +49,17 @@ jobs:
4949

5050
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
5151
# 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@v2
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
5463

5564
# ℹ️ Command-line programs to run using the OS shell.
5665
# 📚 https://git.io/JvXDl
@@ -65,3 +74,68 @@ jobs:
6574

6675
- name: Perform CodeQL Analysis
6776
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+
140+
- name: Perform CodeQL Analysis
141+
uses: github/codeql-action/analyze@v3

tests/functests/CMakeLists.txt

+3
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,9 @@ if (EXISTS ${CMAKE_SOURCE_DIR}/lib/modules/exp/tests)
3434
${CMAKE_SOURCE_DIR}/lib/modules/exp/tests/functests/ECSClientRealworldFuncTests.cpp
3535
${CMAKE_SOURCE_DIR}/lib/modules/exp/tests/functests/ECSConfigCacheFuncTests.cpp
3636
)
37+
if (EXISTS ${CMAKE_SOURCE_DIR}/lib/modules/exp/tests/functests/test.json)
38+
file(COPY_FILE ${CMAKE_SOURCE_DIR}/lib/modules/exp/tests/functests/test.json ${CMAKE_BINARY_DIR}/test.json)
39+
endif()
3740
endif()
3841

3942
source_group(" " REGULAR_EXPRESSION "")

tests/functests/FuncTests.vcxproj

+4-1
Original file line numberDiff line numberDiff line change
@@ -461,4 +461,7 @@
461461
</ItemGroup>
462462
<Import Project="$(SolutionDir)\build.props" Condition="Exists('$(SolutionDir)\build.props')" />
463463
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
464-
</Project>
464+
<Target Name="CopyJson" AfterTargets="Build" Condition="exists('$(ProjectDir)..\..\lib\modules\exp\tests\functests\test.json')">
465+
<Copy SourceFiles="$(ProjectDir)..\..\lib\modules\exp\tests\functests\test.json" DestinationFolder="$(OutDir)" />
466+
</Target>
467+
</Project>

0 commit comments

Comments
 (0)