From 76c3a0ba6fc81b4b7521a9c496faf5697c5488aa Mon Sep 17 00:00:00 2001 From: Yuyu1115 <105599462+Yuyu-1115@users.noreply.github.com> Date: Thu, 13 Aug 2026 16:18:26 +0800 Subject: [PATCH 1/2] ci: add the configuration for codeql --- .github/workflows/codeql.yml | 90 ++++++++++++++++++++++++++++++++++++ 1 file changed, 90 insertions(+) create mode 100644 .github/workflows/codeql.yml diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml new file mode 100644 index 0000000..6b2cf27 --- /dev/null +++ b/.github/workflows/codeql.yml @@ -0,0 +1,90 @@ +name: CodeQL + +on: + push: + branches: ["main"] + pull_request: + branches: ["main"] + schedule: + - cron: "0 0 * * 0" + workflow_dispatch: + +permissions: + contents: read + security-events: write + packages: read + +concurrency: + group: codeql-${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + +jobs: + analyze-kotlin: + name: Analyze Kotlin + runs-on: ubuntu-latest + + steps: + - name: Check out repository + uses: actions/checkout@v7 + with: + persist-credentials: false + + - name: Set up Java + uses: actions/setup-java@v5 + with: + distribution: temurin + java-version: "17" + + - name: Set up Gradle + uses: gradle/actions/setup-gradle@v6 + + - name: Initialize CodeQL + uses: github/codeql-action/init@v4 + with: + languages: java-kotlin + build-mode: manual + + - name: Build Kotlin + run: ./gradlew :androidApp:compileDebugKotlin --no-daemon + + - name: Analyze Kotlin + uses: github/codeql-action/analyze@v4 + + analyze-swift: + name: Analyze Swift + runs-on: macos-latest + + steps: + - name: Check out repository + uses: actions/checkout@v7 + with: + persist-credentials: false + + - name: Set up Java + uses: actions/setup-java@v5 + with: + distribution: temurin + java-version: "17" + + - name: Set up Gradle + uses: gradle/actions/setup-gradle@v6 + + - name: Initialize CodeQL + uses: github/codeql-action/init@v4 + with: + languages: swift + build-mode: manual + - name: Build iOS application + run: >- + xcodebuild + -project iosApp/iosApp.xcodeproj + -scheme iosApp + -configuration Debug + -sdk iphonesimulator + -destination "generic/platform=iOS Simulator" + -derivedDataPath "$RUNNER_TEMP/DerivedData" + CODE_SIGNING_ALLOWED=NO + build + + - name: Analyze Swift + uses: github/codeql-action/analyze@v4 From b35c21c4f72c4aa6b7e1e404d4927cbfa27666f4 Mon Sep 17 00:00:00 2001 From: Yuyu1115 <105599462+Yuyu-1115@users.noreply.github.com> Date: Thu, 13 Aug 2026 16:37:49 +0800 Subject: [PATCH 2/2] fix(ci): add no-build-cacha and task-graph --- .github/workflows/codeql.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml index 6b2cf27..19095f4 100644 --- a/.github/workflows/codeql.yml +++ b/.github/workflows/codeql.yml @@ -45,7 +45,11 @@ jobs: build-mode: manual - name: Build Kotlin - run: ./gradlew :androidApp:compileDebugKotlin --no-daemon + run: >- + ./gradlew :androidApp:compileDebugKotlin + --no-daemon + --no-build-cache + --task-graph - name: Analyze Kotlin uses: github/codeql-action/analyze@v4