Skip to content

Conversation

@tabikiji
Copy link

@tabikiji tabikiji commented Sep 7, 2025

Purpose / Description

Improve the CodeQL workflow for better stability and faster execution.
The previous setup often failed due to OOM errors during Kotlin compilation.

Fixes

Approach

-Added a new GitHub Actions workflow for CodeQL under
.github/workflows/codeql.yml

-Based on GitHub’s standard CodeQL template, customized for AnkiDroid
-Switched to JDK 17 for better compatibility and stability with AGP/Kotlin
-Replaced autobuild with an explicit Gradle compile command:
./gradlew --no-daemon --max-workers=2 -x test -x lint :AnkiDroid:compileFdroidDebugSources
-Runs only on pull requests to keep CI lightweight
-Uses Fdroid + Debug flavor to reduce dependencies and build time
-Applies security-extended query pack for essential security checks

How Has This Been Tested?

Workflow successfully runs on my fork
Verified that CodeQL initializes and performs analysis correctly
Kotlin OOM issue no longer occurs

Learning (optional, can help others)

Learned how CodeQL integrates with GitHub Actions

Official documentation followed:
https://docs.github.com/ja/code-security/code-scanning/creating-an-advanced-setup-for-code-scanning/customizing-your-advanced-setup-for-code-scanning

Checklist

  • You have a descriptive commit message with a short title (first line, max 50 chars).
  • You have commented your code, particularly in hard-to-understand areas
  • You have performed a self-review of your own code

@welcome
Copy link

welcome bot commented Sep 7, 2025

First PR! 🚀 We sincerely appreciate that you have taken the time to propose a change to AnkiDroid! Please have patience with us as we are all volunteers - we will get to this as soon as possible.

@lukstbit lukstbit added the Needs Author Reply Waiting for a reply from the original author label Sep 8, 2025
@github-actions
Copy link
Contributor

Hello 👋, this PR has had no activity for more than 2 weeks and needs a reply from the author. If you think this is a mistake please comment and ping a maintainer to get this merged ASAP! Thanks for contributing! You have 7 days until this gets closed automatically

@github-actions github-actions bot added the Stale label Sep 22, 2025
@tabikiji tabikiji marked this pull request as draft September 25, 2025 05:45
@github-actions github-actions bot removed the Stale label Sep 25, 2025
@github-actions
Copy link
Contributor

github-actions bot commented Oct 9, 2025

Hello 👋, this PR has had no activity for more than 2 weeks and needs a reply from the author. If you think this is a mistake please comment and ping a maintainer to get this merged ASAP! Thanks for contributing! You have 7 days until this gets closed automatically

@github-actions github-actions bot added the Stale label Oct 9, 2025
@tabikiji tabikiji marked this pull request as ready for review October 9, 2025 11:55
@github-actions github-actions bot removed the Stale label Oct 9, 2025
@tabikiji tabikiji marked this pull request as draft October 14, 2025 13:13
@tabikiji tabikiji changed the title Setup codeql CI: Re-enable CodeQL with lightweight Fdroid build (JDK17, compile-only) Oct 14, 2025
Your tabikiji and others added 9 commits October 14, 2025 22:44
disabled default codeQL analysis so that codeQL can be run on customized setting
… into setup-codeql

# Please enter a commit message to explain why this merge is necessary,
# especially if it merges an updated upstream into a topic branch.
#
# Lines starting with '#' will be ignored, and an empty message aborts
# the commit.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Needs Author Reply Waiting for a reply from the original author New contributor

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[security] Setup CodeQL for java-kotlin

2 participants