aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/.github
diff options
context:
space:
mode:
authorEgor Tensin <egor@tensin.name>2026-06-19 19:10:07 +0200
committerEgor Tensin <egor@tensin.name>2026-06-19 19:23:04 +0200
commitce778a5632e89df0a2db9f5c1b20e85a4e98d547 (patch)
treeeaebdfa9a2c15790e1ba85620bf8555a54050c15 /.github
parentrequire Python 3.8 (diff)
downloadcmake-common-ce778a5632e89df0a2db9f5c1b20e85a4e98d547.tar.gz
cmake-common-ce778a5632e89df0a2db9f5c1b20e85a4e98d547.zip
workflows: split out jobs from ci.yml into separate workflows
Diffstat (limited to '')
-rw-r--r--.github/workflows/basic.yml16
-rw-r--r--.github/workflows/ci.yml36
-rw-r--r--.github/workflows/lint.yml22
-rw-r--r--.github/workflows/publish.yml37
4 files changed, 66 insertions, 45 deletions
diff --git a/.github/workflows/basic.yml b/.github/workflows/basic.yml
index 2c2f025..7df8388 100644
--- a/.github/workflows/basic.yml
+++ b/.github/workflows/basic.yml
@@ -5,22 +5,6 @@ on:
workflow_dispatch:
jobs:
- # Check that project-clang-format.py works (and the C/C++ files are formatted).
- lint:
- runs-on: ubuntu-latest
- name: Linting
- steps:
- - name: Checkout
- uses: actions/checkout@v6
- - name: Run clang-format
- run: ./tools/project-clang-format.py
- - name: Set up Python
- uses: actions/setup-python@v6
- with:
- python-version: '3.x'
- - name: Run black
- uses: psf/black@stable
-
# Check that the most basic use-case works on different OSs.
os:
strategy:
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index e017626..1ce6e5f 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -11,6 +11,10 @@ on:
workflow_dispatch:
jobs:
+ lint:
+ name: Linting
+ uses: ./.github/workflows/lint.yml
+
basic:
name: Basic usage
uses: ./.github/workflows/basic.yml
@@ -33,36 +37,10 @@ jobs:
# Build a Python package and upload to PyPI.
publish:
- runs-on: ubuntu-latest
+ name: Publish
needs:
+ - lint
- basic
- boost_toolsets
- example_toolsets
- name: Publish
- steps:
- - name: Checkout
- uses: actions/checkout@v6
- with:
- fetch-depth: 0
- - name: Set up Python
- uses: actions/setup-python@v6
- with:
- python-version: '3.x'
- - name: Verify package can be installed
- run: pip install -q .
- - name: Install package builder
- run: pip install -q --upgrade build
- - name: Build package
- run: python -m build
- - name: Publish as artifact
- uses: actions/upload-artifact@v7
- with:
- name: dist
- path: dist
- if-no-files-found: error
- - name: Publish to PyPI
- if: startsWith(github.ref, 'refs/tags/')
- uses: pypa/gh-action-pypi-publish@release/v1
- with:
- user: __token__
- password: '${{ secrets.PYPI_API_TOKEN }}'
+ uses: ./.github/workflows/publish.yml
diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml
new file mode 100644
index 0000000..1896bad
--- /dev/null
+++ b/.github/workflows/lint.yml
@@ -0,0 +1,22 @@
+name: Linting
+
+on:
+ workflow_call:
+ workflow_dispatch:
+
+jobs:
+ # Check that project-clang-format.py works (and the C/C++ files are formatted).
+ lint:
+ runs-on: ubuntu-latest
+ name: Linting
+ steps:
+ - name: Checkout
+ uses: actions/checkout@v6
+ - name: Run clang-format
+ run: ./tools/project-clang-format.py
+ - name: Set up Python
+ uses: actions/setup-python@v6
+ with:
+ python-version: '3.x'
+ - name: Run black
+ uses: psf/black@stable
diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml
new file mode 100644
index 0000000..a27cf96
--- /dev/null
+++ b/.github/workflows/publish.yml
@@ -0,0 +1,37 @@
+name: Publish
+
+on:
+ workflow_call:
+ workflow_dispatch:
+
+jobs:
+ publish:
+ runs-on: ubuntu-latest
+ name: Publish
+ steps:
+ - name: Checkout
+ uses: actions/checkout@v6
+ with:
+ fetch-depth: 0
+ - name: Set up Python
+ uses: actions/setup-python@v6
+ with:
+ python-version: '3.x'
+ - name: Verify package can be installed
+ run: pip install -q .
+ - name: Install package builder
+ run: pip install -q --upgrade build
+ - name: Build package
+ run: python -m build
+ - name: Publish as artifact
+ uses: actions/upload-artifact@v7
+ with:
+ name: dist
+ path: dist
+ if-no-files-found: error
+ - name: Publish to PyPI
+ if: startsWith(github.ref, 'refs/tags/')
+ uses: pypa/gh-action-pypi-publish@release/v1
+ with:
+ user: __token__
+ password: '${{ secrets.PYPI_API_TOKEN }}'