Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Switch CI and doc building to github actions #157

Merged
merged 7 commits into from
Jul 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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")
Loading