From afb28f643a01364635e348d16e2ed1eab3353af9 Mon Sep 17 00:00:00 2001 From: Tyler Veness Date: Mon, 8 Jul 2024 18:56:13 -0700 Subject: [PATCH] Merge ChoreoLib .yml files --- .github/workflows/choreolib-python.yml | 43 ------------------- .../{choreolib-cppjava.yml => choreolib.yml} | 38 ++++++++++++++-- 2 files changed, 35 insertions(+), 46 deletions(-) delete mode 100644 .github/workflows/choreolib-python.yml rename .github/workflows/{choreolib-cppjava.yml => choreolib.yml} (82%) diff --git a/.github/workflows/choreolib-python.yml b/.github/workflows/choreolib-python.yml deleted file mode 100644 index e0b87dd111..0000000000 --- a/.github/workflows/choreolib-python.yml +++ /dev/null @@ -1,43 +0,0 @@ -name: ChoreoLib / Build Python - -on: [push, pull_request] - -permissions: - # IMPORTANT: this permission is mandatory for trusted publishing - id-token: write - -jobs: - build: - runs-on: ubuntu-22.04 - steps: - - uses: actions/checkout@v4 - with: - fetch-depth: 0 - - - uses: actions/setup-python@v5 - with: - python-version: 3.12 - - - run: pip3 install setuptools wheel pytest - - - run: python3 setup.py sdist bdist_wheel - working-directory: ./choreolib/py - - run: pip3 install --no-cache-dir dist/*.whl - working-directory: ./choreolib/py - - run: pytest - working-directory: ./choreolib/py - - - uses: actions/upload-artifact@v4 - with: - name: dist - path: ./choreolib/py/dist/ - - - name: Publish package distributions to PyPI - if: startsWith(github.ref, 'refs/tags/v') - uses: pypa/gh-action-pypi-publish@release/v1 - with: - packages_dir: ./choreolib/py/dist/ - - permissions: - # IMPORTANT: this permission is mandatory for trusted publishing - id-token: write diff --git a/.github/workflows/choreolib-cppjava.yml b/.github/workflows/choreolib.yml similarity index 82% rename from .github/workflows/choreolib-cppjava.yml rename to .github/workflows/choreolib.yml index 637ec14d23..d03bce210a 100644 --- a/.github/workflows/choreolib-cppjava.yml +++ b/.github/workflows/choreolib.yml @@ -1,4 +1,4 @@ -name: ChoreoLib / Build C++ and Java +name: ChoreoLib on: [push, pull_request] @@ -26,7 +26,7 @@ jobs: artifact-name: Linux-x86_64 build-options: - name: "${{ matrix.artifact-name }}" + name: "Build C++ and Java / ${{ matrix.artifact-name }}" runs-on: ubuntu-22.04 container: ${{ matrix.container }} steps: @@ -83,7 +83,7 @@ jobs: artifact-name: macOS-arm64 build-options: - name: "${{ matrix.artifact-name }}" + name: "Build C++ and Java / ${{ matrix.artifact-name }}" runs-on: ${{ matrix.os }} steps: - uses: actions/checkout@v4 @@ -154,3 +154,35 @@ jobs: with: name: ChoreoLib-Maven path: ~/releases + + build-python: + name: "Build Python" + runs-on: ubuntu-22.04 + steps: + - uses: actions/checkout@v4 + with: + fetch-depth: 0 + + - uses: actions/setup-python@v5 + with: + python-version: 3.12 + + - run: pip3 install setuptools wheel pytest + + - run: python3 setup.py sdist bdist_wheel + working-directory: ./choreolib/py + - run: pip3 install --no-cache-dir dist/*.whl + working-directory: ./choreolib/py + - run: pytest + working-directory: ./choreolib/py + + - uses: actions/upload-artifact@v4 + with: + name: dist + path: ./choreolib/py/dist/ + + - name: Publish package distributions to PyPI + if: startsWith(github.ref, 'refs/tags/v') + uses: pypa/gh-action-pypi-publish@release/v1 + with: + packages_dir: ./choreolib/py/dist/