Merge pull request #346 from atilaneves/update #118
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: CI | |
| on: [push, pull_request] | |
| jobs: | |
| test: | |
| name: Run full tests | |
| strategy: | |
| matrix: | |
| os: | |
| - ubuntu-24.04 | |
| dc: | |
| - dmd-2.108.1 | |
| - dmd-2.101.2 | |
| - ldc-1.30.0 | |
| clang: | |
| - 12.0.0 | |
| - 17.0.6 | |
| python-version: | |
| - '3.12' | |
| - '3.11' | |
| - '3.10' | |
| runs-on: ${{ matrix.os }} | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Setup C++ | |
| uses: aminya/setup-cpp@v1 | |
| with: | |
| llvm: ${{ matrix.clang }} | |
| - name: Install D compiler | |
| # must go before setting LD_LIBRARY_PATH for Python since this overrides it | |
| uses: dlang-community/setup-dlang@v2 | |
| with: | |
| compiler: ${{ matrix.dc }} | |
| - name: Set up Python ${{ matrix.python-version }} | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| - name: Python env vars | |
| run: | | |
| echo "PYTHON_INCLUDE_DIR=${{ env.pythonLocation }}/include/python${{ matrix.python-version }}" >> $GITHUB_ENV | |
| echo "PYTHON_LIB_DIR=${{ env.pythonLocation }}/lib" >> $GITHUB_ENV | |
| echo "PYD_LIBPYTHON_DIR=${{ env.pythonLocation }}/lib" >> $GITHUB_ENV | |
| echo "LD_LIBRARY_PATH=$LD_LIBRARY_PATH:${{ env.pythonLocation }}/lib:${{ env.LLVM_PATH }}/lib" >> $GITHUB_ENV | |
| - name: Install Python dependencies | |
| run: | | |
| python -m pip install --upgrade pip | |
| pip install -r requirements.txt | |
| # - name: Install dotnet | |
| # run: | | |
| # wget -q https://packages.microsoft.com/config/ubuntu/20.04/packages-microsoft-prod.deb | |
| # sudo dpkg -i packages-microsoft-prod.deb | |
| # sudo apt-get install apt-transport-https | |
| # sudo apt-get update | |
| # sudo apt-get install dotnet-sdk-2.1 | |
| - name: Run tests | |
| shell: bash | |
| run: ci/test-all.sh | |
| env: | |
| PYD_LIBPYTHON: python${{ matrix.python-version }} | |
| LD_RUN_PATH: $PYTHON_LIB_DIR | |
| LIBRARY_PATH: ${{ env.LLVM_PATH }}/lib | |
| - uses: codecov/codecov-action@v5.1.2 | |
| test-non-pyd: | |
| name: Run non-pyd tests | |
| strategy: | |
| matrix: | |
| os: | |
| - ubuntu-24.04 | |
| dc: | |
| - dmd-2.112.0 | |
| - ldc-1.42.0 | |
| clang: | |
| - 12.0.0 | |
| - 17.0.6 | |
| python-version: | |
| - '3.12' | |
| - '3.11' | |
| - '3.10' | |
| runs-on: ${{ matrix.os }} | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Setup C++ | |
| uses: aminya/setup-cpp@v1 | |
| with: | |
| llvm: ${{ matrix.clang }} | |
| - name: Install D compiler | |
| # must go before setting LD_LIBRARY_PATH for Python since this overrides it | |
| uses: dlang-community/setup-dlang@v2 | |
| with: | |
| compiler: ${{ matrix.dc }} | |
| - name: Set up Python ${{ matrix.python-version }} | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| - name: Python env vars | |
| run: | | |
| echo "PYTHON_INCLUDE_DIR=${{ env.pythonLocation }}/include/python${{ matrix.python-version }}" >> $GITHUB_ENV | |
| echo "PYTHON_LIB_DIR=${{ env.pythonLocation }}/lib" >> $GITHUB_ENV | |
| echo "PYD_LIBPYTHON_DIR=${{ env.pythonLocation }}/lib" >> $GITHUB_ENV | |
| echo "LD_LIBRARY_PATH=$LD_LIBRARY_PATH:${{ env.pythonLocation }}/lib:${{ env.LLVM_PATH }}/lib" >> $GITHUB_ENV | |
| - name: Install Python dependencies | |
| run: | | |
| python -m pip install --upgrade pip | |
| pip install -r requirements.txt | |
| - name: Run non-pyd tests | |
| shell: bash | |
| run: bash ci/test-all-non-pyd.sh | |
| env: | |
| PYD_LIBPYTHON: python${{ matrix.python-version }} | |
| LD_RUN_PATH: $PYTHON_LIB_DIR | |
| LIBRARY_PATH: ${{ env.LLVM_PATH }}/lib |