Skip to content

Commit

Permalink
Python version consistency in CI (#1711)
Browse files Browse the repository at this point in the history
- Provide exact python executable path to cmake,
  to ensure it uses same python version as other
  CI steps
- Consistent use of 3.12 in CI builds

Signed-off-by: Sylvain Leclerc <[email protected]>
  • Loading branch information
sylvlecl authored Oct 19, 2023
1 parent a9bf785 commit 67d9d1d
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 7 deletions.
5 changes: 3 additions & 2 deletions .github/workflows/sonarcloud.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ jobs:
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: 3.8
python-version: 3.12

- name: Install gcovr
run: sudo pip install gcovr==5.0 #5.1 generate issues with sonarcloud report parsing
Expand All @@ -86,7 +86,8 @@ jobs:
-DCMAKE_PREFIX_PATH="../install;${{ env.ORTOOLS_DIR }}/install" \
-DBUILD_TESTING=ON \
-DMZ_CODE_COVERAGE=ON \
-DBUILD_not_system=OFF
-DBUILD_not_system=OFF \
-DPython3_EXECUTABLE='${{ steps.setup-python.outputs.python-path }}'
- name: Build
run: |
Expand Down
6 changes: 4 additions & 2 deletions .github/workflows/ubuntu.yml
Original file line number Diff line number Diff line change
Expand Up @@ -73,9 +73,10 @@ jobs:
ortools-dir: ${{env.ORTOOLS_DIR}}

- name: Set up Python
id: setup-python
uses: actions/setup-python@v4
with:
python-version: 3.x
python-version: '3.12'

- name: Install dependencies
run: |
Expand All @@ -87,7 +88,7 @@ jobs:
git submodule update --init src/antares-deps
git submodule update --init --remote --recursive src/tests/resources/Antares_Simulator_Tests
- name: Configure push
- name: Configure
run: |
cmake -B _build -S src \
-DCMAKE_C_COMPILER_LAUNCHER=ccache \
Expand All @@ -98,6 +99,7 @@ jobs:
-DBUILD_not_system=OFF \
-DBUILD_TOOLS=ON \
-DCMAKE_PREFIX_PATH=${{ env.ORTOOLS_DIR }}/install \
-DPython3_EXECUTABLE='${{ steps.setup-python.outputs.python-path }}'
- name: Build
run: |
Expand Down
5 changes: 3 additions & 2 deletions .github/workflows/windows-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ jobs:
uses: actions/setup-python@v4
with:
architecture: 'x64'
python-version: '3.11'
python-version: '3.12'

- name : Install deps with VCPKG
run: |
Expand Down Expand Up @@ -99,7 +99,8 @@ jobs:
-DCMAKE_BUILD_TYPE=release \
-DBUILD_TESTING=ON \
-DBUILD_TOOLS=ON \
-DBUILD_not_system=OFF
-DBUILD_not_system=OFF \
-DPython3_EXECUTABLE='${{ steps.setup-python.outputs.python-path }}'
- name: Build
run: |
Expand Down
4 changes: 3 additions & 1 deletion .github/workflows/windows-vcpkg.yml
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,7 @@ jobs:

- name: Setup Python 3.12
uses: actions/setup-python@v4
id: setup-python
with:
architecture: 'x64'
python-version: '3.12'
Expand All @@ -113,7 +114,8 @@ jobs:
-DCMAKE_BUILD_TYPE=release \
-DBUILD_TESTING=ON \
-DBUILD_TOOLS=ON \
-DBUILD_not_system=OFF
-DBUILD_not_system=OFF \
-DPython3_EXECUTABLE='${{ steps.setup-python.outputs.python-path }}'
- name: Build
shell: bash
Expand Down

0 comments on commit 67d9d1d

Please sign in to comment.