-
Notifications
You must be signed in to change notification settings - Fork 227
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1,623 changed files
with
2,082,717 additions
and
71,907 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
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 |
---|---|---|
@@ -0,0 +1,63 @@ | ||
name: API changes check | ||
on: | ||
pull_request_target: | ||
branches: | ||
- develop | ||
|
||
env: | ||
API_DOC_HTML_ROOT_RELATIVE_PATH: autoapi | ||
|
||
concurrency: | ||
group: ci-${{ github.head_ref }}-${{ github.workflow }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
call-build-api-doc: | ||
uses: ./.github/workflows/build_html_doc.yml | ||
with: | ||
ref: "refs/pull/${{ github.event.number }}/merge" | ||
compare-api-doc-with-develop: | ||
needs: call-build-api-doc | ||
runs-on: ubuntu-latest | ||
permissions: | ||
issues: write | ||
steps: | ||
- name: Download built HTML doc as artifact from previous step | ||
uses: alehechka/download-tartifact@v2 | ||
with: | ||
name: html_doc_artifact | ||
- name: Checkout latest doc_pages branch tip | ||
uses: actions/checkout@v3 | ||
with: | ||
ref: doc_pages | ||
path: previous_doc_state | ||
- name: Get changed file names in API doc path | ||
id: diff | ||
run: | | ||
cd html_build/html/$API_DOC_HTML_ROOT_RELATIVE_PATH | ||
CHANGED_FILES=$(find . -name "*.html" -exec diff -qrBZ {} $GITHUB_WORKSPACE/previous_doc_state/$API_DOC_HTML_ROOT_RELATIVE_PATH/{} \;) | ||
echo ${CHANGED_FILES} | ||
CHANGED_FILES=$(echo $CHANGED_FILES | tr '\n' ' ') | ||
echo "changed_files=${CHANGED_FILES}" >> $GITHUB_OUTPUT | ||
- uses: actions/github-script@v6 | ||
if: ${{ !contains(steps.diff.outputs.changed_files, 'differ') }} | ||
with: | ||
github-token: ${{ secrets.ADD_LABELS_WITH_REST_API }} | ||
script: | | ||
github.rest.issues.removeLabel({ | ||
issue_number: context.issue.number, | ||
owner: context.repo.owner, | ||
repo: context.repo.repo, | ||
name: "API" | ||
}) | ||
- uses: actions/github-script@v6 | ||
if: ${{ contains(steps.diff.outputs.changed_files, 'differ') }} | ||
with: | ||
github-token: ${{ secrets.ADD_LABELS_WITH_REST_API }} | ||
script: | | ||
github.rest.issues.addLabels({ | ||
issue_number: context.issue.number, | ||
owner: context.repo.owner, | ||
repo: context.repo.repo, | ||
labels: ["API"] | ||
}) |
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 |
---|---|---|
@@ -0,0 +1,43 @@ | ||
name: Build complete docs and publish to GH Pages | ||
on: | ||
push: | ||
branches: | ||
- develop | ||
|
||
env: | ||
GH_PAGES_BRANCH: doc_pages | ||
|
||
concurrency: | ||
group: ci-${{ github.head_ref }}-${{ github.workflow }} | ||
cancel-in-progress: true | ||
|
||
permissions: | ||
contents: write | ||
jobs: | ||
call-build-html-doc: | ||
uses: ./.github/workflows/build_html_doc.yml | ||
with: | ||
ref: ${{ github.ref }} | ||
call-build-schema-page: | ||
uses: ./.github/workflows/build_schema_page.yml | ||
publish: | ||
needs: [call-build-html-doc, call-build-schema-page] | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout main repo # the github-pages-deploy-action seems to require this step | ||
uses: actions/checkout@v3 | ||
- name: Download HTML doc build artifact | ||
uses: alehechka/download-tartifact@v2 | ||
with: | ||
name: html_doc_artifact | ||
- name: Download schema doc build artifact | ||
uses: alehechka/download-tartifact@v2 | ||
with: | ||
name: schema_doc_artifact | ||
path: html_build/html | ||
- name: Publish built docs on Github Pages branch ${{ env.GH_PAGES_BRANCH }} | ||
uses: JamesIves/github-pages-deploy-action@v4 | ||
with: | ||
folder: html_build/html | ||
token: ${{ secrets.PUSH_TO_GH_PAGES_BRANCH }} | ||
branch: ${{ env.GH_PAGES_BRANCH }} |
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 |
---|---|---|
@@ -0,0 +1,27 @@ | ||
name: HTML documentation build | ||
on: | ||
workflow_call: | ||
inputs: | ||
ref: | ||
required: true | ||
type: string | ||
jobs: | ||
build-html: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
with: | ||
ref: ${{ inputs.ref }} | ||
- name: Install NNCF and doc requirements | ||
run: | | ||
pip install -e . | ||
pip install -r docs/api/requirements.txt | ||
- name: Build API docs | ||
run: | | ||
sphinx-build -M html docs/api/source html_build | ||
- name: Upload built HTMLs as job artifact | ||
uses: alehechka/upload-tartifact@v2 | ||
with: | ||
name: html_doc_artifact | ||
path: html_build/html |
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,31 +1,23 @@ | ||
name: Config schema HTML build | ||
on: | ||
push: | ||
branches: | ||
- develop | ||
- test_for_doc_build_trigger | ||
paths: | ||
- nncf/config/** | ||
permissions: | ||
contents: write | ||
workflow_call: | ||
jobs: | ||
build-and-deploy: | ||
concurrency: ci-${{ github.ref }} # Recommended if you intend to make multiple deployments in quick succession. | ||
build-config-schema-html: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
|
||
- name: Install and Build # This example project is built using npm and outputs the result to the 'build' folder. Replace with the commands required to build your project, or remove this step entirely if your site is pre-built. | ||
- name: Install and Build | ||
run: | | ||
pip install json-schema-for-humans | ||
pip install -e . | ||
python -c 'import jstyleson; from nncf.config import NNCFConfig; jstyleson.dump(NNCFConfig.schema(), open("./schema.json", "w"), indent=2)' | ||
mkdir schema_html_build | ||
generate-schema-doc --deprecated-from-description schema.json schema_html_build/index.html | ||
- name: Deploy | ||
uses: JamesIves/github-pages-deploy-action@v4 | ||
mkdir schema | ||
generate-schema-doc --deprecated-from-description schema.json schema/index.html | ||
- name: Upload result as artifact | ||
uses: alehechka/upload-tartifact@v2 | ||
with: | ||
folder: schema_html_build # The folder the action should deploy. | ||
token: ${{ secrets.PUSH_TO_GH_PAGES_BRANCH }} | ||
branch: doc_pages | ||
name: schema_doc_artifact | ||
path: schema |
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.