Skip to content

Commit

Permalink
Initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
schillic authored Aug 24, 2023
0 parents commit 9e6d5e8
Show file tree
Hide file tree
Showing 23 changed files with 536 additions and 0 deletions.
18 changes: 18 additions & 0 deletions .JuliaFormatter.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
style = "yas"
always_use_return = true
indent = 4
margin = 100
always_for_in = true
remove_extra_newlines = true
short_to_long_function_def = true
whitespace_in_kwargs = false
annotate_untyped_fields_with_any = true
format_docstrings = false
separate_kwargs_with_semicolon = true
surround_whereop_typeparameters = true
whitespace_ops_in_indices = true
align_assignment = true
align_conditional = true
align_pair_arrow = true
align_matrix = false
import_to_using = false
7 changes: 7 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates
version: 2
updates:
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "weekly"
21 changes: 21 additions & 0 deletions .github/workflows/CompatHelper.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: CompatHelper

on:
schedule:
- cron: '00 00 * * *'
workflow_dispatch:

jobs:
CompatHelper:
runs-on: ubuntu-latest
steps:
- uses: julia-actions/setup-julia@latest
with:
version: '1'
- name: Pkg.add("CompatHelper")
run: julia -e 'using Pkg; Pkg.add("CompatHelper")'
- name: CompatHelper.main()
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
COMPATHELPER_PRIV: ${{ secrets.DOCUMENTER_KEY }}
run: julia -e 'using CompatHelper; CompatHelper.main(; subdirs=["", "test"])'
16 changes: 16 additions & 0 deletions .github/workflows/TagBot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
name: TagBot

on:
issue_comment:
types:
- created
workflow_dispatch:

jobs:
TagBot:
if: github.event_name == 'workflow_dispatch' || github.actor == 'JuliaTagBot'
runs-on: ubuntu-latest
steps:
- uses: JuliaRegistries/TagBot@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
46 changes: 46 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
name: CI

on:
push:
paths-ignore:
- 'LICENSE'
- 'README.md'
branches:
- master

jobs:
test:
name: Julia ${{ matrix.version }} - ${{ matrix.os }} - ${{ matrix.arch }} - ${{ github.event_name }}
runs-on: ${{ matrix.os }}
if: "!contains(github.event.head_commit.message, 'skip ci')"
strategy:
fail-fast: false
matrix:
version:
- '1'
os:
- ubuntu-latest
arch:
- x64
env:
JULIA_PKG_SERVER: ''
steps:
- name: Check out repository
uses: actions/checkout@v3
- name: Set up Julia
uses: julia-actions/setup-julia@v1
with:
version: ${{ matrix.version }}
arch: ${{ matrix.arch }}
- name: Cache artifacts
uses: julia-actions/cache@v1
- name: Build package
uses: julia-actions/julia-buildpkg@v1
- name: Run tests
uses: julia-actions/julia-runtest@v1
- name: Process coverage
uses: julia-actions/julia-processcoverage@v1
- name: Upload coverage
uses: codecov/codecov-action@v3
with:
files: lcov.info
49 changes: 49 additions & 0 deletions .github/workflows/ci_PR.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
name: CI-PR

on:
pull_request:
paths-ignore:
- 'LICENSE'
- 'README.md'

jobs:
test:
name: Julia ${{ matrix.version }} - ${{ matrix.os }} - ${{ matrix.arch }} - ${{ github.event_name }}
runs-on: ${{ matrix.os }}
if: "!contains(github.event.head_commit.message, 'skip ci')"
strategy:
fail-fast: false
matrix:
version:
- '1'
os:
- ubuntu-latest
- windows-latest
arch:
- x64
include:
- version: '1.2' # test on oldest supported version
arch: x64
os: ubuntu-latest
env:
JULIA_PKG_SERVER: ''
steps:
- name: Check out repository
uses: actions/checkout@v3
- name: Set up Julia
uses: julia-actions/setup-julia@v1
with:
version: ${{ matrix.version }}
arch: ${{ matrix.arch }}
- name: Cache artifacts
uses: julia-actions/cache@v1
- name: Build package
uses: julia-actions/julia-buildpkg@v1
- name: Run tests
uses: julia-actions/julia-runtest@v1
- name: Process coverage
uses: julia-actions/julia-processcoverage@v1
- name: Upload coverage
uses: codecov/codecov-action@v3
with:
files: lcov.info
26 changes: 26 additions & 0 deletions .github/workflows/clean-gh-pages.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: Doc Preview Cleanup

on:
pull_request:
types: [closed]

jobs:
doc-preview-cleanup:
runs-on: ubuntu-latest
steps:
- name: Checkout gh-pages branch
uses: actions/checkout@v3
with:
ref: gh-pages
- name: Delete preview and history + push changes
run: |
if [ -d "previews/PR$PRNUM" ]; then
git config user.name "Documenter.jl"
git config user.email "[email protected]"
git rm -rf "previews/PR$PRNUM"
git commit -m "delete preview"
git branch gh-pages-new $(echo "delete history" | git commit-tree HEAD^{tree})
git push --force origin gh-pages-new:gh-pages
fi
env:
PRNUM: ${{ github.event.number }}
38 changes: 38 additions & 0 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: Documentation

on:
push:
paths-ignore:
- 'LICENSE'
- 'README.md'
branches:
- master
tags: '*'
pull_request:
paths-ignore:
- 'LICENSE'
- 'README.md'

jobs:
build:
runs-on: ubuntu-latest
env:
JULIA_PKG_SERVER: ''
steps:
- name: Check out repository
uses: actions/checkout@v3
- name: Set up Julia
uses: julia-actions/setup-julia@latest
with:
version: '1'
- name: Install dependencies
run: |
julia --project=docs/ -e 'using Pkg;
Pkg.develop(PackageSpec(path=pwd()));
Pkg.instantiate()'
- name: Build and deploy
env:
GKSwstype: nul # fix for Plots with GR backend
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # authentication with GitHub Actions token
DOCUMENTER_KEY: ${{ secrets.DOCUMENTER_KEY }} # authentication with SSH deploy key
run: julia --project=docs/ docs/make.jl
29 changes: 29 additions & 0 deletions .github/workflows/format.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: Format
on:
schedule:
- cron: '0 0 * * 6' # every Saturday at 0:00
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Install JuliaFormatter and format
run: |
julia -e 'import Pkg; Pkg.add("JuliaFormatter")'
julia -e 'using JuliaFormatter; format(".")'
# https://github.com/marketplace/actions/create-pull-request
# https://github.com/peter-evans/create-pull-request#reference-example
- name: Create Pull Request
id: cpr
uses: peter-evans/create-pull-request@v5
with:
token: ${{ secrets.GITHUB_TOKEN }}
commit-message: Format .jl files
title: 'Automatic JuliaFormatter.jl run'
branch: auto-juliaformatter-pr
delete-branch: true
- name: Check outputs
run: |
echo "Pull Request Number - ${{ steps.cpr.outputs.pull-request-number }}"
echo "Pull Request URL - ${{ steps.cpr.outputs.pull-request-url }}"
45 changes: 45 additions & 0 deletions .github/workflows/invalidations.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
# https://github.com/julia-actions/julia-invalidations
name: Invalidations

on:
pull_request:
paths-ignore:
- 'LICENSE'
- 'README.md'

concurrency:
# Skip intermediate builds: always.
# Cancel intermediate builds: always.
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
evaluate:
# Only run on PRs to the default branch.
# In the PR trigger above branches can be specified only explicitly whereas this check should work for master, main, or any other default branch
if: github.base_ref == github.event.repository.default_branch
runs-on: ubuntu-latest
steps:
- uses: julia-actions/setup-julia@v1
with:
version: '1'

- uses: actions/checkout@v3
- uses: julia-actions/julia-buildpkg@v1
- uses: julia-actions/julia-invalidations@v1
id: invs_pr

- uses: actions/checkout@v3
with:
ref: ${{ github.event.repository.default_branch }}
- uses: julia-actions/julia-buildpkg@v1
- uses: julia-actions/julia-invalidations@v1
id: invs_default

- name: Report invalidation counts
run: |
echo "Invalidations on default branch: ${{ steps.invs_default.outputs.total }} (${{ steps.invs_default.outputs.deps }} via deps)" >> $GITHUB_STEP_SUMMARY
echo "This branch: ${{ steps.invs_pr.outputs.total }} (${{ steps.invs_pr.outputs.deps }} via deps)" >> $GITHUB_STEP_SUMMARY
- name: Check if the PR does increase number of invalidations
if: steps.invs_pr.outputs.total > steps.invs_default.outputs.total
run: exit 1
21 changes: 21 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
*.DS_Store

*.jl.cov
*.jl.*.cov
*.jl.mem
coverage/

deps/deps.jl
deps/build.log
deps/downloads/
deps/usr/
deps/src/

docs/build/
docs/site/

.ipynb_checkpoints

.vscode

Manifest.toml
21 changes: 21 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2019 JuliaReach

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
8 changes: 8 additions & 0 deletions Project.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
name = "JuliaReachTemplatePkg"
uuid = "2b714139-d377-45b9-9f15-0355f7430025"
version = "0.1.0"

[deps]

[compat]
julia = "1"
Loading

0 comments on commit 9e6d5e8

Please sign in to comment.