From 19332de1d10882856f2ab30d9ab6fe7ba8eba45f Mon Sep 17 00:00:00 2001 From: Jirka Borovec <6035284+Borda@users.noreply.github.com> Date: Mon, 25 Mar 2024 10:57:36 +0100 Subject: [PATCH] ci: enable setting python version for package build (#244) * enable setting python version for package build * chlog + test * Description... --- .github/workflows/check-package.yml | 8 ++++---- .github/workflows/ci-use-checks.yaml | 5 +++++ CHANGELOG.md | 2 +- 3 files changed, 10 insertions(+), 5 deletions(-) diff --git a/.github/workflows/check-package.yml b/.github/workflows/check-package.yml index e978b0da..19f69274 100644 --- a/.github/workflows/check-package.yml +++ b/.github/workflows/check-package.yml @@ -31,7 +31,7 @@ on: required: false default: "" build-matrix: - description: "what building configs in json format" + description: "what building configs in json format, expected keys are `os` and `python-version`" required: false type: string default: | @@ -39,7 +39,7 @@ on: "os": ["ubuntu-latest"], } testing-matrix: - description: "what test configs to run in json format" + description: "what test configs to run in json format, expected keys are `os` and `python-version`" required: false type: string # default operating systems should be pinned to specific versions instead of "-latest" for stability @@ -85,7 +85,7 @@ jobs: - name: Set up Python 🐍 uses: actions/setup-python@v5 with: - python-version: 3.8 + python-version: ${{ matrix.python-version || '3.x' }} - name: Pull reusable 🤖 actions️ uses: actions/checkout@v4 @@ -113,7 +113,7 @@ jobs: - name: Set up Python 🐍 ${{ matrix.python-version }} uses: actions/setup-python@v5 with: - python-version: ${{ matrix.python-version }} + python-version: ${{ matrix.python-version || '3.x' }} - name: Pull reusable 🤖 actions️ uses: actions/checkout@v4 diff --git a/.github/workflows/ci-use-checks.yaml b/.github/workflows/ci-use-checks.yaml index dac10d60..9cadbf1e 100644 --- a/.github/workflows/ci-use-checks.yaml +++ b/.github/workflows/ci-use-checks.yaml @@ -44,6 +44,11 @@ jobs: actions-ref: ${{ github.sha }} # use local version artifact-name: dist-packages-${{ github.sha }} import-name: "lightning_utilities" + build-matrix: | + { + "os": ["ubuntu-22.04"], + "python-version": ["3.10"] + } testing-matrix: | { "os": ["ubuntu-22.04", "macos-12", "windows-2022"], diff --git a/CHANGELOG.md b/CHANGELOG.md index 620d3a8b..bca8b63b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -16,7 +16,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Changed -- +- CI: enable setting python version for package build ([#244](https://github.com/Lightning-AI/utilities/pull/244)) ### Deprecated