name: Test qlib from source on: push: branches: [ main ] pull_request: branches: [ main ] jobs: build: timeout-minutes: 180 # we may retry for 3 times for `Unit tests with Pytest` runs-on: ${{ matrix.os }} strategy: matrix: os: [windows-latest, ubuntu-20.04, ubuntu-22.04, macos-11, macos-latest] # not supporting 3.6 due to annotations is not supported https://stackoverflow.com/a/52890129 python-version: [3.7, 3.8] steps: - name: Test qlib from source uses: actions/checkout@v3 # Since version 3.7 of python for MacOS is installed in CI, version 3.7.17, this version causes "_bz not found error". # So we make the version number of python 3.7 for MacOS more specific. # refs: https://github.com/actions/setup-python/issues/682 - name: Set up Python ${{ matrix.python-version }} if: (matrix.os == 'macos-latest' && matrix.python-version == '3.7') || (matrix.os == 'macos-11' && matrix.python-version == '3.7') uses: actions/setup-python@v4 with: python-version: "3.7.16" - name: Set up Python ${{ matrix.python-version }} if: (matrix.os != 'macos-latest' || matrix.python-version != '3.7') && (matrix.os != 'macos-11' || matrix.python-version != '3.7') uses: actions/setup-python@v4 with: python-version: ${{ matrix.python-version }} - name: Set up Python tools run: | python -m pip install --upgrade pip python -m pip install cython python -m pip install --upgrade pip python -m pip install numpy<1.24 python setup.py bdist_wheel python -c "from pathlib import Path; current_directory = Path.cwd(); dist_directory = current_directory / 'dist'; files = dist_directory.glob('*'); [print(file.name) for file in files]" python -c "import sysconfig; print(sysconfig.get_platform())"