[ITensors] Extension implementing VectorInterface.jl
for ITensors
#62
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
name: Run ITensorTDVP tests from comment trigger | |
# https://dev.to/zirkelc/trigger-github-workflow-for-comment-on-pull-request-45l2 | |
on: | |
issue_comment: | |
types: [created] | |
jobs: | |
deploy: | |
name: Deploy | |
if: github.event.issue.pull_request && contains(github.event.comment.body, '[test ITensorTDVP]') | |
runs-on: ${{ matrix.os }} | |
env: | |
JULIA_NUM_THREADS: ${{ matrix.threads }} | |
strategy: | |
matrix: | |
version: | |
- '1' | |
os: | |
- ubuntu-latest | |
threads: | |
- '2' | |
arch: | |
- x64 | |
steps: | |
- name: Get PR branch | |
uses: xt0rted/pull-request-comment-branch@v1 | |
id: comment-branch | |
- name: Set latest commit status as pending | |
uses: myrotvorets/set-commit-status-action@master | |
with: | |
sha: ${{ steps.comment-branch.outputs.head_sha }} | |
token: ${{ secrets.GITHUB_TOKEN }} | |
status: pending | |
- name: Checkout PR branch | |
uses: actions/checkout@v3 | |
with: | |
# https://github.com/actions/checkout/issues/331#issuecomment-1438220926 | |
ref: refs/pull/${{ github.event.issue.number }}/head | |
- name: Setup Node.js 16 | |
uses: actions/setup-node@v3 | |
with: | |
node-version: 16 | |
- uses: julia-actions/setup-julia@latest | |
with: | |
version: ${{ matrix.version }} | |
arch: ${{ matrix.arch }} | |
- name: Install Julia dependencies | |
shell: julia --project=monorepo {0} | |
run: | | |
using Pkg; | |
Pkg.add("ITensorTDVP"); | |
Pkg.test("ITensorTDVP"); | |
- name: Set latest commit status as ${{ job.status }} | |
uses: myrotvorets/set-commit-status-action@master | |
if: always() | |
with: | |
sha: ${{ steps.comment-branch.outputs.head_sha }} | |
token: ${{ secrets.GITHUB_TOKEN }} | |
status: ${{ job.status }} | |
- name: Add comment to PR | |
uses: actions/github-script@v6 | |
if: always() | |
with: | |
script: | | |
const name = '${{ github.workflow }}'; | |
const url = '${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}'; | |
const success = '${{ job.status }}' === 'success'; | |
const body = `${name}: ${success ? 'succeeded ✅' : 'failed ❌'}\n${url}`; | |
await github.rest.issues.createComment({ | |
issue_number: context.issue.number, | |
owner: context.repo.owner, | |
repo: context.repo.repo, | |
body: body | |
}) |