Skip to content

Commit

Permalink
Merge pull request #55 from ProjectTorreyPines/compat
Browse files Browse the repository at this point in the history
Added Compat and CompatHelper CI
  • Loading branch information
anchal-physics authored Jul 13, 2024
2 parents 692a129 + ff08fcb commit 92c6c49
Show file tree
Hide file tree
Showing 5 changed files with 77 additions and 10 deletions.
22 changes: 22 additions & 0 deletions .github/workflows/compat_helper.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: CompatHelper
on:
schedule:
- cron: '37 3 * * *'
workflow_dispatch:
jobs:
CompatHelper:
runs-on: ubuntu-latest
steps:
- name: "Add the FuseRegistry via Git"
run: |
using Pkg
Pkg.Registry.add(RegistrySpec(url="https://github.com/ProjectTorreyPines/FuseRegistry.jl.git"))
Pkg.Registry.add("General")
shell: julia --color=yes {0}
- 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(;master_branch="dev", pr_title_prefix="[ci skip] ")'
11 changes: 9 additions & 2 deletions .github/workflows/format_check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,21 @@ name: Format Check
on:
push:
branches: ["master", "dev", "format"]
paths:
- '.github/workflows/format_check.yml'
- '**.jl'
pull_request:
branches: ["master", "dev"]
paths:
- '.github/workflows/format_check.yml'
- '**.jl'
jobs:
check:
runs-on: ${{ matrix.os }}
strategy:
matrix:
julia-version: [1.9.3]
julia-arch: [x86]
julia-version: [1.x]
julia-arch: [x64]
os: [ubuntu-latest]
steps:
- uses: julia-actions/setup-julia@latest
Expand All @@ -23,6 +29,7 @@ jobs:
run: |
julia -e 'using Pkg; Pkg.add(PackageSpec(name="JuliaFormatter"))'
julia -e 'using JuliaFormatter; format(".", verbose=true)'
- uses: julia-actions/cache@v1
- name: Format check
run: |
julia -e '
Expand Down
20 changes: 16 additions & 4 deletions .github/workflows/make_docs.yml
Original file line number Diff line number Diff line change
@@ -1,15 +1,19 @@
name: Make Docs
on:
pull_request:
branches: ["master"]
branches: ["master", "dev"]
paths:
- '.github/workflows/make_docs.yml'
- 'src/**'
- 'docs/**'
push:
branches:
- master
- dev
- docs
paths:
- '.github/workflows/make_docs.yml'
- 'src/'
- 'src/**'
- 'docs/**'
tags: '*'
workflow_dispatch:
Expand All @@ -20,14 +24,22 @@ jobs:
contents: write
statuses: write
name: Documentation
runs-on: ubuntu-latest
runs-on: ${{ matrix.os }}
strategy:
matrix:
julia-version: [1.x]
julia-arch: [x64]
os: [ubuntu-latest]
steps:
- uses: actions/checkout@v4
- uses: julia-actions/setup-julia@latest
- uses: julia-actions/cache@v1
- name: "Add the FuseRegistry via Git"
run: |
julia --project=docs/ -e 'using Pkg; Pkg.Registry.add(RegistrySpec(url="https://github.com/ProjectTorreyPines/FuseRegistry.jl.git")); Pkg.Registry.add("General")'
- name: Install dependencies
run: |
julia --project=docs/ -e 'using Pkg; Pkg.add(; url="https://github.com/ProjectTorreyPines/IMASDD.jl.git"); Pkg.develop(PackageSpec(path=pwd())); Pkg.instantiate()'
julia --project=docs/ -e 'using Pkg; Pkg.develop(PackageSpec(path=pwd())); Pkg.instantiate()'
- name: Build and deploy
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Expand Down
23 changes: 19 additions & 4 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,30 @@ name: Test
on:
push:
branches: ["master", "dev", "autotest"]
paths:
- '.github/workflows/test.yml'
- 'src/**'
- 'test/**'
- 'Project.toml'
pull_request:
branches: ["master", "dev"]
paths:
- '.github/workflows/test.yml'
- 'src/**'
- 'test/**'
- 'Project.toml'

permissions:
actions: write
contents: read

jobs:
test:
runs-on: ${{ matrix.os }}
strategy:
matrix:
julia-version: [1.9.3]
julia-arch: [x86]
julia-version: [1.x]
julia-arch: [x64]
os: [ubuntu-latest]
steps:
- uses: julia-actions/setup-julia@latest
Expand All @@ -32,9 +47,9 @@ jobs:
run: |
dvc pull
- uses: julia-actions/cache@v1
- name: Install dependencies
- name: "Add the FuseRegistry via Git"
run: |
julia --project=. -e 'using Pkg; Pkg.rm(["IMASDD"]); Pkg.add(url="git@github.com:ProjectTorreyPines/IMASDD.jl.git", rev="master")'
julia --project=. -e 'using Pkg; Pkg.Registry.add(RegistrySpec(url="https://github.com/ProjectTorreyPines/FuseRegistry.jl.git")); Pkg.Registry.add("General")'
- uses: julia-actions/julia-runtest@v1
# Not set up yet
# - uses: julia-actions/julia-processcoverage@v1
Expand Down
11 changes: 11 additions & 0 deletions Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,14 @@ RecipesBase = "3cdcf5f2-1ef4-517c-9805-6587b60abb01"
StaticArrays = "90137ffa-7385-5640-81b9-e52037218182"
Statistics = "10745b16-79ce-11e8-11f9-7d13ad32a3b2"
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"

[compat]
ArgParse = "1"
ColorSchemes = "3"
IMASDD = "0.1"
Interpolations = "0.15"
NearestNeighbors = "0.4"
RecipesBase = "1"
StaticArrays = "1"
Statistics = "1"
julia = ">= 1.10"

0 comments on commit 92c6c49

Please sign in to comment.