@@ -13,12 +13,17 @@ name: "CodeQL Advanced"
1313
1414on :
1515 push :
16- branches : [ " dev" ]
16+ branches : [ dev, main ]
1717 pull_request :
18- branches : [ " dev" ]
18+ branches : [ dev ]
1919 schedule :
2020 - cron : ' 0 2 * * 1' # 2AM Monday
2121
22+ env :
23+ PYTHON_VER : ' 3.11'
24+ PYTORCH_VER : ' 2.8.0'
25+ BUILD_MONAI : 1
26+
2227jobs :
2328 analyze :
2429 name : Analyze (${{ matrix.language }})
2732 # - https://gh.io/supported-runners-and-hardware-resources
2833 # - https://gh.io/using-larger-runners (GitHub.com only)
2934 # Consider using larger runners or machines with greater resources for possible analysis time improvements.
30- runs-on : ' ubuntu-latest'
35+ runs-on : ubuntu-latest
3136 permissions :
3237 # required for all workflows
3338 security-events : write
4651 - language : actions
4752 build-mode : none
4853 - language : c-cpp
49- build-mode : none
54+ build-mode : manual
5055 - language : python
5156 build-mode : none
5257 # CodeQL supports the following values keywords for 'language': 'actions', 'c-cpp', 'csharp', 'go', 'java-kotlin', 'javascript-typescript', 'python', 'ruby', 'rust', 'swift'
@@ -86,16 +91,25 @@ jobs:
8691 # to build your code.
8792 # ℹ️ Command-line programs to run using the OS shell.
8893 # 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun
94+ - name : Set up Python ${{ env.PYTHON_VER }}
95+ if : matrix.build-mode == 'manual'
96+ uses : actions/setup-python@v6
97+ with :
98+ python-version : ${{ env.PYTHON_VER }}
99+ cache : ' pip'
100+
89101 - name : Run manual build steps
90102 if : matrix.build-mode == 'manual'
91103 shell : bash
92104 run : |
93- echo 'If you are using a "manual" build mode for one or more of the' \
94- 'languages you are analyzing, replace this with the commands to build' \
95- 'your code, for example:'
96- echo ' make bootstrap'
97- echo ' make release'
98- exit 1
105+ rm -rf /opt/hostedtoolcache/{node,go,Ruby,Java*}
106+ ls -al /opt/hostedtoolcache
107+ rm -rf /usr/share/dotnet/
108+ python -m pip install -U pip wheel wheel-stub
109+ python -m pip install torch==${PYTORCH_VER} torchvision
110+ python -m pip install --user --upgrade pip wheel
111+ python monai/config/print_dependencies.py build-system | xargs pip install --no-build-isolation
112+ python -m pip install --no-build-isolation .[all,testing]
99113
100114 - name : Perform CodeQL Analysis
101115 uses : github/codeql-action/analyze@v4
0 commit comments