-
Notifications
You must be signed in to change notification settings - Fork 6
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 #239 from NCAR/main
Release version 3.2.0 General solver, JIT solver, started GPU works
- Loading branch information
Showing
383 changed files
with
14,407 additions
and
34,749 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,46 @@ | ||
name: Clang-Format | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
|
||
jobs: | ||
format: | ||
name: Run Clang-Format | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Install Clang-Format | ||
run: sudo apt-get update && sudo apt-get install clang-format | ||
|
||
- name: Check out code, run clang format, push changes | ||
uses: actions/checkout@v3 | ||
with: | ||
ref: ${{ github.head_ref }} | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Format code | ||
run: | | ||
find include -type f \( -name '*.hpp' -o -name '*.h' \) -exec clang-format -i --style=file {} + | ||
find src -type f \( -name '*.cu' -o -name '*.hpp' -o -name '*.h' -o -name '*.cpp' \) -exec clang-format -i --style=file {} + | ||
find test -type f \( -name '*.hpp' -o -name '*.h' -o -name '*.cpp' \) -exec clang-format -i --style=file {} + | ||
- name: Commit and push changes | ||
run: | | ||
git config --global user.name "GitHub Actions" | ||
git config --global user.email "[email protected]" | ||
git commit -am "Auto-format code using Clang-Format" || echo "No changes to commit" | ||
- name: Push changes to main-formatting branch | ||
run: | | ||
git push origin HEAD:main-formatting | ||
- name: Create Pull Request | ||
uses: peter-evans/create-pull-request@v3 | ||
with: | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
commit-message: "Auto-format code using Clang-Format" | ||
title: "Auto-format code changes" | ||
body: "This is an automated pull request to apply code formatting using Clang-Format." | ||
branch: "main-formatting" |
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,125 @@ | ||
# Build and deploy documentation to GitHub Pages | ||
name: GitHub Pages | ||
|
||
on: [ push, pull_request ] | ||
|
||
env: | ||
DEFAULT_BRANCH: "release" | ||
|
||
jobs: | ||
build-and-deploy: | ||
name: Build and deploy to gh-pages | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 | ||
lfs: true | ||
|
||
- name: Debugging information | ||
run: | | ||
echo "github.ref:" ${{github.ref}} | ||
echo "github.event_name:" ${{github.event_name}} | ||
echo "github.head_ref:" ${{github.head_ref}} | ||
echo "github.base_ref:" ${{github.base_ref}} | ||
set -x | ||
git rev-parse --abbrev-ref HEAD | ||
git branch | ||
git branch -a | ||
git remote -v | ||
python -V | ||
pip list --not-required | ||
pip list | ||
# Clone and set up the old gh-pages branch | ||
- name: Clone old gh-pages | ||
if: ${{ github.event_name == 'push' }} | ||
run: | | ||
set -x | ||
git fetch | ||
( git branch gh-pages remotes/origin/gh-pages && git clone . --branch=gh-pages _gh-pages/ ) || mkdir _gh-pages | ||
rm -rf _gh-pages/.git/ | ||
mkdir -p _gh-pages/branch/ | ||
# If a push and default branch, copy build to _gh-pages/ as the "main" | ||
# deployment. | ||
- name: Build and copy documentation (default branch) | ||
if: | | ||
contains(github.event_name, 'push') && | ||
contains(github.ref, env.DEFAULT_BRANCH) | ||
run: | | ||
set -x | ||
mkdir -p _build/html/versions | ||
# create two copies of the documentaiton | ||
# 1. the frozen version, represented as vX.X in the version switcher | ||
docker build -t micm -f Dockerfile.docs . | ||
id=$(docker create micm) | ||
docker cp $id:/build/docs/sphinx tmpdocs | ||
docker rm -v $id | ||
version=$(sed -nr "s/^release = f'v(.+)\{suffix\}'.*$/\1/p" docs/source/conf.py) | ||
mv tmpdocs _build/html/versions/${version} | ||
# 2. stable, represented as vX.X (stable) in the version switcher | ||
# edit conf.py to produce a version string that looks like vX.X (stable) | ||
docker build -t micm -f Dockerfile.docs --build-arg SUFFIX=" (stable)" . | ||
id=$(docker create micm) | ||
docker cp $id:/build/docs/sphinx tmpdocs | ||
docker rm -v $id | ||
mv tmpdocs _build/html/versions/stable | ||
mv docs/switcher.json _build/html | ||
# Delete everything under _gh-pages/ that is from the | ||
# primary branch deployment. Excludes the other branches | ||
# _gh-pages/branch-* paths, and not including | ||
# _gh-pages itself. | ||
find _gh-pages/ -mindepth 1 ! -path '_gh-pages/branch*' ! -path '_gh-pages/versions*' -delete | ||
rsync -a _build/html/versions/stable/* _gh-pages/ | ||
# If a push and not on default branch, then copy the build to | ||
# _gh-pages/branch/$brname (transforming '/' into '--') | ||
- name: Build and copy documentation (branch) | ||
if: | | ||
contains(github.event_name, 'push') && | ||
!contains(github.ref, env.DEFAULT_BRANCH) | ||
run: | | ||
set -x | ||
docker build -t micm -f Dockerfile.docs . | ||
id=$(docker create micm) | ||
docker cp $id:/build/docs/sphinx tmpdocs | ||
docker rm -v $id | ||
brname="${{github.ref}}" | ||
brname="${brname##refs/heads/}" | ||
brdir=${brname//\//--} # replace '/' with '--' | ||
rm -rf _gh-pages/branch/${brdir} | ||
rsync -a tmpdocs/ _gh-pages/branch/${brdir} | ||
# Go through each branch in _gh-pages/branch/, if it's not a | ||
# ref, then delete it. | ||
- name: Delete old feature branches | ||
if: ${{ github.event_name == 'push' }} | ||
run: | | ||
set -x | ||
for brdir in `ls _gh-pages/branch/` ; do | ||
brname=${brdir//--/\/} # replace '--' with '/' | ||
if ! git show-ref remotes/origin/$brname ; then | ||
echo "Removing $brdir" | ||
rm -r _gh-pages/branch/$brdir/ | ||
fi | ||
done | ||
# Add the .nojekyll file | ||
- name: nojekyll | ||
if: ${{ github.event_name == 'push' }} | ||
run: | | ||
touch _gh-pages/.nojekyll | ||
# Deploy | ||
# https://github.com/peaceiris/actions-gh-pages | ||
- name: Deploy | ||
uses: peaceiris/actions-gh-pages@v3 | ||
if: ${{ github.event_name == 'push' }} | ||
with: | ||
publish_branch: gh-pages | ||
github_token: ${{ secrets.GITHUB_TOKEN }} | ||
publish_dir: _gh-pages/ | ||
force_orphan: true |
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 |
---|---|---|
|
@@ -4,4 +4,5 @@ | |
**/CMakeFiles/ | ||
doc/html/ | ||
doc/latex/ | ||
.vscode | ||
.vscode | ||
xcode/ |
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.