Skip to content

Commit

Permalink
CI: Fix macOS python dependencies install step
Browse files Browse the repository at this point in the history
Don't use the OS python to install dependencies,
but use the one that's installed for the runner itself.
Select it with the python action.
  • Loading branch information
Smjert committed Apr 8, 2024
1 parent 399bc10 commit b3344a4
Showing 1 changed file with 14 additions and 13 deletions.
27 changes: 14 additions & 13 deletions .github/workflows/hosted_runners.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ on:

push:
branches:
- 'master'
- 'stefano/ci/macos-fix-python-usage'

tags:
- '*'
Expand Down Expand Up @@ -658,20 +658,22 @@ jobs:
coreutils \
gnu-sed
- name: Setup python
uses: actions/setup-python@v5
with:
python-version: '3.x'
architecture: 'x64'

- name: Install tests dependencies
id: install_test_deps
run: |
python_root="/usr/local/Frameworks/Python.framework/Versions/Current"
${python_root}/bin/pip3 install setuptools \
pexpect==3.3 \
psutil \
timeout_decorator \
six \
thrift==0.11.0 \
osquery
echo "PYTHON_ROOT=${python_root}" >> $GITHUB_OUTPUT
pip3 install setuptools \
pexpect==3.3 \
psutil \
timeout_decorator \
six \
thrift==0.11.0 \
osquery
- name: Install CMake
shell: bash
Expand Down Expand Up @@ -721,7 +723,6 @@ jobs:
-DCMAKE_BUILD_TYPE:STRING="${{ matrix.build_type }}" \
-DOSQUERY_BUILD_TESTS=ON \
-DOSQUERY_NO_DEBUG_SYMBOLS=${{ steps.debug_symbols_settings.outputs.VALUE }} \
-DPython3_ROOT_DIR=${{ steps.install_test_deps.outputs.PYTHON_ROOT }} \
${{ steps.build_paths.outputs.SOURCE }}
- name: Build the project
Expand Down

0 comments on commit b3344a4

Please sign in to comment.