simplify workflow file WIP #302
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
| name: Test eGSIM smtk library | |
| on: | |
| push: | |
| branches: [ main, master, dev ] | |
| pull_request: | |
| branches: [ main, master ] | |
| jobs: | |
| run-tests: | |
| strategy: | |
| matrix: | |
| config: | |
| - req-file: requirements-py311-linux64.txt | |
| os: ubuntu-latest | |
| python-version: "3.11" | |
| - req-file: requirements-py311-macos_arm64.txt | |
| os: macos-latest | |
| python-version: "3.11" | |
| # - req-file: requirements-py311-macos_x86_64.txt | |
| # os: macos-13 | |
| # python-version: "3.11" | |
| # | |
| # - req-file: requirements-py311-win64.txt | |
| # os: windows-latest | |
| # python-version: "3.11" | |
| - req-file: requirements-py312-linux64.txt | |
| os: ubuntu-latest | |
| python-version: "3.12" | |
| - req-file: requirements-py312-macos_arm64.txt | |
| os: macos-latest | |
| python-version: "3.12" | |
| # - req-file: requirements-py312-macos_x86_64.txt | |
| # os: macos-13 | |
| # python-version: "3.12" | |
| # | |
| # - req-file: requirements-py312-win64.txt | |
| # os: windows-latest | |
| # python-version: "3.12" | |
| # test latest python version ("3.x") for ubuntu and macos only: | |
| # - req-file: requirements-py312-linux64.txt | |
| # os: ubuntu-latest | |
| # python-version: "3.x" | |
| # | |
| # - req-file: requirements-py312-macos_arm64.txt | |
| # os: macos-latest | |
| # python-version: "3.x" | |
| runs-on: ${{ matrix.config.os }} | |
| continue-on-error: ${{ matrix.config.os == 'windows-latest' }} | |
| steps: | |
| # Checkout repository | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Install system packages | |
| if: matrix.config.os == 'ubuntu-latest' | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y \ | |
| build-essential \ | |
| gfortran \ | |
| libopenblas-dev \ | |
| liblapack-dev \ | |
| cmake \ | |
| pkg-config \ | |
| proj-bin \ | |
| proj-data \ | |
| libproj-dev | |
| - name: Set up Python ${{ matrix.config.python-version }} | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: ${{ matrix.config.python-version }} | |
| - name: Create virtualenv | |
| run: python -m venv venv | |
| - name: Install eGSIM smtk lib | |
| if: matrix.config.os != 'windows-latest' | |
| run: | | |
| source venv/bin/activate | |
| python -m pip install --upgrade pip setuptools wheel | |
| pip install -r "./${{ matrix.config.req-file }}" | |
| pip install . | |
| - name: Install eGSIM smtk lib (Windows) | |
| if: matrix.config.os == 'windows-latest' | |
| run: | | |
| venv\Scripts\activate | |
| python -m pip install --upgrade pip setuptools wheel | |
| python -m pip install -r "${{ matrix.config.req-file }}" | |
| python -m pip install . | |
| - name: Test eGSIM (smtk lib) | |
| run: | | |
| source venv/bin/activate | |
| pip install pytest | |
| pytest --ignore=./tests/tmp/ -xvvv ./tests/smtk | |