From d11a4c9a81fa9ba5fd9ad81ca6e88a9a502553d1 Mon Sep 17 00:00:00 2001 From: messense Date: Sun, 28 Feb 2021 15:23:51 +0800 Subject: [PATCH] Verbose docker test --- .github/workflows/test-docker.yml | 4 +++- test-dockerfile.sh | 10 +++++----- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/.github/workflows/test-docker.yml b/.github/workflows/test-docker.yml index 75a90fb13..7d21c57a3 100644 --- a/.github/workflows/test-docker.yml +++ b/.github/workflows/test-docker.yml @@ -16,6 +16,8 @@ jobs: with: python-version: 3.8 - name: Build Docker container - run: docker build --cache-from konstin2/maturin -t maturin . + run: | + docker pull konstin2/maturin + docker build --cache-from konstin2/maturin -t maturin . - name: Test the Docker container run: ./test-dockerfile.sh diff --git a/test-dockerfile.sh b/test-dockerfile.sh index a92d0729b..77ec0558a 100755 --- a/test-dockerfile.sh +++ b/test-dockerfile.sh @@ -13,7 +13,7 @@ source venv-docker/bin/activate venv-docker/bin/pip install -U pip cffi -docker run --rm -v $(pwd)/test-crates/hello-world:/io maturin build --no-sdist -b bin +docker run -e RUST_BACKTRACE=1 --rm -v $(pwd)/test-crates/hello-world:/io maturin build --no-sdist -b bin venv-docker/bin/pip install hello-world --no-index --find-links test-crates/hello-world/target/wheels/ @@ -21,7 +21,7 @@ if [[ $(venv-docker/bin/python test-crates/hello-world/check_installed/check_ins exit 1 fi -docker run --rm -v $(pwd)/test-crates/cffi-pure:/io maturin build --no-sdist -b cffi +docker run -e RUST_BACKTRACE=1 --rm -v $(pwd)/test-crates/cffi-pure:/io maturin build --no-sdist -b cffi venv-docker/bin/pip install cffi-pure --no-index --find-links test-crates/cffi-pure/target/wheels/ @@ -29,7 +29,7 @@ if [[ $(venv-docker/bin/python test-crates/cffi-pure/check_installed/check_insta exit 1 fi -docker run --rm -v $(pwd)/test-crates/cffi-mixed:/io maturin build --no-sdist -b cffi +docker run -e RUST_BACKTRACE=1 --rm -v $(pwd)/test-crates/cffi-mixed:/io maturin build --no-sdist -b cffi venv-docker/bin/pip install cffi-mixed --no-index --find-links test-crates/cffi-mixed/target/wheels/ @@ -37,7 +37,7 @@ if [[ $(venv-docker/bin/python test-crates/cffi-mixed/check_installed/check_inst exit 1 fi -docker run --rm -v $(pwd)/test-crates/pyo3-pure:/io maturin build --no-sdist -i python3.8 +docker run -e RUST_BACKTRACE=1 --rm -v $(pwd)/test-crates/pyo3-pure:/io maturin build --no-sdist -i python3.8 venv-docker/bin/pip install pyo3-pure --no-index --find-links test-crates/pyo3-pure/target/wheels/ @@ -45,7 +45,7 @@ if [[ $(venv-docker/bin/python test-crates/pyo3-pure/check_installed/check_insta exit 1 fi -docker run --rm -v $(pwd)/test-crates/pyo3-mixed:/io maturin build --no-sdist -i python3.8 +docker run -e RUST_BACKTRACE=1 --rm -v $(pwd)/test-crates/pyo3-mixed:/io maturin build --no-sdist -i python3.8 venv-docker/bin/pip install pyo3-mixed --find-links test-crates/pyo3-mixed/target/wheels/