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, macos-11] # 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@v2 # 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-11' && matrix.python-version == '3.7' uses: actions/setup-python@v2 with: python-version: "3.7.16" - name: Set up Python ${{ matrix.python-version }} if: matrix.os == 'macos-11' && matrix.python-version == '3.8' uses: actions/setup-python@v2 with: python-version: "3.8.16" - name: Set up Python ${{ matrix.python-version }} if: matrix.os != 'macos-11' uses: actions/setup-python@v2 with: python-version: ${{ matrix.python-version }} - name: Install dependencies run: | python -m pip install --upgrade pip pip install setuptools wheel twine - name: Build wheel on ${{ matrix.os }} run: | python -m pip install "numpy<1.24.0" python -m pip install cython==0.29.36 python -m pip install setuptools wheel 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())"