Skip to content

Commit

Permalink
new workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
tomvanmele committed Nov 19, 2023
1 parent 2fac36d commit a830d29
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 84 deletions.
25 changes: 7 additions & 18 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,30 +8,19 @@ on:
branches:
- main

defaults:
run:
shell: bash -l {0}

jobs:
build:
Build:
if: "!contains(github.event.pull_request.labels.*.name, 'docs-only')"
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [macos-latest, windows-latest]
python-version: ['3.6', '3.7', '3.8', '3.9', '3.10']
python: ["3.7", "3.8", "3.9", "3.10"]

steps:

- uses: actions/checkout@v2

- uses: conda-incubator/[email protected]
with:
miniconda-version: "latest"
channels: conda-forge
python-version: ${{ matrix.python-version }}

- uses: compas-dev/[email protected]
- uses: compas-dev/compas-actions.build@v3
with:
test_lint: true
test_compas: true
invoke_lint: true
check_import: true
use_conda: true
python: ${{ matrix.python }}
72 changes: 6 additions & 66 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,76 +5,16 @@ on:
branches:
- main
tags:
- 'v*'
- "v*"
pull_request:
branches:
- main

jobs:
build:
name: build and deploy docs
runs-on: windows-latest
defaults:
run:
shell: bash -l {0}
docs:
runs-on: macos-latest
steps:
- uses: actions/checkout@v2

- uses: conda-incubator/[email protected]
with:
miniconda-version: "latest"
activate-environment: cgal
channels: conda-forge
python-version: 3.7

- name: build (windows)
run: |
conda install eigen=3.3 boost-cpp mpir mpfr cgal-cpp=5.2 pybind11 compas -y
pip install -r requirements-dev.txt
invoke docs
- uses: compas-dev/[email protected]
id: docs
with:
dest: deploy
build_to_subfolder: true
install_dependencies: false
build_docs: false

- name: Deploy docs
if: success() && steps.docs.outputs.commit_type != 'pull'
uses: crazy-max/ghaction-github-pages@v2
with:
target_branch: gh-pages
build_dir: deploy
keep_history: true
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

outputs:
commit_type: ${{ steps.docs.outputs.commit_type }}
current_version: ${{ steps.docs.outputs.current_version }}

docVersions:
needs: build
if: needs.build.outputs.commit_type == 'tag'
name: update doc versions
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
ref: gh-pages

- uses: compas-dev/[email protected]
with:
current_version: ${{ needs.build.outputs.current_version }}

- name: Deploy docs
if: success()
uses: crazy-max/ghaction-github-pages@v2
- uses: compas-dev/compas-actions.docs@v2
with:
target_branch: gh-pages
build_dir: ./
keep_history: false
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
github_token: ${{ secrets.GITHUB_TOKEN }}
use_conda: true

0 comments on commit a830d29

Please sign in to comment.