From abb11e6ba07ed190e58c1944e7dff661d240a554 Mon Sep 17 00:00:00 2001 From: Ruben Vorderman Date: Sat, 7 Oct 2023 17:46:10 +0200 Subject: [PATCH 1/6] Publish wheels again but with working images --- .github/workflows/ci.yml | 295 ++++++++++++++++++++------------------- 1 file changed, 149 insertions(+), 146 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 338a177c..76a08d11 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -13,156 +13,156 @@ on: - "*" jobs: - lint: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2.3.4 - with: - submodules: recursive - - name: Set up Python 3.8 - uses: actions/setup-python@v2.2.1 - with: - python-version: 3.8 - - name: Install tox - run: pip install tox - - name: Lint - run: tox -e lint - - package-checks: - strategy: - matrix: - tox_env: - - docs - - twine_check - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2.3.4 - with: - submodules: recursive - - name: Set up Python 3.8 - uses: actions/setup-python@v2.2.1 - with: - python-version: 3.8 - - name: Install isal - run: sudo apt-get install libisal-dev - - name: Install tox and upgrade setuptools and pip - run: pip install --upgrade tox setuptools pip - - name: Run tox -e ${{ matrix.tox_env }} - run: tox -e ${{ matrix.tox_env }} - env: - PYTHON_ISAL_LINK_DYNAMIC: True - - test-static: - runs-on: ${{ matrix.os }} - strategy: - matrix: - python-version: - - "3.8" - - "3.9" - - "3.10" - - "3.11" - - "3.12" - - "pypy-3.9" - - "pypy-3.10" - os: ["ubuntu-latest"] - include: - - os: "macos-latest" - python-version: 3.8 - - os: "windows-latest" - python-version: 3.8 - steps: - - uses: actions/checkout@v2.3.4 - with: - submodules: recursive - - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v2.2.1 - with: - python-version: ${{ matrix.python-version }} - - name: Install tox and upgrade setuptools - run: pip install --upgrade tox setuptools - - name: Install build dependencies (Linux) # Yasm in pypa/manylinux images. - run: sudo apt install nasm - if: runner.os == 'Linux' - - name: Install build dependencies (Macos) - # Install yasm because nasm does not work when building wheels. - # Probably because of nasm-filter.sh not filtering all flags that can not be used. - run: brew install nasm - if: runner.os == 'macOS' - - name: Set MSVC developer prompt - uses: ilammy/msvc-dev-cmd@v1.6.0 - if: runner.os == 'Windows' - - name: Install nasm (Windows) - uses: ilammy/setup-nasm@v1.2.0 - if: runner.os == 'Windows' - - name: Run tests - run: tox - - name: Upload coverage report - uses: codecov/codecov-action@v1 - - test-arch: - if: startsWith(github.ref, 'refs/tags') || github.ref == 'refs/heads/develop' || github.ref == 'refs/heads/main' - runs-on: "ubuntu-latest" - strategy: - matrix: - python_version: - - "3.8" - steps: - - uses: actions/checkout@v2.3.4 - with: - submodules: recursive - - uses: uraimo/run-on-arch-action@v2.5.0 - name: Build & run test - with: - arch: none - distro: none - base_image: "--platform=linux/arm64 quay.io/pypa/manylinux2014_aarch64" - run: |- - CFLAGS="-DNDEBUG -g0" python${{matrix.python_version}} -m pip install . pytest - python${{matrix.python_version}} -m pytest tests - - # Test if the python-isal conda package can be build. Which is linked - # dynamically to the conda isa-l package. - test-dynamic: - runs-on: ${{ matrix.os }} - defaults: - run: - # This is needed for miniconda, see: - # https://github.com/marketplace/actions/setup-miniconda#important. - shell: bash -l {0} - strategy: - matrix: - os: ["ubuntu-latest", "macos-latest", "windows-latest"] - python_version: [ "python" ] - include: - - os: "ubuntu-latest" - python_version: "pypy" - steps: - - uses: actions/checkout@v2.3.4 - with: - submodules: recursive - - name: Install miniconda. - uses: conda-incubator/setup-miniconda@v2.0.1 # https://github.com/conda-incubator/setup-miniconda. - with: - channels: conda-forge,defaults - - name: Install requirements (universal) - run: conda install isa-l ${{ matrix.python_version}} tox - - name: Set MSVC developer prompt - uses: ilammy/msvc-dev-cmd@v1.6.0 - if: runner.os == 'Windows' - - name: Run tests (dynamic link) - run: tox - env: - PYTHON_ISAL_LINK_DYNAMIC: True +# lint: +# runs-on: ubuntu-latest +# steps: +# - uses: actions/checkout@v2.3.4 +# with: +# submodules: recursive +# - name: Set up Python 3.8 +# uses: actions/setup-python@v2.2.1 +# with: +# python-version: 3.8 +# - name: Install tox +# run: pip install tox +# - name: Lint +# run: tox -e lint +# +# package-checks: +# strategy: +# matrix: +# tox_env: +# - docs +# - twine_check +# runs-on: ubuntu-latest +# steps: +# - uses: actions/checkout@v2.3.4 +# with: +# submodules: recursive +# - name: Set up Python 3.8 +# uses: actions/setup-python@v2.2.1 +# with: +# python-version: 3.8 +# - name: Install isal +# run: sudo apt-get install libisal-dev +# - name: Install tox and upgrade setuptools and pip +# run: pip install --upgrade tox setuptools pip +# - name: Run tox -e ${{ matrix.tox_env }} +# run: tox -e ${{ matrix.tox_env }} +# env: +# PYTHON_ISAL_LINK_DYNAMIC: True +# +# test-static: +# runs-on: ${{ matrix.os }} +# strategy: +# matrix: +# python-version: +# - "3.8" +# - "3.9" +# - "3.10" +# - "3.11" +# - "3.12" +# - "pypy-3.9" +# - "pypy-3.10" +# os: ["ubuntu-latest"] +# include: +# - os: "macos-latest" +# python-version: 3.8 +# - os: "windows-latest" +# python-version: 3.8 +# steps: +# - uses: actions/checkout@v2.3.4 +# with: +# submodules: recursive +# - name: Set up Python ${{ matrix.python-version }} +# uses: actions/setup-python@v2.2.1 +# with: +# python-version: ${{ matrix.python-version }} +# - name: Install tox and upgrade setuptools +# run: pip install --upgrade tox setuptools +# - name: Install build dependencies (Linux) # Yasm in pypa/manylinux images. +# run: sudo apt install nasm +# if: runner.os == 'Linux' +# - name: Install build dependencies (Macos) +# # Install yasm because nasm does not work when building wheels. +# # Probably because of nasm-filter.sh not filtering all flags that can not be used. +# run: brew install nasm +# if: runner.os == 'macOS' +# - name: Set MSVC developer prompt +# uses: ilammy/msvc-dev-cmd@v1.6.0 +# if: runner.os == 'Windows' +# - name: Install nasm (Windows) +# uses: ilammy/setup-nasm@v1.2.0 +# if: runner.os == 'Windows' +# - name: Run tests +# run: tox +# - name: Upload coverage report +# uses: codecov/codecov-action@v1 +# +# test-arch: +# if: startsWith(github.ref, 'refs/tags') || github.ref == 'refs/heads/develop' || github.ref == 'refs/heads/main' +# runs-on: "ubuntu-latest" +# strategy: +# matrix: +# python_version: +# - "3.8" +# steps: +# - uses: actions/checkout@v2.3.4 +# with: +# submodules: recursive +# - uses: uraimo/run-on-arch-action@v2.5.0 +# name: Build & run test +# with: +# arch: none +# distro: none +# base_image: "--platform=linux/arm64 quay.io/pypa/manylinux2014_aarch64" +# run: |- +# CFLAGS="-DNDEBUG -g0" python${{matrix.python_version}} -m pip install . pytest +# python${{matrix.python_version}} -m pytest tests +# +# # Test if the python-isal conda package can be build. Which is linked +# # dynamically to the conda isa-l package. +# test-dynamic: +# runs-on: ${{ matrix.os }} +# defaults: +# run: +# # This is needed for miniconda, see: +# # https://github.com/marketplace/actions/setup-miniconda#important. +# shell: bash -l {0} +# strategy: +# matrix: +# os: ["ubuntu-latest", "macos-latest", "windows-latest"] +# python_version: [ "python" ] +# include: +# - os: "ubuntu-latest" +# python_version: "pypy" +# steps: +# - uses: actions/checkout@v2.3.4 +# with: +# submodules: recursive +# - name: Install miniconda. +# uses: conda-incubator/setup-miniconda@v2.0.1 # https://github.com/conda-incubator/setup-miniconda. +# with: +# channels: conda-forge,defaults +# - name: Install requirements (universal) +# run: conda install isa-l ${{ matrix.python_version}} tox +# - name: Set MSVC developer prompt +# uses: ilammy/msvc-dev-cmd@v1.6.0 +# if: runner.os == 'Windows' +# - name: Run tests (dynamic link) +# run: tox +# env: +# PYTHON_ISAL_LINK_DYNAMIC: True deploy: if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags') runs-on: ${{ matrix.os }} - needs: - - lint - - package-checks - - test-static - - test-dynamic - - test-arch +# needs: +# - lint +# - package-checks +# - test-static +# - test-dynamic +# - test-arch strategy: matrix: os: @@ -216,6 +216,9 @@ jobs: CIBW_TEST_REQUIRES: "pytest" # Simple tests that requires the project to be build correctly # Skip extensive compatibility testing which is slow. + CIBW_MANYLINUX_AARCH64_IMAGE: "quay.io/pypa/manylinux2014_aarch64:2023-09-17-ae90a16" + CIBW_MUSLLINUX_AARCH64_IMAGE: "quay.io/pypa/musllinux_1_1_aarch64:2023-09-17-ae90a16" + CIBW_TEST_COMMAND_LINUX: >- pytest -v {project}/tests/test_igzip.py {project}/tests/test_gzip_compliance.py From baf412f49ac264d8cd116fbb0e148d6989120e33 Mon Sep 17 00:00:00 2001 From: Ruben Vorderman Date: Sat, 7 Oct 2023 17:48:07 +0200 Subject: [PATCH 2/6] Make sure deploy is not skipped --- .github/workflows/ci.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 76a08d11..80eb2fbf 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -155,7 +155,6 @@ jobs: # PYTHON_ISAL_LINK_DYNAMIC: True deploy: - if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags') runs-on: ${{ matrix.os }} # needs: # - lint From 06034af0ed677057680065ea9dd3f4cc312b9c49 Mon Sep 17 00:00:00 2001 From: Ruben Vorderman Date: Sat, 7 Oct 2023 19:14:39 +0200 Subject: [PATCH 3/6] Publish packages --- .github/workflows/ci.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 80eb2fbf..03d37ab5 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -265,7 +265,6 @@ jobs: TWINE_USERNAME: __token__ TWINE_PASSWORD: ${{ secrets.TEST_PYPI_API_TOKEN }} - name: Publish package to PyPI - if: "!contains(github.ref, '-') && startsWith(github.ref, 'refs/tags')" run: twine upload dist/* env: TWINE_USERNAME: __token__ From d6fa29fe1bd9077d85333855a6452c3b01304960 Mon Sep 17 00:00:00 2001 From: Ruben Vorderman Date: Sat, 7 Oct 2023 20:20:00 +0200 Subject: [PATCH 4/6] Trigger CI From 553ca75e4ef4edef65754887f2d98c125080687a Mon Sep 17 00:00:00 2001 From: Ruben Vorderman Date: Fri, 13 Oct 2023 10:55:50 +0200 Subject: [PATCH 5/6] Skip existing packages --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 03d37ab5..cc504141 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -265,7 +265,7 @@ jobs: TWINE_USERNAME: __token__ TWINE_PASSWORD: ${{ secrets.TEST_PYPI_API_TOKEN }} - name: Publish package to PyPI - run: twine upload dist/* + run: twine upload --skip-existing dist/* env: TWINE_USERNAME: __token__ TWINE_PASSWORD: ${{ secrets.PYPI_API_TOKEN }} From c296ecec93375e0a02a2cf8774ed02f7223757c6 Mon Sep 17 00:00:00 2001 From: Ruben Vorderman Date: Fri, 3 Nov 2023 17:07:02 +0100 Subject: [PATCH 6/6] Release x86 platforms only --- .github/workflows/ci.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index cc504141..9347cf96 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -179,10 +179,10 @@ jobs: make nasm && install -c nasm /usr/bin/nasm build_sdist: [true] - include: - - os: "ubuntu-latest" - cibw_archs_linux: "aarch64" - cibw_before_all_linux: "true" # The true command exits with 0 +# include: +# - os: "ubuntu-latest" +# cibw_archs_linux: "aarch64" +# cibw_before_all_linux: "true" # The true command exits with 0 steps: - uses: actions/checkout@v2.3.4 with: