66 - ' master'
77 - ' develop'
88
9-
109jobs :
1110 # uses the common workflow that builds slips
1211 install-dependencies-using-reusable-workflow :
1312 uses : ./.github/workflows/install-slips-dependencies.yml
1413
1514 unit-tests :
1615 runs-on : ubuntu-22.04
17- timeout-minutes : 1800
18- # make this job depend on the first job
16+ timeout-minutes : 120
1917 needs : install-dependencies-using-reusable-workflow
2018
21- # suppress tensorflow warnings
2219 env :
2320 TF_CPP_MIN_LOG_LEVEL : 3
2421 TF_ENABLE_ONEDNN_OPTS : 0
9390 - uses : actions/checkout@v4
9491 with :
9592 ref : ${{ github.ref }}
96- fetch-depth : ' '
93+ fetch-depth : 0
9794
95+ - name : Set up Python
96+ uses : actions/setup-python@v5
97+ with :
98+ python-version : 3.10
9899
99100 - name : Restore APT cache
100101 id : apt-cache
@@ -106,20 +107,29 @@ jobs:
106107 key : apt-cache
107108
108109 - if : ${{ steps.apt-cache.outputs.cache-hit == 'true' }}
109- name : Echo restored from cache
110+ name : Echo restored APT cache
110111 continue-on-error : true
111112 run : echo "Restored APT dependencies from cache successfully"
112113
113- - name : Install Python dependencies (from cache if possible)
114- run : |
115- python3 -m pip install --upgrade pip
116- python3 -m pip install -r install/requirements.txt
117-
118- - name : Install apt dependencies (from cache if possible)
114+ - name : Install apt dependencies
119115 run : |
120116 sudo apt-get update
121117 sudo apt-get install -y $(cat install/apt_dependencies.txt)
122118
119+ - name : Restore Python dependencies
120+ id : python-cache
121+ uses : actions/cache@v4
122+ with :
123+ path : ~/.cache/pip
124+ key : ${{ runner.os }}-pip-${{ hashFiles('install/requirements.txt') }}
125+
126+ - if : ${{ steps.python-cache.outputs.cache-hit == 'true' }}
127+ name : Echo restored Python cache
128+ continue-on-error : true
129+ run : echo "Restored Python dependencies from cache successfully"
130+
131+ - name : Install Python dependencies
132+ run : python3 -m pip install -r install/requirements.txt
123133
124134 - name : Start redis server
125135 run : redis-server --daemonize yes
0 commit comments