Skip to content

Commit

Permalink
Merge branch 'master' into develop
Browse files Browse the repository at this point in the history
  • Loading branch information
mofeing authored Nov 12, 2023
2 parents c8669df + ad199f7 commit 13742fb
Show file tree
Hide file tree
Showing 6 changed files with 99 additions and 3 deletions.
1 change: 1 addition & 0 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -102,3 +102,4 @@ jobs:
- uses: codecov/codecov-action@v3
with:
files: lcov.info
fail_ci_if_error: true
2 changes: 1 addition & 1 deletion .github/workflows/Documenter.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: Documenter
on:
push:
branches: [master,develop]
branches: [develop]
tags: [v*]
pull_request:
workflow_dispatch:
Expand Down
42 changes: 42 additions & 0 deletions .github/workflows/format-check.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: format-check

on:
push:
branches:
- 'master'
- 'develop'
tags: '*'
pull_request:

jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
version:
- '1.9'
os:
- ubuntu-latest
arch:
- x64
steps:
- uses: actions/checkout@v3
- uses: julia-actions/setup-julia@v1
with:
version: ${{ matrix.version }}
arch: ${{ matrix.arch }}
- name: Install JuliaFormatter.jl
run: julia -e 'using Pkg; Pkg.add(PackageSpec(name="JuliaFormatter"))'
- name: Format code
run: julia -e 'using JuliaFormatter; format(".", verbose=true)'
- name: Format check
run: |
julia -e '
out = Cmd(`git diff --name-only`) |> read |> String
if out == ""
exit(0)
else
@error "Some files have not been formatted !!!"
write(stdout, out)
exit(1)
end'
52 changes: 52 additions & 0 deletions .github/workflows/format-pr.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
name: format-pr
on:
schedule:
- cron: '0 0 * * *'
workflow_dispatch:

jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
branch:
- master
- develop

steps:
- uses: julia-actions/setup-julia@v1
with:
version: '1.9'

- uses: actions/checkout@v3
with:
ref: ${{ matrix.branch }}

- name: Install JuliaFormatter.jl
shell: julia --color=yes {0}
run: |
import Pkg
Pkg.add("JuliaFormatter")
- name: Format code
shell: julia --color=yes {0}
run: |
using JuliaFormatter
format(".")
- name: Create Pull Request
id: cpr
uses: peter-evans/create-pull-request@v3
with:
token: ${{ secrets.GITHUB_TOKEN }}
commit-message: Format code
title: 'Format code of branch "${{ matrix.branch }}"'
branch: format-${{ matrix.branch }}
delete-branch: true
labels: format
reviewers: mofeing

- name: Check outputs
run: |
echo "Pull Request Number - ${{ steps.cpr.outputs.pull-request-number }}"
echo "Pull Request URL - ${{ steps.cpr.outputs.pull-request-url }}"
2 changes: 1 addition & 1 deletion Project.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name = "Tenet"
uuid = "85d41934-b9cd-44e1-8730-56d86f15f3ec"
authors = ["Sergio Sánchez Ramírez <sergio.sanchez.ramirez@bsc.es>"]
version = "0.2.0"
version = "0.3.0"

[deps]
Combinatorics = "861a8166-3701-5b0c-9a16-15d98fcdc6aa"
Expand Down
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@
[![codecov](https://codecov.io/github/bsc-quantic/Tenet.jl/branch/master/graph/badge.svg?token=011276A85K)](https://codecov.io/github/bsc-quantic/Tenet.jl)
[![Aqua QA](https://raw.githubusercontent.com/JuliaTesting/Aqua.jl/master/badge.svg)](https://github.com/JuliaTesting/Aqua.jl)
[![Registry](https://badgen.net/badge/registry/bsc-quantic/purple)](https://github.com/bsc-quantic/Registry)
[![Documentation: dev](https://img.shields.io/badge/docs-dev-blue.svg)](https://bsc-quantic.github.io/Tenet.jl/)
[![Documentation: stable](https://img.shields.io/badge/docs-stable-blue.svg)](https://bsc-quantic.github.io/Tenet.jl/)
[![Documentation: dev](https://img.shields.io/badge/docs-dev-blue.svg)](https://bsc-quantic.github.io/Tenet.jl/dev/)

A Julia library for **Ten**sor **Net**works. `Tenet` can be executed both at local environments and on large supercomputers. Its goals are,

Expand Down

0 comments on commit 13742fb

Please sign in to comment.