Skip to content

Commit 290f8bf

Browse files
committed
wip
1 parent 885e383 commit 290f8bf

1 file changed

Lines changed: 37 additions & 7 deletions

File tree

.github/workflows/codeql.yml

Lines changed: 37 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ jobs:
1616
# - https://gh.io/supported-runners-and-hardware-resources
1717
# - https://gh.io/using-larger-runners (GitHub.com only)
1818
# Consider using larger runners or machines with greater resources for possible analysis time improvements.
19-
runs-on: ubuntu-latest
19+
runs-on: ${{ matrix.os }}
2020
permissions:
2121
# required for all workflows
2222
security-events: write
@@ -30,17 +30,20 @@ jobs:
3030
include:
3131
- language: actions
3232
build-mode: none
33+
os: ubuntu-latest
3334
- language: cpp
34-
build-mode: autobuild
35+
build-mode: manual
36+
os: macos-latest
3537
- language: java-kotlin
3638
build-mode: manual
39+
os: ubuntu-latest
3740
steps:
3841
- name: Checkout repository
3942
uses: actions/checkout@v6
4043

41-
# Set up Flutter for Java-Kotlin analysis
44+
# Set up Flutter for native analysis
4245
- name: Set up Flutter
43-
if: matrix.language == 'java-kotlin'
46+
if: matrix.language == 'java-kotlin' || matrix.language == 'cpp'
4447
uses: ./.github/actions/setup-flutter
4548

4649
# Initializes the CodeQL tools for scanning.
@@ -49,13 +52,40 @@ jobs:
4952
with:
5053
languages: ${{ matrix.language }}
5154
build-mode: ${{ matrix.build-mode }}
55+
config: |
56+
paths-ignore:
57+
- 'example/**'
5258
53-
# Build Android library for Java-Kotlin analysis
59+
# Build native libraries for analysis
5460
- name: Build Android library
5561
if: matrix.language == 'java-kotlin'
5662
run: |
57-
cd android
58-
./gradlew assemble --no-daemon
63+
cd example
64+
flutter build apk --debug
65+
66+
- name: Build iOS library
67+
if: matrix.language == 'cpp'
68+
run: |
69+
# Fetch dependencies for the example app which uses the plugin
70+
cd example
71+
flutter pub get
72+
73+
# Install CocoaPods dependencies
74+
cd ios
75+
pod install
76+
77+
# Build using xcodebuild directly to ensure CodeQL can trace the compilation
78+
xcodebuild -workspace Runner.xcworkspace \
79+
-scheme Runner \
80+
-configuration Debug \
81+
-sdk iphonesimulator \
82+
-arch arm64 \
83+
COMPILER_INDEX_STORE_ENABLE=NO \
84+
CODE_SIGNING_ALLOWED=NO \
85+
CODE_SIGNING_REQUIRED=NO \
86+
CODE_SIGN_ENTITLEMENTS="" \
87+
CODE_SIGNING_IDENTITY="" \
88+
build
5989
6090
- name: Perform CodeQL Analysis
6191
uses: github/codeql-action/analyze@v4

0 commit comments

Comments
 (0)