Skip to content
Snippets Groups Projects
Select Git revision
  • ac3d79c2a02d694aa390f02009c520e4adfdaedf
  • main default protected
  • 3.10
  • 3.11
  • revert-15688-bpo-38031-_io-FileIO-opener-crash
  • 3.8
  • 3.9
  • 3.7
  • enum-fix_auto
  • branch-v3.11.0
  • backport-c3648f4-3.11
  • gh-93963/remove-importlib-resources-abcs
  • refactor-wait_for
  • shared-testcase
  • v3.12.0a2
  • v3.12.0a1
  • v3.11.0
  • v3.8.15
  • v3.9.15
  • v3.10.8
  • v3.7.15
  • v3.11.0rc2
  • v3.8.14
  • v3.9.14
  • v3.7.14
  • v3.10.7
  • v3.11.0rc1
  • v3.10.6
  • v3.11.0b5
  • v3.11.0b4
  • v3.10.5
  • v3.11.0b3
  • v3.11.0b2
  • v3.9.13
34 results

build.yml

Blame
  • build.yml 9.06 KiB
    name: Tests
    
    # bpo-40548: "paths-ignore" is not used to skip documentation-only PRs, because
    # it prevents to mark a job as mandatory. A PR cannot be merged if a job is
    # mandatory but not scheduled because of "paths-ignore".
    on:
      push:
        branches:
        - master
        - 3.9
        - 3.8
        - 3.7
      pull_request:
        branches:
        - master
        - 3.9
        - 3.8
        - 3.7
    
    jobs:
      check_source:
        name: 'Check for source changes'
        runs-on: ubuntu-latest
        outputs:
          run_tests: ${{ steps.check.outputs.run_tests }}
          run_ssl_tests: ${{ steps.check.outputs.run_ssl_tests }}
        steps:
          - uses: actions/checkout@v3
          - name: Check for source changes
            id: check
            run: |
              if [ -z "$GITHUB_BASE_REF" ]; then
                echo '::set-output name=run_tests::true'
                echo '::set-output name=run_ssl_tests::true'
              else
                git fetch origin $GITHUB_BASE_REF --depth=1
                # git diff "origin/$GITHUB_BASE_REF..." (3 dots) may be more
                # reliable than git diff "origin/$GITHUB_BASE_REF.." (2 dots),
                # but it requires to download more commits (this job uses
                # "git fetch --depth=1").
                #
                # git diff "origin/$GITHUB_BASE_REF..." (3 dots) works with Git
                # 2.26, but Git 2.28 is stricter and fails with "no merge base".
                #
                # git diff "origin/$GITHUB_BASE_REF.." (2 dots) should be enough on
                # GitHub, since GitHub starts by merging origin/$GITHUB_BASE_REF
                # into the PR branch anyway.
                #
                # https://github.com/python/core-workflow/issues/373
                git diff --name-only origin/$GITHUB_BASE_REF.. | grep -qvE '(\.rst$|^Doc|^Misc)' && echo '::set-output name=run_tests::true' || true
                git diff --name-only origin/$GITHUB_BASE_REF.. | grep -qE '(ssl|hashlib|hmac|^.github)' && echo '::set-output name=run_ssl_tests::true' || true
              fi
    
      check_abi:
        name: 'Check if the ABI has changed'
        runs-on: ubuntu-20.04
        needs: check_source
        if: needs.check_source.outputs.run_tests == 'true'
        steps:
          - uses: actions/checkout@v2
          - uses: actions/setup-python@v2
          - name: Install Dependencies
            run: |
                sudo ./.github/workflows/posix-deps-apt.sh
                sudo apt-get install -yq abigail-tools
          - name: Build CPython
            env:
              CFLAGS: -g3 -O0
            run: |
              # Build Python with the libpython dynamic library