forked from diffCheckOrg/diffCheck
-
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.
- Loading branch information
Showing
129 changed files
with
2,429 additions
and
1,052 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 |
---|---|---|
@@ -0,0 +1,148 @@ | ||
name: doc-build | ||
|
||
on: [push, pull_request, workflow_dispatch] | ||
|
||
permissions: | ||
contents: write | ||
pages: write | ||
id-token: write | ||
|
||
jobs: | ||
build-source: | ||
runs-on: windows-latest | ||
|
||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v4 | ||
|
||
- name: Setup conda environment | ||
uses: conda-incubator/setup-miniconda@v2 | ||
with: | ||
auto-update-conda: true | ||
python-version: 3.9.1 | ||
|
||
- name: Create diff_check conda environment | ||
run: | | ||
conda env create -f environment.yml | ||
- name: Cache conda environment cache | ||
uses: actions/cache@v2 | ||
with: | ||
path: C:\Miniconda\envs\diff_check | ||
key: ${{ runner.os }}-conda-${{ hashFiles('environment.yml') }} | ||
|
||
- name: Cmake Configure | ||
run: | | ||
conda run --name diff_check --no-capture-output cmake -S . -B build -A x64 -DBUILD_PYTHON_MODULE=ON -DBUILD_TESTS=OFF -DRUN_TESTS=OFF | ||
- name: CMake Build | ||
run: conda run --name diff_check --no-capture-output cmake --build build --config Release | ||
|
||
# upload artifacts | ||
- name: Move dlls and pyd files to single directories | ||
run: | | ||
mkdir $env:GITHUB_WORKSPACE\artifacts_dlls | ||
mkdir $env:GITHUB_WORKSPACE\artifacts_pyds | ||
Get-ChildItem -Path $env:GITHUB_WORKSPACE\build\bin\Release -Filter *.dll -Recurse | Move-Item -Destination $env:GITHUB_WORKSPACE\artifacts_dlls | ||
Get-ChildItem -Path $env:GITHUB_WORKSPACE\build\Release -Filter *.pyd -Recurse | Move-Item -Destination $env:GITHUB_WORKSPACE\artifacts_pyds | ||
shell: pwsh | ||
- name: Upload artifacts - dlls | ||
uses: actions/upload-artifact@v2 | ||
with: | ||
name: __build_artifacts_dlls__ | ||
path: ${{ github.workspace }}/artifacts_dlls/* | ||
- name: Upload artifacts - pyds | ||
uses: actions/upload-artifact@v2 | ||
with: | ||
name: __build_artifacts_pyds__ | ||
path: ${{ github.workspace }}/artifacts_pyds/* | ||
|
||
|
||
build-docs: | ||
runs-on: windows-latest | ||
needs: build-source | ||
|
||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v4 | ||
|
||
- name: Setup conda environment | ||
uses: conda-incubator/setup-miniconda@v2 | ||
with: | ||
auto-update-conda: true | ||
python-version: 3.9.1 | ||
|
||
- name: Restore conda environment cache | ||
uses: actions/cache@v2 | ||
with: | ||
path: C:\Miniconda\envs\diff_check | ||
key: ${{ runner.os }}-conda-${{ hashFiles('environment.yml') }} | ||
restore-keys: | | ||
${{ runner.os }}-conda- | ||
# download artifacts | ||
- name: Download dlls for doc folder | ||
uses: actions/download-artifact@v2 | ||
with: | ||
name: __build_artifacts_dlls__ | ||
path: ${{github.workspace}}/doc | ||
- name: Download pyds for doc folder | ||
uses: actions/download-artifact@v2 | ||
with: | ||
name: __build_artifacts_pyds__ | ||
path: ${{github.workspace}}/doc | ||
- name: Download dlls for diffCheck py package | ||
uses: actions/download-artifact@v2 | ||
with: | ||
name: __build_artifacts_dlls__ | ||
path: ${{github.workspace}}/src/gh/diffCheck/diffCheck/dlls | ||
- name: Download pyds for diffCheck py package | ||
uses: actions/download-artifact@v2 | ||
with: | ||
name: __build_artifacts_pyds__ | ||
path: ${{github.workspace}}/src/gh/diffCheck/diffCheck | ||
|
||
- name: Sphinx build | ||
run: | | ||
conda run --name diff_check --no-capture-output sphinx-build -b html -v doc _build | ||
- name: Upload documentation | ||
uses: actions/upload-artifact@v2 | ||
with: | ||
name: __build_sphx_docs__ | ||
path: ${{ github.workspace }}/_build | ||
|
||
|
||
page-deployement: | ||
environment: | ||
name: github-pages | ||
url: ${{ steps.deployment.outputs.page_url }} | ||
runs-on: ubuntu-latest | ||
needs: build-docs | ||
# Run only on pushes to the default branch | ||
if: github.ref == 'refs/heads/main' | ||
# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued. | ||
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete. | ||
concurrency: | ||
group: "pages" | ||
cancel-in-progress: false | ||
|
||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v4 | ||
|
||
- name: Download sphinx docs | ||
uses: actions/download-artifact@v2 | ||
with: | ||
name: __build_sphx_docs__ | ||
path: ${{github.workspace}}/_build | ||
|
||
- name: Setup Pages | ||
uses: actions/configure-pages@v5 | ||
- name: Upload artifact | ||
uses: actions/upload-pages-artifact@v3 | ||
with: | ||
path: '_build' | ||
- name: Deploy to GitHub Pages | ||
id: deployment | ||
uses: actions/deploy-pages@v4 |
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,38 @@ | ||
name: py-sanity-checks | ||
|
||
on: [push, pull_request] | ||
|
||
jobs: | ||
build: | ||
runs-on: windows-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- name: Setup conda environment | ||
uses: conda-incubator/setup-miniconda@v2 | ||
with: | ||
auto-update-conda: true | ||
python-version: 3.9.1 | ||
- name: Cache conda environment cache | ||
uses: actions/cache@v2 | ||
with: | ||
path: C:\Miniconda\envs\diff_check | ||
key: ${{ runner.os }}-conda-${{ hashFiles('environment.yml') }} | ||
restore-keys: | | ||
${{ runner.os }}-conda- | ||
id: cache-conda | ||
- name: Create diff_check conda environment if not cached | ||
if: steps.cache-conda.outputs.cache-hit != 'true' | ||
run: | | ||
conda env create -f environment.yml | ||
- name: Cache pre-commit hooks | ||
uses: actions/cache@v2 | ||
with: | ||
path: ~/.cache/pre-commit | ||
key: ${{ runner.os }}-precommit-${{ hashFiles('.pre-commit-config.yaml') }} | ||
- name: Install pre-commit | ||
run: pip install pre-commit | ||
- name: Run pre-commit | ||
run: conda run --name diff_check --no-capture-output pre-commit run --all-files |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
# Install the pre-commit hooks below with | ||
# 'pre-commit install' | ||
|
||
# Auto-update the version of the hooks with | ||
# 'pre-commit autoupdate' | ||
|
||
# Run the hooks on all files with | ||
# 'pre-commit run --all' | ||
|
||
repos: | ||
- repo: https://github.com/pre-commit/pre-commit-hooks | ||
rev: v4.6.0 | ||
hooks: | ||
- id: check-ast | ||
exclude: ^deps/ | ||
- id: check-merge-conflict | ||
- id: end-of-file-fixer | ||
# only include python files | ||
files: \.py$ | ||
- id: trailing-whitespace | ||
# only include python files | ||
files: \.py$ | ||
- id: end-of-file-fixer | ||
# only include python files | ||
files: \.py$ | ||
|
||
- repo: https://github.com/pre-commit/mirrors-mypy | ||
rev: 'v1.11.0' | ||
hooks: | ||
- id: mypy | ||
files: (src/gh|tests|invokes\.py) | ||
exclude: src/gh/components/ | ||
additional_dependencies: [ | ||
types-requests==2.31.0, | ||
numpy==2.0.1, | ||
pytest==8.3.1, | ||
types-setuptools>=71.1.0.20240818 | ||
] | ||
args: [--config=pyproject.toml] | ||
|
||
- repo: https://github.com/astral-sh/ruff-pre-commit | ||
rev: v0.4.4 | ||
hooks: | ||
- id: ruff |
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.