From e2575d3febd4b1a343e0001cc6c22d43bce6b51b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Br=C3=A9nainn=20Woodsend?= Date: Mon, 1 Jan 2024 14:05:47 +0000 Subject: [PATCH] Update CI platforms --- .github/workflows/test-pgcc.yml | 4 ++++ .github/workflows/test.yml | 42 ++++++++------------------------- Dockerfile_manylinux | 7 +++--- tests/test_slugs.py | 1 + 4 files changed, 19 insertions(+), 35 deletions(-) diff --git a/.github/workflows/test-pgcc.yml b/.github/workflows/test-pgcc.yml index 44bdf7c..a91e8dd 100644 --- a/.github/workflows/test-pgcc.yml +++ b/.github/workflows/test-pgcc.yml @@ -14,6 +14,9 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 + - uses: actions/setup-python@v5 + with: + python-version: 3.x # The recommended way to install PGCC is just raw wget/paste - no package # managers. @@ -24,5 +27,6 @@ jobs: echo PATH=$PATH:/opt/nvidia/hpc_sdk/Linux_x86_64/21.9/compilers/bin/ >> $GITHUB_ENV working-directory: /opt/ + - run: pip install setuptools wheel - run: pip install -e .[test] - run: CC=pgcc ./test diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 0c977bb..c437b9a 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -16,51 +16,30 @@ jobs: strategy: matrix: os: [ubuntu-latest] - python-version: [3.9, 3.8, '3.10', 3.11] + python-version: [3.9, 3.8, '3.10', 3.11, 3.12] architecture: ['x64'] include: - - os: macos-10.15 + - os: macos-latest python-version: 3.11 architecture: 'x64' - - os: macos-11.0 + - os: windows-latest python-version: 3.11 architecture: 'x64' - - name: Windows - os: windows-latest - python-version: 3.11 - architecture: 'x64' - - name: Windows 32-bit - os: windows-latest + - os: windows-latest python-version: 3.11 architecture: 'x86' - fail-fast: false - runs-on: ${{ matrix.os }} steps: - - uses: actions/checkout@v4 - - - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v5 + - uses: actions/setup-python@v5 with: python-version: ${{ matrix.python-version }} architecture: ${{ matrix.architecture }} - - name: Cache pip cached wheels - uses: actions/cache@v3 - env: - cache-name: cache-node-modules - with: - path: pip-cache - key: restore-key - restore-keys: restore-key - - name: Install - run: | - pip install --cache-dir=pip-cache wheel - pip install --cache-dir=pip-cache psutil - pip install --cache-dir=pip-cache -e .[test] + - run: pip install wheel psutil setuptools + - run: pip install -e .[test] - name: Show gcc run: gcc -v @@ -89,7 +68,7 @@ jobs: - name: Test gcc macOS if: ${{ runner.os == 'macOS' }} env: - CC: gcc-9 + CC: gcc-13 MACOS_DEPLOYMENT_TARGET: '10.10' run: ./test @@ -123,9 +102,8 @@ jobs: - name: Show wheel suffix run: ls packaging/contains-slugs/dist/ - # Test running the whole test suite, compiling everything fat. Only the - # macOS 11 images have a new enough Xcode to do this. + # Test running the whole test suite, compiling everything fat. - run: ./test && ls packaging/contains-slugs/dist - if: ${{ matrix.os == 'macos-11.0' }} + if: runner.os == 'macOS' env: MACOS_ARCHITECTURE: universal2 diff --git a/Dockerfile_manylinux b/Dockerfile_manylinux index 642e9c3..bfb6c04 100644 --- a/Dockerfile_manylinux +++ b/Dockerfile_manylinux @@ -27,14 +27,15 @@ RUN pip install wheel # Install dependencies. Installing as many as possible before the ``COPY . /io`` # helps docker to cache them. # Otherwise this block could be replaced with just ``COPY . /io``. -COPY setup.py /io/setup.py +COPY pyproject.toml /io/pyproject.toml COPY README.rst /io/README.rst -COPY cslug/_version.py /io/cslug/_version.py # Set the repo's root as the cwd. WORKDIR /io # Install more dependencies. RUN pip install --prefer-binary -e .[test] -RUN pip install psutil +RUN pip install --prefer-binary psutil +# Work around new metapath nonsense +RUN ln -s /io/cslug /opt/python/cp39-cp39/lib/python3.9/site-packages/cslug # Copy across this repo. COPY . /io diff --git a/tests/test_slugs.py b/tests/test_slugs.py index 3e695bb..1a8fe10 100644 --- a/tests/test_slugs.py +++ b/tests/test_slugs.py @@ -499,6 +499,7 @@ def test_contradictory_flags(): # Specify no warnings to override the default of all warnings -Wall. self.flags.append("-w") + self.flags += ["-Wno-error=implicit-function-declaration"] with warnings.catch_warnings(): warnings.filterwarnings("error", category=exceptions.BuildWarning)