From 355d19032b87377ae101747ca64589e8c3e48424 Mon Sep 17 00:00:00 2001 From: John Agapiou Date: Fri, 8 Dec 2023 14:34:09 +0000 Subject: [PATCH] Update action.yml --- .github/actions/install-concordia/action.yml | 70 ++++++++++---------- 1 file changed, 35 insertions(+), 35 deletions(-) diff --git a/.github/actions/install-concordia/action.yml b/.github/actions/install-concordia/action.yml index 955187f8..40e74607 100644 --- a/.github/actions/install-concordia/action.yml +++ b/.github/actions/install-concordia/action.yml @@ -14,35 +14,35 @@ concurrency: runs: using: composite steps: - # - name: Get current runner - # id: os-info - # shell: bash - # run: | - # if [ "${RUNNER_OS}" = 'macOS' ]; then - # echo "name=$(sw_vers -productName)" >> $GITHUB_OUTPUT - # echo "version=$(sw_vers -productVersion)" >> $GITHUB_OUTPUT - # elif [ "${RUNNER_OS}" = 'Linux' ]; then - # echo "name=$(lsb_release -i -s)" >> $GITHUB_OUTPUT - # echo "version=$(lsb_release -r -s)" >> $GITHUB_OUTPUT - # else - # exit 1 - # fi + - name: Get current runner + id: os-info + shell: bash + run: | + if [ "${RUNNER_OS}" = 'macOS' ]; then + echo "name=$(sw_vers -productName)" >> $GITHUB_OUTPUT + echo "version=$(sw_vers -productVersion)" >> $GITHUB_OUTPUT + elif [ "${RUNNER_OS}" = 'Linux' ]; then + echo "name=$(lsb_release -i -s)" >> $GITHUB_OUTPUT + echo "version=$(lsb_release -r -s)" >> $GITHUB_OUTPUT + else + exit 1 + fi - name: Set up Python ${{ inputs.python-version }} uses: actions/setup-python@61a6322f88396a6271a6ee3565807d608ecaddd1 with: python-version: ${{ inputs.python-version }} - cache: 'pip' - cache-dependency-path: setup.py + # cache: 'pip' + # cache-dependency-path: setup.py - # - name: Restore Concordia installation - # id: restore - # uses: actions/cache/restore@v3 - # with: - # path: venv - # key: install-concordia-${{ steps.os-info.outputs.name }}-${{ steps.os-info.outputs.version }}-py${{ inputs.python-version }}-${{ hashFiles('setup.py') }} - # restore-keys: | - # install-concordia-${{ steps.os-info.outputs.name }}-${{ steps.os-info.outputs.version }}-py${{ inputs.python-version }}- + - name: Restore Concordia installation + id: restore + uses: actions/cache/restore@v3 + with: + path: venv + key: install-concordia-${{ steps.os-info.outputs.name }}-${{ steps.os-info.outputs.version }}-py${{ inputs.python-version }}-${{ hashFiles('setup.py') }} + restore-keys: | + install-concordia-${{ steps.os-info.outputs.name }}-${{ steps.os-info.outputs.version }}-py${{ inputs.python-version }}- - name: Install Concordia # if: steps.restore.outputs.cache-hit != 'true' @@ -54,16 +54,16 @@ runs: # source venv/bin/activate pip install --editable .[dev] - # - name: Save Concordia installation - # if: steps.restore.outputs.cache-hit != 'true' - # uses: actions/cache/save@v3 - # with: - # path: venv - # key: ${{ steps.restore.outputs.cache-primary-key }} + - name: Save Concordia installation + if: steps.restore.outputs.cache-hit != 'true' + uses: actions/cache/save@v3 + with: + path: venv + key: ${{ steps.restore.outputs.cache-primary-key }} - # - name: Activate virtual environment - # shell: bash - # run: | - # source venv/bin/activate - # pip list - # echo "PATH=${PATH}" >> $GITHUB_ENV + - name: Activate virtual environment + shell: bash + run: | + source venv/bin/activate + pip list + echo "PATH=${PATH}" >> $GITHUB_ENV