Skip to content

Commit

Permalink
handle OS-Specific Dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
Marvin committed Dec 19, 2024
1 parent 587b484 commit 8521937
Showing 1 changed file with 20 additions and 5 deletions.
25 changes: 20 additions & 5 deletions .github/workflows/tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ on:
- "**"

jobs:
run-unittests:
setup:
runs-on: ubuntu-latest
steps:
- name: 'Checkout repository'
Expand All @@ -25,6 +25,11 @@ jobs:
python -m pip install --upgrade pip setuptools
- name: 'Install dependencies'
run: python -m pip install -r requirements.txt

run-unittests:
needs: setup
runs-on: ubuntu-latest
steps:
- name: 'Run unit tests'
run: tox -e docs
- name: 'Test engine/basic_camera_model/main.py'
Expand All @@ -33,10 +38,12 @@ jobs:
run: python engine/extended_camera_model/main.py

smoke-tests-linux:
needs: setup
strategy:
fail-fast: false
matrix:
image: [ 'ubuntu:latest', 'ubuntu:20.04', 'ubuntu:22.04', 'debian:latest', 'archlinux:latest' ]
image: ['ubuntu:latest', 'ubuntu:20.04', 'ubuntu:22.04', 'debian:latest', 'archlinux:latest']
python_version: ['3.11', '3.12']
runs-on: ubuntu-latest
container:
image: ${{ matrix.image }}
Expand All @@ -55,10 +62,16 @@ jobs:
submodules: true
- name: 'Setup timezone'
run: ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
- name: 'Install OpenGL dependencies (Ubuntu/Debian)'
if: ${{ contains(matrix.image, 'ubuntu') || contains(matrix.image, 'debian') }}
run: sudo apt-get install -y libgl1-mesa-glx
- name: 'Install OpenGL dependencies (Arch)'
if: ${{ contains(matrix.image, 'archlinux') }}
run: sudo pacman -Syu --noconfirm libglvnd
- name: 'Setup Python'
uses: actions/setup-python@v4
with:
python-version: '3.11'
python-version: ${{ matrix.python_version }}
- name: Ensure pip is installed
run: python -m ensurepip --upgrade
- name: Upgrade pip and setuptools
Expand All @@ -74,10 +87,12 @@ jobs:
run: python engine/extended_camera_model/main.py

smoke-tests-macos:
needs: setup
strategy:
fail-fast: false
matrix:
macos_version: [ 'macos-latest', 'macos-13' ]
macos_version: ['macos-latest', 'macos-13']
python_version: ['3.11', '3.12']
runs-on: ${{ matrix.macos_version }}
steps:
- name: 'Checkout repository'
Expand All @@ -87,7 +102,7 @@ jobs:
- name: 'Setup Python'
uses: actions/setup-python@v4
with:
python-version: '3.11'
python-version: ${{ matrix.python_version }}
- name: Ensure pip is installed
run: python -m ensurepip --upgrade
- name: Upgrade pip and setuptools
Expand Down

0 comments on commit 8521937

Please sign in to comment.