diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index d1646bbc2..9109676b2 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -220,10 +220,10 @@ jobs: # https://github.com/pypa/manylinux - name: Download manylinux docker image if: startsWith(matrix.os, 'ubuntu-') - shell: bash -le {0} + shell: bash run: | # Update py-build-wheels-linux.sh if the image name is updated - docker pull quay.io/pypa/manylinux2014_x86_64 + docker pull quay.io/pypa/manylinux2010_x86_64 - name: Use manylinux docker image to build Linux wheels if: startsWith(matrix.os, 'ubuntu-') @@ -241,7 +241,7 @@ jobs: ######################################################################### - uses: actions/setup-python@v2 - if: "!startsWith(matrix.os, 'macos-')" + if: startsWith(matrix.os, 'windows-') with: python-version: 3.6 - uses: conda-incubator/setup-miniconda@v2 @@ -256,7 +256,7 @@ jobs: bash build/ci-py-build-wheels.sh - uses: actions/setup-python@v2 - if: "!startsWith(matrix.os, 'macos-')" + if: startsWith(matrix.os, 'windows-') with: python-version: 3.7 - uses: conda-incubator/setup-miniconda@v2 @@ -271,7 +271,7 @@ jobs: bash build/ci-py-build-wheels.sh - uses: actions/setup-python@v2 - if: "!startsWith(matrix.os, 'macos-')" + if: startsWith(matrix.os, 'windows-') with: python-version: 3.8 - uses: conda-incubator/setup-miniconda@v2 @@ -286,7 +286,7 @@ jobs: bash build/ci-py-build-wheels.sh - uses: actions/setup-python@v2 - if: "!startsWith(matrix.os, 'macos-')" + if: startsWith(matrix.os, 'windows-') with: python-version: 3.9 - uses: conda-incubator/setup-miniconda@v2 @@ -417,9 +417,9 @@ jobs: supported_py_versions=(36 37 38 39) for py_ver in ${supported_py_versions[@]}; do - mv "/tmp/py-dist-tmp/"iced_x86-*-cp${py_ver}-cp${py_ver}*.whl /tmp/py-dist + mv /tmp/py-dist-tmp/iced_x86-*-cp${py_ver}-cp${py_ver}*.whl /tmp/py-dist done - mv "/tmp/py-dist-tmp/iced-x86-"*.tar.gz /tmp/py-dist + mv /tmp/py-dist-tmp/iced-x86-*.tar.gz /tmp/py-dist for file in /tmp/py-dist-tmp/*; do if [ -f "$file" ]; then @@ -431,8 +431,9 @@ jobs: done rmdir /tmp/py-dist-tmp - # 4 (supported platforms) * 4 (supported Python versions) + 1 (source code tar.gz file) - if [ $(ls -A /tmp/py-dist | wc -l) -ne 17 ]; then + # (4+1) (supported platforms) * 4 (supported Python versions) + 1 (source code tar.gz file) + # (^+1 == manylinux build creates manylinux1 + manylinux2010 files) + if [ $(ls -A /tmp/py-dist | wc -l) -ne 21 ]; then ls -l /tmp/py-dist echo "Found too many/few Python whl files (see above)" exit 1 diff --git a/build/py-build-wheels-linux.sh b/build/py-build-wheels-linux.sh index 15e474d70..f654a96b0 100755 --- a/build/py-build-wheels-linux.sh +++ b/build/py-build-wheels-linux.sh @@ -9,13 +9,13 @@ if [ ! -f "$root_dir/LICENSE.txt" ]; then fi container_name=iced-py-wheel -manylinux_image=quay.io/pypa/manylinux2014_x86_64 +manylinux_image=quay.io/pypa/manylinux2010_x86_64 mkdir -p /tmp/py-dist -docker run --rm -itd --name $container_name $manylinux_image -docker cp "$root_dir/src/rust" $container_name:/tmp/iced-build -docker exec -w /tmp/iced-build/iced-x86-py $container_name bash build-wheels.sh -docker cp $container_name:/tmp/iced-build/iced-x86-py/dist /tmp/py-dist +docker run --rm -itd --name "$container_name" "$manylinux_image" +docker cp "$root_dir/src/rust" "$container_name:/tmp/iced-build" +docker exec -w /tmp/iced-build/iced-x86-py "$container_name" bash build-wheels.sh +docker cp "$container_name:/tmp/iced-build/iced-x86-py/dist" /tmp/py-dist mv /tmp/py-dist/dist/* /tmp/py-dist rmdir /tmp/py-dist/dist -docker kill $container_name +docker kill "$container_name" diff --git a/src/rust/iced-x86-py/build-wheels.sh b/src/rust/iced-x86-py/build-wheels.sh index c85335996..3f54b666a 100755 --- a/src/rust/iced-x86-py/build-wheels.sh +++ b/src/rust/iced-x86-py/build-wheels.sh @@ -1,7 +1,7 @@ #!/bin/bash set -e -curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --profile=minimal +curl https://sh.rustup.rs | sh -s -- -y --profile=minimal export PATH="$HOME/.cargo/bin:$PATH" # See .github/workflows/build.yml on how to add/remove Python verions