Skip to content

Commit

Permalink
Fix CI: CodeQL Setup (#5385)
Browse files Browse the repository at this point in the history
Fix broken Python setup in CodeQL CI.
  • Loading branch information
ax3l authored Oct 10, 2024
1 parent c045eaf commit b2840be
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,16 +31,22 @@ jobs:
- name: Checkout
uses: actions/checkout@v4

- uses: actions/setup-python@v5
name: Install Python
with:
python-version: '3.x'

- name: Install Packages (C++)
if: ${{ matrix.language == 'cpp' }}
run: |
sudo apt-get update
sudo apt-get install --yes cmake openmpi-bin libopenmpi-dev libhdf5-openmpi-dev libadios-openmpi-dev ccache
python -m pip install --upgrade pip
python -m pip install --upgrade pipx
python -m pip install --upgrade wheel
python -m pip install --upgrade cmake
export CMAKE="$HOME/.local/bin/cmake" && echo "CMAKE=$CMAKE" >> $GITHUB_ENV
python -m pipx install cmake
- name: Set Up Cache
if: ${{ matrix.language == 'cpp' }}
Expand All @@ -54,7 +60,7 @@ jobs:
- name: Configure (C++)
if: ${{ matrix.language == 'cpp' }}
run: |
$CMAKE -S . -B build -DWarpX_OPENPMD=ON
cmake -S . -B build -DWarpX_OPENPMD=ON
- name: Initialize CodeQL
uses: github/codeql-action/init@v3
Expand All @@ -75,15 +81,15 @@ jobs:
export CCACHE_MAXSIZE=100M
ccache -z
$CMAKE --build build -j 4
cmake --build build -j 4
ccache -s
du -hs ~/.cache/ccache
# Make sure CodeQL has something to do
touch Source/Utils/WarpXVersion.cpp
export CCACHE_DISABLE=1
$CMAKE --build build -j 4
cmake --build build -j 4
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v3
Expand Down

0 comments on commit b2840be

Please sign in to comment.