Skip to content

Commit d1748be

Browse files
committed
feat: semantic versioning
1 parent c2cfb34 commit d1748be

File tree

10 files changed

+486
-85
lines changed

10 files changed

+486
-85
lines changed

.github/workflows/builds.yaml

Lines changed: 36 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -5,81 +5,69 @@ on:
55
- main
66
paths-ignore:
77
- '.github/workflows/docs.yaml'
8-
- '.github/workflows/tests.yaml'
8+
- ".github/workflows/publish.yaml"
99
- '*.md'
1010
pull_request:
1111
branches:
1212
- main
1313

1414
jobs:
15-
bionic:
15+
cmake:
1616
# Bionic default: gcc 7, python 3.6
17-
name: Bionic
18-
runs-on: ubuntu-18.04
19-
steps:
20-
- uses: actions/checkout@v2
21-
22-
- name: Build
23-
run: |
24-
mkdir -p build
25-
cd build
26-
cmake .. -DBUILD_PYTHON=ON
27-
make
28-
29-
focal:
3017
# Focal default: gcc 9, python 3.8
31-
name: Focal
32-
runs-on: ubuntu-20.04
33-
steps:
34-
- uses: actions/checkout@v2
35-
36-
- name: Build
37-
run: |
38-
mkdir -p build
39-
cd build
40-
cmake .. -DBUILD_PYTHON=ON
41-
make
42-
43-
macos:
4418
# Catalina default: clang 12, python 3.9
45-
name: macOS
46-
runs-on: macos-latest
19+
name: CMake ${{ matrix.os }}
20+
runs-on: ${{ matrix.os }}
21+
strategy:
22+
matrix:
23+
os:
24+
- ubuntu-20.04
25+
- macos-latest
26+
4727
steps:
4828
- uses: actions/checkout@v2
4929

5030
- name: Build
31+
env:
32+
CMAKE_OSX_ARCHITECTURES: "arm64;x86_64"
5133
run: |
5234
mkdir -p build
5335
cd build
54-
cmake .. -DBUILD_PYTHON=ON
36+
cmake .. -DBUILD_PYTHON=ON -DPYBIND11_PYTHON_VERSION=3
5537
make
5638
57-
ubuntu_pip:
58-
name: Ubuntu pip
59-
runs-on: ubuntu-latest
60-
steps:
61-
- uses: actions/checkout@v2
39+
pip:
40+
name: Pip ${{ matrix.os }}
41+
runs-on: ${{ matrix.os }}
42+
strategy:
43+
matrix:
44+
os:
45+
- ubuntu-latest
46+
- macos-latest
6247

63-
- name: Install
64-
run: |
65-
pip install . -vvv
66-
67-
ubuntu_pip_dev:
68-
name: Ubuntu pip dev
69-
runs-on: ubuntu-latest
7048
steps:
7149
- uses: actions/checkout@v2
7250

7351
- name: Install
52+
env:
53+
CMAKE_OSX_ARCHITECTURES: "arm64;x86_64"
7454
run: |
75-
pip install -e . -vvv
55+
pip3 install . -vvv
56+
57+
pip_dev:
58+
name: Pip dev ${{ matrix.os }}
59+
runs-on: ${{ matrix.os }}
60+
strategy:
61+
matrix:
62+
os:
63+
- ubuntu-latest
64+
- macos-latest
7665

77-
macos_pip:
78-
name: macOS pip
79-
runs-on: macos-latest
8066
steps:
8167
- uses: actions/checkout@v2
8268

8369
- name: Install
70+
env:
71+
CMAKE_OSX_ARCHITECTURES: "arm64;x86_64"
8472
run: |
85-
pip3 install . -vvv
73+
pip3 install --no-use-pep517 -e . -vvv

.github/workflows/docs.yaml

Lines changed: 6 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,8 @@ on:
55
- main
66
paths-ignore:
77
- '.github/workflows/builds.yaml'
8-
- '.github/workflows/tests.yaml'
8+
- ".github/workflows/releases.yaml"
9+
- ".github/workflows/publish.yaml"
910
- '*.md'
1011
pull_request:
1112
branches:
@@ -18,27 +19,18 @@ jobs:
1819
steps:
1920
- uses: actions/checkout@v2
2021

21-
- name: Install dependencies
22+
- name: Install pip dependencies
2223
run: |
2324
sudo apt install doxygen
2425
pip install pipenv
2526
pipenv install --dev
2627
27-
- name: Configure
28+
- name: Build
2829
run: |
2930
mkdir -p build
3031
cmake -B build -DBUILD_PYTHON=ON -DBUILD_DOCS=ON
31-
32-
- name: Generate cpp_redis Docs
33-
run: |
34-
cd external/cpp_redis/cpp_redis.git
35-
git submodule update --init .
36-
sed -i.old -E "s/^GENERATE_TAGFILE( +)=$/GENERATE_TAGFILE\1= cpp_redis.tag/" .doxygen
37-
doxygen .doxygen
38-
39-
- name: Build
40-
# ctrlutils neeeds to be in the virtual environment.
41-
run: pipenv run pip install -e .
32+
# spatialdyn needs to be in the virtual environment.
33+
pipenv run pip install --no-use-pep517 -e .
4234
4335
- name: Deploy
4436
uses: peaceiris/actions-gh-pages@v3

.github/workflows/publish.yaml

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
name: Publish
2+
on: workflow_dispatch
3+
# release:
4+
# types:
5+
# - published
6+
# - edited
7+
8+
jobs:
9+
build_wheels:
10+
name: Build wheels ${{ matrix.os }}
11+
runs-on: ${{ matrix.os }}
12+
strategy:
13+
matrix:
14+
os:
15+
- ubuntu-latest
16+
- macos-latest
17+
18+
steps:
19+
- uses: actions/checkout@v2
20+
21+
- name: Build wheels
22+
uses: pypa/[email protected]
23+
24+
- uses: actions/upload-artifact@v2
25+
with:
26+
path: wheelhouse/*.whl
27+
28+
upload_pypi:
29+
name: Upload to PyPi
30+
needs:
31+
- build_wheels
32+
runs-on: ubuntu-latest
33+
steps:
34+
- uses: actions/download-artifact@v2
35+
with:
36+
name: artifact
37+
path: dist
38+
39+
- name: Publish to PyPi
40+
uses: pypa/[email protected]
41+
with:
42+
user: __token__
43+
password: ${{ secrets.PYPI_TOKEN }}

.github/workflows/release.yaml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
name: Release
2+
on:
3+
workflow_run:
4+
workflows:
5+
- Builds
6+
types:
7+
- completed
8+
9+
jobs:
10+
release:
11+
name: Release
12+
runs-on: ubuntu-latest
13+
concurrency: release
14+
if: ${{ github.event.workflow_run.conclusion == 'success' }}
15+
16+
steps:
17+
- uses: actions/checkout@v2
18+
with:
19+
fetch-depth: 0
20+
21+
- name: Semantic Release
22+
uses: relekang/python-semantic-release@master
23+
with:
24+
github_token: ${{ secrets.GITHUB_TOKEN }}

CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ cmake_minimum_required(VERSION 3.11)
1212

1313
# Define project
1414
project(ctrl_utils
15-
VERSION 1.4.0
15+
VERSION 1.3.0
1616
DESCRIPTION "Utility library for robot control"
1717
LANGUAGES CXX
1818
)

Pipfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ verify_ssl = true
77
sphinx = "*"
88
sphinxcontrib-doxylink = "*"
99
sphinx-autodoc-typehints = "*"
10-
sphinx-bootstrap-theme = "*"
10+
sphinx_bootstrap_theme = "*"
1111

1212
[packages]
1313

0 commit comments

Comments
 (0)