[ Web Proxy ]
URL:
Viewing: https://raw.githubusercontent.com/sdpython/pythonnet/master/.circleci/config.yml [Back]  [Original]

version: 2
jobs:
  build:
    docker:
      - image: circleci/python:3.9.1
    
    working_directory: ~/repo
    
    steps:
      - checkout

      - restore_cache:
          keys:
          - v3-dependencies-{{ checksum "requirements.txt" }}
          - v3-dependencies-

      - run:
          name: install apt-transport-https
          command: |
            sudo apt-get update
            sudo apt-get install apt-transport-https

      - run:
          name: install dotnet
          command: |
            # see https://dotnet.microsoft.com/download/linux-package-manager/debian9/sdk-current
            wget -qO- https://packages.microsoft.com/keys/microsoft.asc | gpg --dearmor > microsoft.asc.gpg
            sudo mv microsoft.asc.gpg /etc/apt/trusted.gpg.d/
            wget -q https://packages.microsoft.com/config/debian/9/prod.list
            sudo mv prod.list /etc/apt/sources.list.d/microsoft-prod.list
            sudo chown root:root /etc/apt/trusted.gpg.d/microsoft.asc.gpg
            sudo chown root:root /etc/apt/sources.list.d/microsoft-prod.list
            sudo apt-get update 
            sudo apt-get install dotnet-sdk-5.0
            sudo apt-get install aspnetcore-runtime-5.0
            sudo apt-get install dotnet-runtime-5.0

      - run:
          name: dotnet info
          command: |
                    dotnet --info
                    
      - run:
          name: Install 7z, unrar
          command: |
                    sudo apt-get install -y p7zip-full

      - run:
          name: install dependencies
          command: |
            python3 -m venv venv
            . venv/bin/activate
            python3 -m pip install -r requirements.txt

      - save_cache:
          paths:
            - ./venv
          key: v3-dependencies-{{ checksum "requirements.txt" }}
        
      - run:
          name: build pythonnet
          command: |
            . venv/bin/activate
            export DOTNET_CLI_TELEMETRY_OPTOUT=1
            python3 setup.py build_dotnet
            python3 setup.py bdist_wheel
            python3 setup.py develop

      - run:
          name: check installation
          command: |
            python3 -m venv venv
            . venv/bin/activate
            python -c "import clr"

      - run:
          name: unittests
          command: |
            python3 -m venv venv
            . venv/bin/activate
            pytest
            dotnet test src/embed_tests/

      - run:
          name: wheel
          command: |
            . venv/bin/activate
            export DOTNET_CLI_TELEMETRY_OPTOUT=1
            python3 setup.py bdist_wheel
            mkdir -p test-reports/dist
            cp dist/*.whl test-reports/dist

      - store_artifacts:
          path: test-reports
          destination: test-reports

Web Proxy Viewer  |  New URL  |  Original Page