Skip to content

Commit ba8875a

Browse files
authored
chore: add update OpenSSL workflow (#526)
1 parent 49c4608 commit ba8875a

File tree

2 files changed

+33
-14
lines changed

2 files changed

+33
-14
lines changed

.github/workflows/update-cmake.yml renamed to .github/workflows/update-dependencies.yml

+23-14
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,38 @@
1-
name: Update CMake
1+
name: Update Dependencies
22

33
on:
44
pull_request:
55
paths:
6-
- '.github/workflows/update-cmake.yml'
6+
- '.github/workflows/update-dependencies.yml'
77
- 'scripts/update_cmake_version.py'
8+
- 'scripts/update_openssl_version.py'
89
- 'noxfile.py'
910
workflow_dispatch:
1011
schedule:
1112
- cron: '0 6 * * *' # "At 06:00 every day."
1213

1314
jobs:
14-
update-cmake:
15-
name: Update CMake
15+
update-dep:
16+
name: Update ${{ matrix.dependency_nice }}
1617
if: github.repository_owner == 'scikit-build' || github.event_name != 'schedule'
1718
runs-on: ubuntu-latest
19+
strategy:
20+
fail-fast: false
21+
matrix:
22+
include:
23+
- dependency: "cmake"
24+
dependency_nice: "CMake"
25+
- dependency: "openssl"
26+
dependency_nice: "OpenSSL"
1827
steps:
1928
- uses: actions/checkout@v4
2029
- uses: wntrblm/[email protected]
21-
- name: "Run update: bump CMake"
22-
id: bump-cmake
30+
- name: "Run update: bump ${{ matrix.dependency_nice }}"
31+
id: bump
2332
run: |
24-
nox --force-color -s bump
25-
echo "version=$(nox -s cmake_version 2>/dev/null)" >> $GITHUB_OUTPUT
26-
- run: echo "CMake version is ${{ steps.bump-cmake.outputs.version }}"
33+
nox --force-color -s bump${{ matrix.dependency != 'cmake' && format('-{0}', matrix.dependency) || '' }}
34+
echo "version=$(nox -s ${{ matrix.dependency }}_version 2>/dev/null)" >> $GITHUB_OUTPUT
35+
- run: echo "${{ matrix.dependency_nice }} version is ${{ steps.bump.outputs.version }}"
2736

2837
# we use this step to grab a Github App auth token, so that PRs generated by this workflow
2938
# run the GHA tests.
@@ -38,13 +47,13 @@ jobs:
3847
if: github.ref == 'refs/heads/main' && github.repository == 'scikit-build/cmake-python-distributions'
3948
uses: peter-evans/create-pull-request@v6
4049
with:
41-
commit-message: '[Bot] Update to CMake ${{ steps.bump-cmake.outputs.version }}'
42-
title: '[Bot] Update to CMake ${{ steps.bump-cmake.outputs.version }}'
50+
commit-message: '[Bot] Update to ${{ matrix.dependency_nice }} ${{ steps.bump.outputs.version }}'
51+
title: '[Bot] Update to ${{ matrix.dependency_nice }} ${{ steps.bump.outputs.version }}'
4352
body: |
44-
Created by update_cmake_version.py
53+
Created by update_${{ matrix.dependency }}_version.py
4554
46-
PR generated by "Update CMake" [workflow](https://github.com/${{github.repository}}/actions/runs/${{github.run_id}}).
47-
branch: update-cmake-pr
55+
PR generated by "Update ${{ matrix.dependency_nice }}" [workflow](https://github.com/${{github.repository}}/actions/runs/${{github.run_id}}).
56+
branch: update-${{ matrix.dependency }}-pr
4857
committer: "scikit-build-app-bot[bot] <173546081+scikit-build-app-bot[bot]@users.noreply.github.com>"
4958
author: "scikit-build-app-bot[bot] <173546081+scikit-build-app-bot[bot]@users.noreply.github.com>"
5059
token: ${{ steps.app-token.outputs.token }}

noxfile.py

+10
Original file line numberDiff line numberDiff line change
@@ -182,3 +182,13 @@ def cmake_version(session: nox.Session) -> None: # noqa: ARG001
182182

183183
current_version = _get_version()
184184
print(".".join(current_version.split(".")[:3]))
185+
186+
187+
@nox.session(venv_backend="none")
188+
def openssl_version(session: nox.Session) -> None: # noqa: ARG001
189+
"""
190+
Print upstream OpenSSL version.
191+
"""
192+
txt = Path("scripts/manylinux-build-and-install-openssl.sh").read_text()
193+
current_version = next(iter(re.finditer(r'^OPENSSL_ROOT=openssl-([\d\.]+)$', txt, flags=re.MULTILINE))).group(1)
194+
print(".".join(current_version.split(".")[:3]))

0 commit comments

Comments
 (0)