Skip to content

Commit

Permalink
build: gitHub actions: Python 3.9 and actions/setup-python@v2
Browse files Browse the repository at this point in the history
PR-URL: nodejs#35521
Reviewed-By: Richard Lau <rlau@redhat.com>
Reviewed-By: Shelley Vohr <codebytere@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Jiawen Geng <technicalcute@gmail.com>
Reviewed-By: Myles Borins <myles.borins@gmail.com>
  • Loading branch information
cclauss authored and Trott committed Apr 16, 2021
1 parent d4519e6 commit ca73afb
Show file tree
Hide file tree
Showing 7 changed files with 39 additions and 23 deletions.
10 changes: 5 additions & 5 deletions .github/workflows/build-tarball.yml
Expand Up @@ -8,12 +8,12 @@ env:
jobs:
build-tarball:
env:
PYTHON_VERSION: 3.8
runs-on: macos-latest
PYTHON_VERSION: 3.9
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ env.PYTHON_VERSION }}
uses: actions/setup-python@v1
uses: actions/setup-python@v2
with:
python-version: ${{ env.PYTHON_VERSION }}
- name: Environment Information
Expand All @@ -33,13 +33,13 @@ jobs:
path: tarballs
test-tarball-linux:
env:
PYTHON_VERSION: 3.8
PYTHON_VERSION: 3.9
needs: build-tarball
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ env.PYTHON_VERSION }}
uses: actions/setup-python@v1
uses: actions/setup-python@v2
with:
python-version: ${{ env.PYTHON_VERSION }}
- name: Environment Information
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/build-windows.yml
Expand Up @@ -3,7 +3,7 @@ name: build-windows
on: [push, pull_request]

env:
PYTHON_VERSION: 3.8
PYTHON_VERSION: 3.9
FLAKY_TESTS: dontcare

jobs:
Expand All @@ -12,7 +12,7 @@ jobs:
steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ env.PYTHON_VERSION }}
uses: actions/setup-python@v1
uses: actions/setup-python@v2
with:
python-version: ${{ env.PYTHON_VERSION }}
- name: Install deps
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/linters.yml
Expand Up @@ -3,7 +3,7 @@ name: linters
on: [push, pull_request]

env:
PYTHON_VERSION: 3.8
PYTHON_VERSION: 3.9
NODE_VERSION: 10.x

jobs:
Expand All @@ -24,7 +24,7 @@ jobs:
steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ env.PYTHON_VERSION }}
uses: actions/setup-python@v1
uses: actions/setup-python@v2
with:
PYTHON_VERSION: ${{ env.PYTHON_VERSION }}
- name: Environment Information
Expand Down Expand Up @@ -62,7 +62,7 @@ jobs:
steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ env.PYTHON_VERSION }}
uses: actions/setup-python@v1
uses: actions/setup-python@v2
with:
PYTHON_VERSION: ${{ env.PYTHON_VERSION }}
- name: Environment Information
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/test-asan.yml
Expand Up @@ -3,7 +3,7 @@ name: test-asan
on: [push, pull_request]

env:
PYTHON_VERSION: 3.8
PYTHON_VERSION: 3.9
FLAKY_TESTS: dontcare

jobs:
Expand All @@ -17,7 +17,7 @@ jobs:
steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ env.PYTHON_VERSION }}
uses: actions/setup-python@v1
uses: actions/setup-python@v2
with:
python-version: ${{ env.PYTHON_VERSION }}
- name: Environment Information
Expand Down
21 changes: 18 additions & 3 deletions .github/workflows/test-linux.yml
Expand Up @@ -3,7 +3,7 @@ name: test-linux
on: [push, pull_request]

env:
PYTHON_VERSION: 3.8
PYTHON_VERSION: 3.9
FLAKY_TESTS: dontcare

jobs:
Expand All @@ -12,12 +12,27 @@ jobs:
steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ env.PYTHON_VERSION }}
uses: actions/setup-python@v1
uses: actions/setup-python@v2
with:
python-version: ${{ env.PYTHON_VERSION }}
- name: Environment Information
run: npx envinfo
- name: Build
run: make build-ci -j2 V=1
- name: Test
run: make run-ci -j2 V=1 TEST_CI_ARGS="-p dots"
run: make run-ci -j2 V=1 TEST_CI_ARGS="-p actions"

test-linux-with-quic:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ env.PYTHON_VERSION }}
uses: actions/setup-python@v2
with:
python-version: ${{ env.PYTHON_VERSION }}
- name: Environment Information
run: npx envinfo
- name: Build
run: make build-ci -j2 V=1 CONFIG_FLAGS="--error-on-warn --experimental-quic"
- name: Test
run: make run-ci -j2 V=1 TEST_CI_ARGS="-p actions"
4 changes: 2 additions & 2 deletions .github/workflows/test-macos.yml
Expand Up @@ -3,7 +3,7 @@ name: test-macOS
on: [push, pull_request]

env:
PYTHON_VERSION: 3.8
PYTHON_VERSION: 3.9
FLAKY_TESTS: dontcare

jobs:
Expand All @@ -12,7 +12,7 @@ jobs:
steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ env.PYTHON_VERSION }}
uses: actions/setup-python@v1
uses: actions/setup-python@v2
with:
python-version: ${{ env.PYTHON_VERSION }}
- name: Environment Information
Expand Down
13 changes: 7 additions & 6 deletions configure
Expand Up @@ -5,11 +5,12 @@
# as is the fact that the ] goes on a new line.
_=[ 'exec' '/bin/sh' '-c' '''
test ${FORCE_PYTHON2} && exec python2 "$0" "$@" # workaround for gclient
which python3.8 >/dev/null && exec python3.8 "$0" "$@"
which python3.7 >/dev/null && exec python3.7 "$0" "$@"
which python3.6 >/dev/null && exec python3.6 "$0" "$@"
which python3.5 >/dev/null && exec python3.5 "$0" "$@"
which python2.7 >/dev/null && exec python2.7 "$0" "$@"
command -v python3.9 >/dev/null && exec python3.9 "$0" "$@"
command -v python3.8 >/dev/null && exec python3.8 "$0" "$@"
command -v python3.7 >/dev/null && exec python3.7 "$0" "$@"
command -v python3.6 >/dev/null && exec python3.6 "$0" "$@"
command -v python3.5 >/dev/null && exec python3.5 "$0" "$@"
command -v python2.7 >/dev/null && exec python2.7 "$0" "$@"
exec python "$0" "$@"
''' "$0" "$@"
]
Expand All @@ -19,7 +20,7 @@ import sys
from distutils.spawn import find_executable

print('Node.js configure: Found Python {0}.{1}.{2}...'.format(*sys.version_info))
acceptable_pythons = ((3, 8), (3, 7), (3, 6), (3, 5), (2, 7))
acceptable_pythons = ((3, 9), (3, 8), (3, 7), (3, 6), (3, 5), (2, 7))
if sys.version_info[:2] in acceptable_pythons:
import configure
else:
Expand Down

0 comments on commit ca73afb

Please sign in to comment.