Use python3.11 in CI to make sure toml is validated
This also fixes a regression from https://github.com/rust-lang/rust/pull/106085 which stopped testing that we support python2 in PR CI.
This commit is contained in:
parent
d808bc296d
commit
c7eccdaaee
4 changed files with 7 additions and 7 deletions
|
@ -91,8 +91,7 @@ class GenerateAndParseConfig(unittest.TestCase):
|
||||||
# Verify this is actually valid TOML.
|
# Verify this is actually valid TOML.
|
||||||
tomllib.loads(build.config_toml)
|
tomllib.loads(build.config_toml)
|
||||||
except ImportError:
|
except ImportError:
|
||||||
# too old a version of python
|
print("warning: skipping TOML validation, need at least python 3.11", file=sys.stderr)
|
||||||
pass
|
|
||||||
return build
|
return build
|
||||||
|
|
||||||
def test_no_args(self):
|
def test_no_args(self):
|
||||||
|
|
|
@ -1,6 +1,8 @@
|
||||||
FROM ubuntu:22.04
|
FROM ubuntu:22.04
|
||||||
|
|
||||||
ARG DEBIAN_FRONTEND=noninteractive
|
ARG DEBIAN_FRONTEND=noninteractive
|
||||||
|
# NOTE: intentionally uses python2 for x.py so we can test it still works.
|
||||||
|
# validate-toolstate only runs in our CI, so it's ok for it to only support python3.
|
||||||
RUN apt-get update && apt-get install -y --no-install-recommends \
|
RUN apt-get update && apt-get install -y --no-install-recommends \
|
||||||
g++ \
|
g++ \
|
||||||
make \
|
make \
|
||||||
|
@ -8,6 +10,7 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
|
||||||
file \
|
file \
|
||||||
curl \
|
curl \
|
||||||
ca-certificates \
|
ca-certificates \
|
||||||
|
python2.7 \
|
||||||
python3 \
|
python3 \
|
||||||
python3-pip \
|
python3-pip \
|
||||||
python3-pkg-resources \
|
python3-pkg-resources \
|
||||||
|
@ -30,4 +33,4 @@ RUN pip3 install --no-deps --no-cache-dir --require-hashes -r /tmp/reuse-require
|
||||||
COPY host-x86_64/mingw-check/validate-toolstate.sh /scripts/
|
COPY host-x86_64/mingw-check/validate-toolstate.sh /scripts/
|
||||||
COPY host-x86_64/mingw-check/validate-error-codes.sh /scripts/
|
COPY host-x86_64/mingw-check/validate-error-codes.sh /scripts/
|
||||||
|
|
||||||
ENV SCRIPT python3 ../x.py test --stage 0 src/tools/tidy tidyselftest
|
ENV SCRIPT python2.7 ../x.py test --stage 0 src/tools/tidy tidyselftest
|
||||||
|
|
|
@ -2,7 +2,6 @@ FROM ubuntu:22.04
|
||||||
|
|
||||||
ARG DEBIAN_FRONTEND=noninteractive
|
ARG DEBIAN_FRONTEND=noninteractive
|
||||||
|
|
||||||
# NOTE: intentionally installs both python2 and python3 so we can test support for both.
|
|
||||||
RUN apt-get update && apt-get install -y --no-install-recommends \
|
RUN apt-get update && apt-get install -y --no-install-recommends \
|
||||||
g++ \
|
g++ \
|
||||||
gcc-multilib \
|
gcc-multilib \
|
||||||
|
@ -11,8 +10,7 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
|
||||||
file \
|
file \
|
||||||
curl \
|
curl \
|
||||||
ca-certificates \
|
ca-certificates \
|
||||||
python2.7 \
|
python3.11 \
|
||||||
python3 \
|
|
||||||
git \
|
git \
|
||||||
cmake \
|
cmake \
|
||||||
sudo \
|
sudo \
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue