-
Notifications
You must be signed in to change notification settings - Fork 1
29 lines (27 loc) · 981 Bytes
/
test_setup_python.yml
File metadata and controls
29 lines (27 loc) · 981 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
# Adapted from: https://github.com/pubref/rules_protobuf/blob/master/.travis.yml
name: Test Setting up Python
on:
pull_request:
paths:
- 'setup_python.sh'
- '.github/workflows/test_setup_python.yml'
jobs:
set-up-python:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [macos-10.15, ubuntu-16.04, ubuntu-18.04, ubuntu-20.04]
steps:
- uses: actions/checkout@v2
- name: Set up Python 3.7.4.
# https://stackoverflow.com/questions/36774171/how-to-include-ssl-with-python-build-on-macos
run: |
OPTIONS=""
if [[ "${{ matrix.os }}" =~ "macos" ]]
then
OPTIONS="--with-openssl=$(brew --prefix openssl)"
fi
echo y | ./setup_python.sh 3.7.4 $HOME/.bazel_python $OPTIONS
[ "$($HOME/.bazel_python/3.7.4/bin/python3 --version)" = "Python 3.7.4" ]
$HOME/.bazel_python/3.7.4/bin/python3 -c "import ssl"
$HOME/.bazel_python/3.7.4/bin/python3 -c "import zlib"