Skip to content

Commit

Permalink
Merge pull request #157 from LilithHafner/lh/ci-and-docs
Browse files Browse the repository at this point in the history
Switch CI and doc building to github actions
  • Loading branch information
ViralBShah authored Jul 22, 2024
2 parents 5d704d2 + 8b4946d commit 3eadf91
Show file tree
Hide file tree
Showing 6 changed files with 106 additions and 90 deletions.
24 changes: 0 additions & 24 deletions .drone.jsonnet

This file was deleted.

33 changes: 0 additions & 33 deletions .drone.yml

This file was deleted.

96 changes: 96 additions & 0 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,96 @@
name: CI
on:
push:
branches:
- master
pull_request:
concurrency:
# Skip intermediate builds: always.
# Cancel intermediate builds: only if it is a pull request build.
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ startsWith(github.ref, 'refs/pull/') }}
jobs:
test:
name: Julia ${{ matrix.version }} - ${{ matrix.os }} - ${{ matrix.arch }} - ${{ github.event_name }}
runs-on: ${{ matrix.os }}
timeout-minutes: 60
permissions: # needed to allow julia-actions/cache to proactively delete old caches that it has created
actions: write
contents: read
strategy:
fail-fast: false
matrix:
version:
- '1.6'
- '1'
- 'pre'
os:
- ubuntu-latest
arch:
- x64
- x86
steps:
- uses: actions/checkout@v4
- uses: julia-actions/setup-julia@v2
with:
version: ${{ matrix.version }}
arch: ${{ matrix.arch }}
- uses: julia-actions/cache@v2
# - uses: julia-actions/julia-buildpkg@v1
# - uses: julia-actions/julia-runtest@v1
- run: sudo apt-get update
- run: sudo apt-get install -y xvfb xauth
- run: xvfb-run julia --project=. --check-bounds=yes --color=yes -e 'using InteractiveUtils; versioninfo(verbose=true); using Pkg; Pkg.build(); Pkg.test(coverage=true)'
- uses: julia-actions/julia-processcoverage@v1
- uses: codecov/codecov-action@v3
with:
files: lcov.info
docs:
name: Documentation
runs-on: ubuntu-latest
permissions:
actions: write # needed to allow julia-actions/cache to proactively delete old caches that it has created
contents: write
statuses: write
steps:
- uses: actions/checkout@v4
- uses: julia-actions/setup-julia@v2
with:
version: '1'
- uses: julia-actions/cache@v2
- name: Configure doc environment
shell: julia --project=docs --color=yes {0}
run: |
using Pkg
Pkg.develop(PackageSpec(path=pwd()))
Pkg.instantiate()
- uses: julia-actions/julia-buildpkg@v1
- run: sudo apt-get update
- run: sudo apt-get install -y xvfb xauth
- name: Install GitHubActions.jl in its own (shared) environment
run: |
using Pkg
Pkg.activate("docs-logger-env"; shared=true)
Pkg.add(Pkg.PackageSpec(name="GitHubActions", version="0.1"))
shell: julia --color=yes {0}
- name: Build the documentation
run: |
# The Julia command that will be executed
xvfb-run -a julia --color=yes --project=docs/ -e '
@eval Module() begin
push!(LOAD_PATH, "@docs-logger-env") # access GitHubActions.jl
import Logging, GitHubActions
Logging.global_logger(GitHubActions.GitHubActionsLogger())
pop!(LOAD_PATH)
end
include("docs/make.jl")'
shell: bash
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Run doctests
shell: xvfb-run -a julia --project=docs --color=yes {0}
run: |
using Documenter: DocMeta, doctest
using Tk
DocMeta.setdocmeta!(Tk, :DocTestSetup, :(using Tk); recursive=true)
doctest(Tk)
26 changes: 0 additions & 26 deletions .travis.yml

This file was deleted.

6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,18 @@

| **Documentation** | **Build Status** |
|:-------------------------------------------------------------------------------:|:-----------------------------------------------------------------------------------------------:|
| [![][docs-stable-img]][docs-stable-url] | [![][travis-img]][travis-url] [![][appveyor-img]][appveyor-url] [![][drone-img]][drone-url] |
| [![][docs-dev-img]][docs-dev-url] | [![][travis-img]][travis-url] [![][appveyor-img]][appveyor-url] [![][drone-img]][drone-url] |


[contrib-url]: https://juliadocs.github.io/Documenter.jl/dev/contributing/
[discourse-tag-url]: https://discourse.julialang.org/tags/documenter
[gitter-url]: https://gitter.im/juliadocs/users

[docs-dev-img]: https://img.shields.io/badge/docs-dev-blue.svg
[docs-dev-url]: https://https://pkg.julialang.org/docs/Tk
[docs-dev-url]: https://juliagraphics.github.io/Tk.jl/dev

[docs-stable-img]: https://img.shields.io/badge/docs-stable-blue.svg
[docs-stable-url]: https://juliahub.com/docs/Tk/
[docs-stable-url]: https://juliagraphics.github.io/Tk.jl

[travis-img]: https://travis-ci.org/JuliaGraphics/Tk.jl.svg?branch=master
[travis-url]: https://travis-ci.org/JuliaGraphics/Tk.jl
Expand Down
11 changes: 7 additions & 4 deletions docs/make.jl
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
using Documenter, Literate
using Tk

Literate.markdown("../examples/manipulate.jl", "src/examples"; documenter=true)
Literate.markdown("../examples/process.jl", "src/examples"; documenter=true)
Literate.markdown("../examples/sketch.jl", "src/examples"; documenter=true)
Literate.markdown("../examples/test.jl", "src/examples"; documenter=true)
dir = @__DIR__
Literate.markdown(joinpath(dirname(dir), "examples", "manipulate.jl"), joinpath(dir, "src", "examples"); documenter=true)
Literate.markdown(joinpath(dirname(dir), "examples", "process.jl"), joinpath(dir, "src", "examples"); documenter=true)
Literate.markdown(joinpath(dirname(dir), "examples", "sketch.jl"), joinpath(dir, "src", "examples"); documenter=true)
Literate.markdown(joinpath(dirname(dir), "examples", "test.jl"), joinpath(dir, "src", "examples"); documenter=true)

makedocs(modules = [Tk],
sitename = "Tk.jl",
Expand All @@ -18,3 +19,5 @@ makedocs(modules = [Tk],
],
"API Reference" => "api.md"
])

deploydocs(repo = "github.com/LilithHafner/Tk.jl.git")

0 comments on commit 3eadf91

Please sign in to comment.