Skip to content

Commit

Permalink
Setup CI and documentation build (#1)
Browse files Browse the repository at this point in the history
  • Loading branch information
vchuravy authored Mar 29, 2024
1 parent 308a47f commit aaca7cd
Show file tree
Hide file tree
Showing 8 changed files with 59 additions and 350 deletions.
32 changes: 0 additions & 32 deletions .appveyor.yml

This file was deleted.

35 changes: 21 additions & 14 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ jobs:
fail-fast: false
matrix:
version:
- '1.8'
- 'nightly'
- '1.9'
- '1.10'
os:
- ubuntu-latest
arch:
Expand All @@ -31,15 +31,6 @@ jobs:
version: ${{ matrix.version }}
arch: ${{ matrix.arch }}
- uses: julia-actions/cache@v1
- uses: julia-actions/julia-buildpkg@v1
- uses: julia-actions/julia-runtest@v1
- uses: julia-actions/julia-processcoverage@v1
- uses: codecov/codecov-action@v2
with:
files: lcov.info
- uses: julia-actions/julia-uploadcoveralls@v1
env:
COVERALLS_TOKEN: ${{ secrets.COVERALLS_TOKEN }}
- name: add CESMIX registry
run: |
julia -e '
Expand All @@ -48,7 +39,23 @@ jobs:
Pkg.Registry.add(RegistrySpec(url = "https://github.com/cesmix-mit/CESMIX.git"))
Pkg.Registry.add(RegistrySpec(url = "https://github.com/JuliaMolSim/MolSim.git"))
Pkg.Registry.add(RegistrySpec(url = "https://github.com/ACEsuit/ACEregistry"))
Pkg.develop(; url = "https://github.com/joannajzou/ActiveSubspaces.jl")
'
shell: bash
shell: bash
- name: add dependencies
run: |
julia --project=. -e '
using Pkg
Pkg.add([
PackageSpec(;url="https://github.com/joannajzou/ActiveSubspaces.jl"),
])
'
shell: bash
- uses: julia-actions/julia-buildpkg@v1
- uses: julia-actions/julia-runtest@v1
- uses: julia-actions/julia-processcoverage@v1
- uses: codecov/codecov-action@v2
with:
files: lcov.info
# - uses: julia-actions/julia-uploadcoveralls@v1
# env:
# COVERALLS_TOKEN: ${{ secrets.COVERALLS_TOKEN }}
17 changes: 11 additions & 6 deletions .github/workflows/Documentation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
- uses: actions/checkout@v4
- uses: julia-actions/setup-julia@v1
with:
version: '1.8'
version: '1'
- uses: julia-actions/cache@v1
- name: add CESMIX registry
run: |
Expand All @@ -27,15 +27,20 @@ jobs:
Pkg.Registry.add(RegistrySpec(url = "https://github.com/cesmix-mit/CESMIX.git"))
Pkg.Registry.add(RegistrySpec(url = "https://github.com/JuliaMolSim/MolSim.git"))
Pkg.Registry.add(RegistrySpec(url = "https://github.com/ACEsuit/ACEregistry"))
Pkg.develop(; url = "https://github.com/joannajzou/ActiveSubspaces.jl")
'
shell: bash
- name: Install dependencies
run: julia --project=docs/ -e 'using Pkg; Pkg.develop(PackageSpec(path=pwd())); Pkg.instantiate()'
run: |
julia --project=docs/ -e '
using Pkg
Pkg.add([
PackageSpec(;url="https://github.com/joannajzou/ActiveSubspaces.jl"),
])
Pkg.develop(PackageSpec(path=pwd()))
Pkg.instantiate()
'
- name: Build and deploy
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # If authenticating with GitHub Actions token
DOCUMENTER_KEY: ${{ secrets.DOCUMENTER_KEY }} # If authenticating with SSH deploy key
run: julia --project=docs/ docs/make.jl
run: julia --project=docs/ docs/make.jl
26 changes: 26 additions & 0 deletions .github/workflows/PreviewCleanup.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@v2
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 }}
31 changes: 0 additions & 31 deletions .travis.yml

This file was deleted.

Loading

0 comments on commit aaca7cd

Please sign in to comment.