Skip to content

Commit a97cb02

Browse files
committed
wip
1 parent 885e383 commit a97cb02

File tree

1 file changed

+41
-7
lines changed

1 file changed

+41
-7
lines changed

.github/workflows/codeql.yml

Lines changed: 41 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
name: "CodeQL Advanced"
22

3+
concurrency:
4+
group: ${{ github.workflow }}-${{ github.ref }}
5+
cancel-in-progress: true
6+
37
on:
48
push:
59
branches: ["main"]
@@ -16,7 +20,7 @@ jobs:
1620
# - https://gh.io/supported-runners-and-hardware-resources
1721
# - https://gh.io/using-larger-runners (GitHub.com only)
1822
# Consider using larger runners or machines with greater resources for possible analysis time improvements.
19-
runs-on: ubuntu-latest
23+
runs-on: ${{ matrix.os }}
2024
permissions:
2125
# required for all workflows
2226
security-events: write
@@ -30,17 +34,20 @@ jobs:
3034
include:
3135
- language: actions
3236
build-mode: none
37+
os: ubuntu-latest
3338
- language: cpp
34-
build-mode: autobuild
39+
build-mode: manual
40+
os: macos-latest
3541
- language: java-kotlin
3642
build-mode: manual
43+
os: ubuntu-latest
3744
steps:
3845
- name: Checkout repository
3946
uses: actions/checkout@v6
4047

41-
# Set up Flutter for Java-Kotlin analysis
48+
# Set up Flutter for native analysis
4249
- name: Set up Flutter
43-
if: matrix.language == 'java-kotlin'
50+
if: matrix.language == 'java-kotlin' || matrix.language == 'cpp'
4451
uses: ./.github/actions/setup-flutter
4552

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

0 commit comments

Comments
 (0)