From: Trenton Holmes <797416+stumpylog@users.noreply.github.com> Date: Sat, 18 May 2024 01:41:51 +0000 (-0700) Subject: ci: updates action versions and add dependabot to check monthly for updates X-Git-Tag: pool-3.2.5~8 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=cf3cff1fd74ad854fb9f5f54af868888633315a1;p=thirdparty%2Fpsycopg.git ci: updates action versions and add dependabot to check monthly for updates --- diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 000000000..8aa828864 --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,18 @@ +# https://docs.github.com/en/code-security/supply-chain-security/keeping-your-dependencies-updated-automatically/configuration-options-for-dependency-updates#package-ecosystem + +version: 2 +updates: + + # Enable updates for GitHub Actions + - package-ecosystem: "github-actions" + target-branch: "master" + directory: "/" + schedule: + # Check for updates to GitHub Actions every month + interval: "monthly" + groups: + actions: + update-types: + - "major" + - "minor" + - "patch" diff --git a/.github/workflows/3rd-party-tests.yml b/.github/workflows/3rd-party-tests.yml index 26c9f270c..bb2ca6669 100644 --- a/.github/workflows/3rd-party-tests.yml +++ b/.github/workflows/3rd-party-tests.yml @@ -225,7 +225,7 @@ jobs: USE_TZ = False HERE - - uses: actions/cache@v3 + - uses: actions/cache@v4 with: path: ~/.cache/pip key: ${{ matrix.python-version }}-pip-${{ hashFiles('django_home/django/tests/requirements/py3.txt', 'django_home/django/setup.cfg') }} diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 1dd1e94c9..af58d44e9 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -15,7 +15,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Trigger docs build - uses: peter-evans/repository-dispatch@v1 + uses: peter-evans/repository-dispatch@v3 with: repository: psycopg/psycopg-website event-type: psycopg3-commit diff --git a/.github/workflows/packages-bin.yml b/.github/workflows/packages-bin.yml index ec5e1757a..46b6f88ee 100644 --- a/.github/workflows/packages-bin.yml +++ b/.github/workflows/packages-bin.yml @@ -27,14 +27,14 @@ jobs: - name: Set up QEMU for multi-arch build # Check https://github.com/docker/setup-qemu-action for newer versions. - uses: docker/setup-qemu-action@v2 + uses: docker/setup-qemu-action@v3 with: # Note: 6.2.0 is buggy: make sure to avoid it. # See https://github.com/pypa/cibuildwheel/issues/1250 image: tonistiigi/binfmt:qemu-v7.0.0 - name: Cache libpq build - uses: actions/cache@v3 + uses: actions/cache@v4 with: path: /tmp/libpq.build key: libpq-${{ matrix.platform }}-${{ matrix.arch }}-${{ env.LIBPQ_VERSION }}-${{ env.OPENSSL_VERSION }} @@ -43,7 +43,7 @@ jobs: run: python3 ./tools/build/copy_to_binary.py - name: Build wheels - uses: pypa/cibuildwheel@v2.16.5 + uses: pypa/cibuildwheel@v2.17.0 with: package-dir: psycopg_binary env: @@ -71,8 +71,9 @@ jobs: PSYCOPG_TEST_WANT_LIBPQ_BUILD=${{ env.LIBPQ_VERSION }} PSYCOPG_TEST_WANT_LIBPQ_IMPORT=${{ env.LIBPQ_VERSION }} - - uses: actions/upload-artifact@v3 + - uses: actions/upload-artifact@v4 with: + name: linux-${{matrix.pyver}}-${{matrix.platform}}_${{matrix.arch}} path: ./wheelhouse/*.whl services: @@ -92,8 +93,58 @@ jobs: # }}} - macos: # {{{ - runs-on: macos-latest + macos-14: # {{{ + runs-on: macos-14 + if: true + + strategy: + fail-fast: false + matrix: + arch: [arm64] + pyver: [cp310, cp311, cp312] + + env: + PG_VERSION: "16" + + steps: + - uses: actions/checkout@v4 + + - name: Create the binary package source tree + run: python3 ./tools/build/copy_to_binary.py + + - name: Install PostgreSQL on the runner + run: brew install gnu-sed postgresql@${PG_VERSION} + + - name: Start PostgreSQL service + run: brew services start postgresql@${PG_VERSION} + + - name: Build wheels + uses: pypa/cibuildwheel@v2.17.0 + with: + package-dir: psycopg_binary + env: + CIBW_BUILD: ${{matrix.pyver}}-macosx_${{matrix.arch}} + CIBW_ARCHS_MACOS: ${{matrix.arch}} + CIBW_TEST_REQUIRES: ./psycopg[test] ./psycopg_pool + CIBW_TEST_COMMAND: >- + pytest {project}/tests -m 'not slow and not flakey' --color yes + CIBW_ENVIRONMENT: >- + PSYCOPG_IMPL=binary + PSYCOPG_TEST_DSN='dbname=postgres' + PATH="/opt/homebrew/opt/postgresql@${PG_VERSION}/bin:$PATH" + PSYCOPG_TEST_WANT_LIBPQ_BUILD=">= ${PG_VERSION}" + PSYCOPG_TEST_WANT_LIBPQ_IMPORT=">= ${PG_VERSION}" + + - uses: actions/upload-artifact@v4 + with: + name: macos-14-${{matrix.pyver}}-macosx_${{matrix.arch}} + path: ./wheelhouse/*.whl + + + # }}} + + macos-12: # {{{ + runs-on: macos-12 if: true strategy: @@ -110,7 +161,7 @@ jobs: run: python3 ./tools/build/copy_to_binary.py - name: Build wheels - uses: pypa/cibuildwheel@v2.16.5 + uses: pypa/cibuildwheel@v2.17.0 with: package-dir: psycopg_binary env: @@ -128,8 +179,9 @@ jobs: PSYCOPG_TEST_WANT_LIBPQ_BUILD=">= $PG_VERSION" PSYCOPG_TEST_WANT_LIBPQ_IMPORT=">= $PG_VERSION" - - uses: actions/upload-artifact@v3 + - uses: actions/upload-artifact@v4 with: + name: macos-12-${{matrix.pyver}}-macosx_${{matrix.arch}} path: ./wheelhouse/*.whl @@ -159,7 +211,7 @@ jobs: run: python3 ./tools/build/copy_to_binary.py - name: Build wheels - uses: pypa/cibuildwheel@v2.16.5 + uses: pypa/cibuildwheel@v2.17.0 with: package-dir: psycopg_binary env: @@ -179,8 +231,9 @@ jobs: PSYCOPG_TEST_WANT_LIBPQ_BUILD=">= 14" PSYCOPG_TEST_WANT_LIBPQ_IMPORT=">= 14" - - uses: actions/upload-artifact@v3 + - uses: actions/upload-artifact@v4 with: + name: windows-${{matrix.pyver}}-${{matrix.arch}} path: ./wheelhouse/*.whl diff --git a/.github/workflows/packages-pool.yml b/.github/workflows/packages-pool.yml index db79ec133..7f41fb71a 100644 --- a/.github/workflows/packages-pool.yml +++ b/.github/workflows/packages-pool.yml @@ -39,8 +39,9 @@ jobs: PSYCOPG_TEST_DSN: "host=127.0.0.1 user=postgres" PGPASSWORD: password - - uses: actions/upload-artifact@v3 + - uses: actions/upload-artifact@v4 with: + name: ${{ matrix.package }}-${{ matrix.format }} path: ./dist/* services: diff --git a/.github/workflows/packages-src.yml b/.github/workflows/packages-src.yml index 6b4f911dd..0e2bd7d82 100644 --- a/.github/workflows/packages-src.yml +++ b/.github/workflows/packages-src.yml @@ -47,8 +47,9 @@ jobs: PSYCOPG_TEST_DSN: "host=127.0.0.1 user=postgres" PGPASSWORD: password - - uses: actions/upload-artifact@v3 + - uses: actions/upload-artifact@v4 with: + name: ${{ matrix.package }}-${{ matrix.format }}-${{ matrix.impl }} path: ./dist/* services: