@@ -100,35 +100,12 @@ jobs:
100100
101101 - name : Install dependencies
102102 if : ${{ env.USE_CACHE == '1' }}
103- run : |
103+ uses : ./.github/actions/install_unix_deps
104+ continue-on-error : false
105+ with :
104106 # For GHA Cache
105- dependencies=(zstd)
106- dependent_exes=(zstd)
107-
108- not_found=0
109- for dep in ${dependent_exes[@]}; do
110- if ! (command -v curl 2>&1 >/dev/null); then
111- not_found=1
112- break
113- fi
114- done
115- if [[ $not_found == 0 ]]; then
116- echo "All dependencies are found. Do nothing."
117- exit 0
118- fi
119- if ! (command -v sudo 2>&1 >/dev/null); then
120- if [[ $EUID == 0 ]]; then
121- alias SUDO=""
122- else
123- echo "The following oprations require root access."
124- exit 1
125- fi
126- else
127- alias SUDO="sudo"
128- fi
129- shopt -s expand_aliases
130- SUDO apt update
131- SUDO apt install -y ${dependencies[@]}
107+ dependencies : " zstd"
108+ dependent_exes : " zstd"
132109
133110 - name : Dump environment
134111 run : |
@@ -354,6 +331,14 @@ jobs:
354331 echo "CUDA_BINDINGS_ARTIFACTS_DIR=$(realpath "$REPO_DIR/cuda_bindings/dist")" >> $GITHUB_ENV
355332 echo "SKIP_CUDA_BINDINGS_TEST=${SKIP_CUDA_BINDINGS_TEST}" >> $GITHUB_ENV
356333
334+ - name : Install dependencies
335+ uses : ./.github/actions/install_unix_deps
336+ continue-on-error : false
337+ with :
338+ # zstd for GHA Cache, gcc for Cython tests
339+ dependencies : " zstd build-essential"
340+ dependent_exes : " zstd gcc"
341+
357342 # We'll try GHA Artifacts first, and then fall back to GHA Cache
358343 - name : Download cuda.bindings build artifacts
359344 id : cuda-bindings-download
@@ -463,8 +448,6 @@ jobs:
463448 pip install -r requirements.txt
464449 pytest -rxXs tests/
465450 if [[ "${{ matrix.host-platform }}" == linux* ]]; then
466- # cython tests require gcc
467- apt install -y build-essential
468451 bash tests/cython/build_tests.sh
469452 elif [[ "${{ matrix.host-platform }}" == win* ]]; then
470453 # TODO: enable this once win-64 runners are up
0 commit comments