Skip to content

Commit

Permalink
ci: override the python version of the builds
Browse files Browse the repository at this point in the history
- Always use a predefined python version for the builds
instead of the system default one.

Signed-off-by: Adrian Stanea <[email protected]>
  • Loading branch information
Adrian-Stanea committed Oct 17, 2024
1 parent ef4cb50 commit afffce1
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
4 changes: 2 additions & 2 deletions CI/macOS/make_macOS
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ make_package() {
echo "### Make OSX packague"
mkdir -p "${WORKDIR}"/build && cd "${WORKDIR}"/build
cmake "$WORKDIR" \
-DPYTHON_EXECUTABLE:FILEPATH=$(python -c "import os, sys; print(os.path.dirname(sys.executable) + '/python')") \
-DPYTHON_EXECUTABLE:FILEPATH="$(${PYTHON} -c 'import os, sys; print(os.path.dirname(sys.executable))')/${PYTHON}" \
-DOSX_PACKAGE=ON \
-DENABLE_TOOLS=ON \
-DENABLE_PYTHON=ON \
Expand All @@ -25,7 +25,7 @@ make_tar() {
echo "### Make OSX tar"
mkdir -p "${WORKDIR}"/build_tar && cd "${WORKDIR}"/build_tar
cmake "${WORKDIR}" \
-DPYTHON_EXECUTABLE:FILEPATH=$(python -c "import os, sys; print(os.path.dirname(sys.executable) + '/python')") \
-DPYTHON_EXECUTABLE:FILEPATH="$(${PYTHON} -c 'import os, sys; print(os.path.dirname(sys.executable))')/${PYTHON}" \
-DOSX_PACKAGE=OFF \
-DENABLE_PACKAGING=ON \
-DENABLE_PYTHON=ON \
Expand Down
8 changes: 6 additions & 2 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
variables:
libiioPipelineId: 9
PYTHON: python
PIP: pip
PYTHON: python3.11
PIP: pip3
AnalogDevices_OpenSource_GUID: '02a28b00-b3c8-4fdf-af9c-c2460499147f'
IS_PULL_REQUEST: ${{ eq('$(Build.Reason)', 'PullRequest') }}
BRANCH_NAME: $(Build.SourceBranchName)
Expand Down Expand Up @@ -59,6 +59,10 @@ jobs:
fetchDepth: 1
clean: true
persistCredentials: true
- task: UsePythonVersion@0
inputs:
versionSpec: ${{ replace(variables['PYTHON'], 'python', '') }}
addToPath: true
- script: ./CI/ubuntu/install_deps
displayName: "Install Dependencies"
- task: CopyFiles@2
Expand Down

0 comments on commit afffce1

Please sign in to comment.