Skip to content

Commit

Permalink
Working GitHub Actions with Python 2.7
Browse files Browse the repository at this point in the history
Due to:

  * actions/setup-python#672
  * actions/runner-images#7401

Alternative option would be to consider:

  * https:/coatl-dev/docker-six
  * https:/MatteoH2O1999/setup-python

Advantage of this change is that it only relies on Debian.
  • Loading branch information
clach04 committed Jul 22, 2023
1 parent d4935f1 commit ef0cad6
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 6 deletions.
6 changes: 5 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,8 @@ Thanks and kudos to:
* https:/daktak - the original creator of Pebble GitHub Actions
* First seen in [mattrossman/forecaswatch2#50](https:/mattrossman/forecaswatch2/pull/50)
* Everyone on the Rebble team for keeping Pebbles usable

* All the cool people with useful/viable/workable solutions and advice to:
* https:/actions/setup-python/issues/672
* https:/actions/runner-images/issues/7401
* https:/coatl-dev/docker-six - which I have not used but like having in my back pocket
* https:/MatteoH2O1999/setup-python - which I have not used but like having in my back pocket
24 changes: 19 additions & 5 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,24 @@ jobs:
# This workflow contains a single job called "build"
build:
# The type of runner that the job will run on
runs-on: ubuntu-18.04
runs-on: ubuntu-20.04

container:
# Pebble SDK needs Python 2.7
image: python:2.7.18-buster

# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Sanity checks for debugging, if/when problems occur
- name: pyver
run: python --version
- name: whichpy
run: which python
- name: whichpy2
run: which python2
- name: whichpy3
run: which python3

# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
# from https://levelup.gitconnected.com/how-to-manually-trigger-a-github-actions-workflow-4712542f1960
- name: Clone Repository (Latest)
Expand All @@ -48,11 +62,11 @@ jobs:
with:
ref: ${{ github.event.inputs.git-ref }}
- uses: actions/setup-node@v2
- uses: actions/setup-python@v2
with:
python-version: '2.7'
#- name: apt-getsudo
# run: apt-get update; apt-get -qq install -y sudo

- name: apt-get
run: sudo apt-get update; sudo apt-get -qq install -y wget python-pip python2.7-dev libsdl1.2debian libfdt1 libpixman-1-0 nodejs npm libfreetype6 libx11-6 rlwrap
run: apt-get update; apt-get -qq install -y wget python-pip python2.7-dev libsdl1.2debian libfdt1 libpixman-1-0 nodejs npm libfreetype6 libx11-6 rlwrap
- name: virtualenv
run: pip install virtualenv
- name: get sdk
Expand Down

0 comments on commit ef0cad6

Please sign in to comment.