-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #31 from qchempku2017/atomate2_deprecation
[WIP] Atomate2 deprecation
- Loading branch information
Showing
36 changed files
with
274 additions
and
336 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,46 +1,17 @@ | ||
name: build-dist | ||
name: build | ||
|
||
# Use this workflow to manually trigger a build for testing purposes. | ||
# Download it from artifacts to test installation, or upload directly to PyPI. | ||
on: | ||
workflow_dispatch: | ||
inputs: | ||
release-pypi: | ||
required: true | ||
type: boolean | ||
CIBW_SKIP: | ||
description: wheel builds to skip | ||
# Allowed to be referenced by another workflow. | ||
on: [workflow_dispatch, workflow_call] | ||
|
||
jobs: | ||
|
||
build_wheels: | ||
name: Build wheels on ${{ matrix.os }} | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
matrix: | ||
# No specific external lib to worry about. | ||
os: [ubuntu-latest, windows-latest, macos-latest] | ||
env: | ||
CIBW_SKIP: pp* ${{ github.event.inputs.CIBW_SKIP }} # skip pypy wheels | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Build wheels | ||
uses: pypa/[email protected] | ||
|
||
- uses: actions/upload-artifact@v3 | ||
with: | ||
path: wheelhouse/*.whl | ||
|
||
# No need to build wheels. | ||
build_sdist: | ||
name: Build sdist | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 # Optional, use if you use setuptools_scm | ||
|
||
|
@@ -50,21 +21,3 @@ jobs: | |
- uses: actions/upload-artifact@v3 | ||
with: | ||
path: dist/*.tar.gz | ||
|
||
release-pypi: | ||
needs: [build_wheels, build_sdist] | ||
runs-on: ubuntu-latest | ||
if: github.event.inputs.release-pypi == 'true' | ||
|
||
steps: | ||
- uses: actions/download-artifact@v3 | ||
with: | ||
name: artifact | ||
path: dist | ||
|
||
- name: Publish package | ||
uses: pypa/gh-action-pypi-publish@release/v1 | ||
with: | ||
verbose: true | ||
user: __token__ | ||
password: ${{ secrets.PYPI_API_TOKEN }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
name: build-documentation | ||
|
||
on: workflow_dispatch | ||
on: [workflow_dispatch, workflow_call] | ||
|
||
jobs: | ||
docs: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,6 +9,10 @@ on: | |
branches: | ||
- main | ||
|
||
workflow_dispatch: | ||
|
||
workflow_call: | ||
|
||
jobs: | ||
lint: | ||
runs-on: ubuntu-latest | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,125 +1,48 @@ | ||
name: release | ||
|
||
# Releasing on push tags is less customizable compared to release upon request. | ||
on: | ||
push: | ||
tags: | ||
- 'v[0-9]+.[0-9]+.[0-9]+' | ||
# push: | ||
# tags: | ||
# - 'v[0-9]+.[0-9]+.[0-9]+' | ||
release: | ||
types: [published] | ||
inputs: | ||
release-pypi: | ||
required: true | ||
type: boolean | ||
default: true | ||
workflow_dispatch: | ||
inputs: | ||
release-pypi: | ||
required: true | ||
type: boolean | ||
description: "if true a release is made on PyPI" | ||
|
||
jobs: | ||
test: | ||
uses: WFacer/WFacer/.github/workflows/test.yml@main | ||
|
||
release-docs: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- name: Install pandoc | ||
run: sudo apt-get install pandoc | ||
build: | ||
needs: test | ||
uses: WFacer/WFacer/.github/workflows/build.yml@main | ||
|
||
- uses: actions/setup-python@v4 | ||
with: | ||
python-version: 3.9 | ||
|
||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install -r requirements.txt | ||
pip install -r requirements-optional.txt | ||
pip install -e .[docs] | ||
- name: Build docs | ||
run: sphinx-build docs/src docs_build | ||
|
||
- name: Deploy | ||
uses: peaceiris/actions-gh-pages@v3 | ||
with: | ||
deploy_key: ${{ secrets.ACTIONS_DEPLOY_KEY }} | ||
publish_dir: ./docs_build | ||
|
||
release-github: | ||
|
||
runs-on: ubuntu-latest | ||
needs: | ||
- release-docs | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- name: Get version | ||
id: get_version | ||
run: echo ::set-output name=VERSION::${GITHUB_REF#refs/tags/} | ||
|
||
- name: Write release info # CHANGES.md must be edited with the correct version being released. | ||
run: awk 'BEGIN {p = 0} {a = 0 }; /\[v([0-9]|[1-9][0-9]*)\.([0-9]|[1-9][0-9]*)\.([0-9]|[1-9][0-9]*)(?:-([0-9A-Za-z-]+(?:\.[0-9A-Za-z-]+)*))?(?:\+([0-9A-Za-z-]+(?:\.[0-9A-Za-z-]+)*))?\]/ { p += 1; a = 1}; p + a == 1 { print } ' CHANGES.md | sed -e '/./,$!d' -e :a -e '/^\n*$/{$d;N;ba' -e '}' > release.txt | ||
|
||
- name: Release | ||
uses: actions/create-release@v1 | ||
id: create_release | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
tag_name: ${{ steps.get_version.outputs.VERSION }} | ||
release_name: ${{ steps.get_version.outputs.VERSION }} | ||
body_path: release.txt | ||
draft: false | ||
prerelease: false | ||
|
||
build_wheels: | ||
name: Build wheels on ${{ matrix.os }} | ||
runs-on: ${{ matrix.os }} | ||
|
||
needs: | ||
- release-github | ||
strategy: | ||
matrix: | ||
os: [ubuntu-latest, windows-latest, macos-latest] | ||
env: | ||
CIBW_SKIP: pp* # skip pypy wheels | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Build wheels | ||
uses: pypa/[email protected] | ||
|
||
- uses: actions/upload-artifact@v3 | ||
with: | ||
path: wheelhouse/*.whl | ||
|
||
build_sdist: | ||
name: Build source distribution | ||
runs-on: ubuntu-latest | ||
|
||
needs: | ||
- release-github | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 # Optional, use if you use setuptools_scm | ||
|
||
- name: Build sdist | ||
run: pipx run build --sdist | ||
|
||
- uses: actions/upload-artifact@v3 | ||
with: | ||
path: dist/*.tar.gz | ||
release-docs: | ||
needs: test | ||
uses: WFacer/WFacer/.github/workflows/docs.yml@main | ||
|
||
release-pypi: | ||
needs: [build, docs] | ||
runs-on: ubuntu-latest | ||
needs: [build_wheels, build_sdist] | ||
if: github.event.inputs.release-pypi == 'true' | ||
|
||
steps: | ||
- uses: actions/download-artifact@v3 | ||
with: | ||
name: artifact | ||
path: dist | ||
|
||
- name: Publish package | ||
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags') | ||
uses: pypa/gh-action-pypi-publish@release/v1 | ||
- uses: pypa/gh-action-pypi-publish@release/v1 | ||
with: | ||
verbose: true | ||
user: __token__ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.