FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Make action to be node version agnostic by kishaningithub · Pull Request #16 · kishaningithub/setup-python-amazon-linux · GitHub

Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension .yml  (2) All 1 file type selected
Only manifest files
Viewed files
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Unified
Split
Hide whitespace
Diff view
Unified
Split
Hide whitespace
23 changes: 12 additions & 11 deletions .github/workflows/test.yml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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: ./
Expand Down Expand Up @@ -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: ./
Expand All @@ -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: ./
Expand All @@ -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: |
Expand Down
18 changes: 9 additions & 9 deletions action.yml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}"
Expand All @@ -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"
Expand Down

Back | FazBrowse Home | New Git URL