Skip to content

Commit

Permalink
github: add build for older Python versions like 3.6
Browse files Browse the repository at this point in the history
Unfortunatley, ubuntu-latest runners (now using 22.04) don't have
Python 3.6 builds available.
  • Loading branch information
connorimes committed Feb 7, 2024
1 parent 67fac29 commit 686a738
Showing 1 changed file with 31 additions and 0 deletions.
31 changes: 31 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,3 +40,34 @@ jobs:
python3 -m unittest -v
python3 examples/info.py
python3 examples/context.py
build-old-python:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-20.04, macos-latest]
python-version: [ '3.6' ]
name: ${{ matrix.os }} Python ${{ matrix.python-version }} Test
steps:
- uses: actions/checkout@v3
- name: Install EnergyMon library
# energymon dependency - use master branch
run: |
git clone https://github.com/energymon/energymon.git
cmake -DBUILD_SHARED_LIBS=ON -DENERGYMON_BUILD_DEFAULT=dummy -DENERGYMON_BUILD_LIB=NONE -DENERGYMON_BUILD_UTILITIES=OFF -DENERGYMON_BUILD_TESTS=OFF -DENERGYMON_BUILD_EXAMPLES=OFF -S energymon/ -B energymon/_build/
cmake --build energymon/_build/ -v
- name: Install Python
uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python-version }}
- name: Install Python dependencies and package
run: |
python3 -m pip install -U pip
python3 -m pip install . -v
- name: Run tests
run: |
if [ "$RUNNER_OS" = "Linux" ]; then export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$(pwd)/energymon/_build/dummy; fi
if [ "$RUNNER_OS" = "macOS" ]; then export DYLD_LIBRARY_PATH=$DYLD_LIBRARY_PATH:$(pwd)/energymon/_build/dummy; fi
python3 -m unittest -v
python3 examples/info.py
python3 examples/context.py

0 comments on commit 686a738

Please sign in to comment.