Skip to content

Commit f0ddbb7

Browse files
committed
wip
1 parent 885e383 commit f0ddbb7

1 file changed

Lines changed: 41 additions & 11 deletions

File tree

.github/workflows/codeql.yml

Lines changed: 41 additions & 11 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
33-
- language: cpp
34-
build-mode: autobuild
35-
- language: java-kotlin
37+
os: ubuntu-latest
38+
- language: c-cpp
3639
build-mode: manual
40+
os: macos-latest
41+
- language: java-kotlin
42+
build-mode: none
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 == 'c-cpp'
4451
uses: ./.github/actions/setup-flutter
4552

4653
# Initializes the CodeQL tools for scanning.
@@ -49,13 +56,36 @@ jobs:
4956
with:
5057
languages: ${{ matrix.language }}
5158
build-mode: ${{ matrix.build-mode }}
59+
config: |
60+
paths:
61+
- 'android/**'
62+
- 'ios/**'
63+
paths-ignore:
64+
- 'example/**'
5265
53-
# Build Android library for Java-Kotlin analysis
54-
- name: Build Android library
55-
if: matrix.language == 'java-kotlin'
66+
- name: Build iOS library
67+
if: matrix.language == 'c-cpp'
5668
run: |
57-
cd android
58-
./gradlew assemble --no-daemon
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)