From 217ab3de6963540b24af55b3883351a303f55331 Mon Sep 17 00:00:00 2001 From: Licini Date: Thu, 23 Nov 2023 17:16:52 +0100 Subject: [PATCH] latest workflow --- .github/workflows/build.yml | 39 +++++++------------------------ .github/workflows/docs.yml | 11 ++------- .github/workflows/release.yml | 44 ++++++++++++++++------------------- 3 files changed, 30 insertions(+), 64 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 38d00d5..f30dfd3 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -8,42 +8,19 @@ on: branches: - main -defaults: - run: - shell: powershell - jobs: - build-packages: + Build: + if: "!contains(github.event.pull_request.labels.*.name, 'docs-only')" runs-on: ${{ matrix.os }} strategy: matrix: os: [macos-latest, windows-latest] + python: ['3.8', '3.9', '3.10'] steps: - - uses: actions/checkout@v2 - with: - submodules: recursive - - - uses: conda-incubator/setup-miniconda@v2.0.0 + - uses: compas-dev/compas-actions.build@v3 with: - miniconda-version: "latest" - activate-environment: igl - channels: conda-forge - python-version: 3.8 - - - name: build - run: | - conda install git cmake">=3.14" boost eigen=3.3 compas --yes - pip install -r requirements-dev.txt - - - name: Lint with flake8 - run: | - invoke lint - - - name: Test with pytest - run: | - invoke test - - - name: Test build docs - run: | - invoke docs + invoke_lint: true + check_import: true + use_conda: true + python: ${{ matrix.python }} \ No newline at end of file diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index f7dd61a..5a68339 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -5,22 +5,15 @@ on: branches: - main tags: - - "v*" + - 'v*' pull_request: branches: - main jobs: - build: - name: custom build and deploy docs + docs: runs-on: windows-latest - defaults: - run: - shell: powershell steps: - - uses: actions/checkout@v2 - with: - submodules: recursive - uses: compas-dev/compas-actions.docs@v2 with: github_token: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index c5ed740..2717cbd 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -1,36 +1,32 @@ -name: Release - on: push: tags: - - "v*" + - 'v*' + +name: Create Release jobs: - Release: - runs-on: ubuntu-latest + build: + runs-on: ${{ matrix.os }} + strategy: + matrix: + os: [macos-latest, windows-latest] + python: ['3.8', '3.9', '3.10'] + steps: - - uses: actions/checkout@v2 - - name: Create Release - id: create_release - uses: actions/create-release@v1 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + - uses: compas-dev/compas-actions.build@v3 with: - tag_name: ${{ github.ref }} - release_name: Release ${{ github.ref }} - draft: false - prerelease: false + invoke_lint: true + check_import: true + use_conda: true + python: ${{ matrix.python }} Publish: - needs: Release + needs: build runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 - with: - submodules: recursive - - uses: actions/setup-python@v2 - with: - python-version: "3.x" - - uses: compas-dev/compas-actions.publish@v1.0.0 + - uses: compas-dev/compas-actions.publish@v2 with: - token: ${{ secrets.PYPI }} + pypi_token: ${{ secrets.PYPI }} + github_token: ${{ secrets.GITHUB_TOKEN }} + bdist_wheel: false \ No newline at end of file