diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 6ecc4f0..edbb3e1 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -6,13 +6,6 @@ on: pull_request: branches: [main] -env: - # This is required to support GLIB versions present in amazon linux 2. Can be removed once amazon linux 2 is 💀 - # More info - # - https://github.com/actions/checkout/issues/1809#issuecomment-2208202462 - # - https://github.blog/changelog/2024-03-07-github-actions-all-actions-will-run-on-node20-instead-of-node16-by-default/ - ACTIONS_ALLOW_USE_UNSECURE_NODE_VERSION: true - jobs: test_python_installation: strategy: @@ -32,7 +25,9 @@ jobs: run: | yum install -y git tar gzip sudo which - - uses: actions/checkout@v3 + - name: Checkout + run: | + git clone --depth 1 -b "${GITHUB_HEAD_REF:-$GITHUB_REF_NAME}" "https://github.com/${GITHUB_REPOSITORY}.git" . - name: Install python uses: ./ @@ -79,7 +74,9 @@ jobs: - name: Setup runner run: yum install -y git tar gzip sudo - - uses: actions/checkout@v3 + - name: Checkout + run: | + git clone --depth 1 -b "${GITHUB_HEAD_REF:-$GITHUB_REF_NAME}" "https://github.com/${GITHUB_REPOSITORY}.git" . - name: Install python uses: ./ @@ -105,7 +102,9 @@ jobs: run: | yum install -y git tar gzip sudo - - uses: actions/checkout@v3 + - name: Checkout + run: | + git clone --depth 1 -b "${GITHUB_HEAD_REF:-$GITHUB_REF_NAME}" "https://github.com/${GITHUB_REPOSITORY}.git" . - name: Install python uses: ./ @@ -129,7 +128,9 @@ jobs: run: | yum install -y git tar gzip sudo - - uses: actions/checkout@v3 + - name: Checkout + run: | + git clone --depth 1 -b "${GITHUB_HEAD_REF:-$GITHUB_REF_NAME}" "https://github.com/${GITHUB_REPOSITORY}.git" . - name: Create python version file run: | diff --git a/action.yml b/action.yml index e2507eb..ec7e546 100644 --- a/action.yml +++ b/action.yml @@ -32,17 +32,17 @@ runs: exact_python_version="${{ steps.find-exact-python-version.outputs.exact_python_version }}" echo "installation_directory=${HOME}/.setup-python-amazon-linux/.python-versions/${exact_python_version}" >> $GITHUB_OUTPUT - - name: Cache - id: cache-python - uses: actions/cache@v3 - if: inputs.cache == 'true' - with: - path: ${{ steps.set-installation-directory.outputs.installation_directory }} - key: python-${{ steps.find-exact-python-version.outputs.exact_python_version }}-${{ runner.arch }} +# - name: Cache +# id: cache-python +# uses: actions/cache@v3 +# if: inputs.cache == 'true' +# with: +# path: ${{ steps.set-installation-directory.outputs.installation_directory }} +# key: python-${{ steps.find-exact-python-version.outputs.exact_python_version }}-${{ runner.arch }} - id: setup-python shell: bash - if: inputs.cache == 'false' || (inputs.cache == 'true' && steps.cache-python.outputs.cache-hit != 'true') +# if: inputs.cache == 'false' || (inputs.cache == 'true' && steps.cache-python.outputs.cache-hit != 'true') run: | installation_directory="${{ steps.set-installation-directory.outputs.installation_directory }}" exact_python_version="${{ steps.find-exact-python-version.outputs.exact_python_version }}" @@ -61,7 +61,7 @@ runs: echo "The following python binaries are now available in the PATH" ls "${installation_directory}/bin" - + echo "Linking python libraries..." ls "${installation_directory}/lib" sudo ldconfig "${installation_directory}/lib"