Skip to content

Commit e896aeb

Browse files
authored
Update CI workflows (#13)
* Update CI workflows * Documentation improvements * Limit CI testing to just Linux * Add Aqua * Self-test CI workflows
1 parent edf2a1b commit e896aeb

File tree

12 files changed

+103
-203
lines changed

12 files changed

+103
-203
lines changed

.github/workflows/CI.yml

Lines changed: 22 additions & 59 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
1+
---
12
name: CI
23
# Run on master, tags, or any pull request
34
on:
45
schedule:
5-
- cron: '0 2 * * *' # Daily at 2 AM UTC (8 PM CST)
6+
- cron: "0 2 * * *" # Daily at 2 AM UTC (8 PM CST)
67
push:
78
branches: [master]
89
tags: ["*"]
@@ -15,80 +16,42 @@ jobs:
1516
fail-fast: false
1617
matrix:
1718
version:
18-
- "1.0" # LTS
19+
- "min" # Earliest support version
1920
- "1" # Latest Release
2021
os:
2122
- ubuntu-latest
22-
- macOS-latest
23-
- windows-latest
2423
arch:
2524
- x64
26-
- x86
27-
exclude:
28-
# Test 32-bit only on Linux
29-
- os: macOS-latest
30-
arch: x86
31-
- os: windows-latest
32-
arch: x86
33-
include:
34-
# Add a 1.5 job because that's what Invenia actually uses
35-
- os: ubuntu-latest
36-
version: "1.5"
37-
arch: x64
3825
steps:
39-
- uses: actions/checkout@v2
40-
- uses: julia-actions/setup-julia@v1
26+
- uses: actions/checkout@v4
27+
- uses: julia-actions/setup-julia@v2
4128
with:
4229
version: ${{ matrix.version }}
4330
arch: ${{ matrix.arch }}
44-
- uses: actions/cache@v2
45-
env:
46-
cache-name: cache-artifacts
47-
with:
48-
path: ~/.julia/artifacts
49-
key: ${{ runner.os }}-${{ matrix.arch }}-test-${{ env.cache-name }}-${{ hashFiles('**/Project.toml') }}
50-
restore-keys: |
51-
${{ runner.os }}-${{ matrix.arch }}-test-${{ env.cache-name }}-
52-
${{ runner.os }}-${{ matrix.arch }}-test-
53-
${{ runner.os }}-${{ matrix.arch }}-
54-
${{ runner.os }}-
55-
- uses: julia-actions/julia-buildpkg@latest
56-
- uses: julia-actions/julia-runtest@latest
31+
- uses: julia-actions/cache@v2
32+
- uses: julia-actions/julia-buildpkg@v1
33+
- uses: julia-actions/julia-runtest@v1
5734
- uses: julia-actions/julia-processcoverage@v1
58-
- uses: codecov/codecov-action@v1
59-
with:
60-
file: lcov.info
61-
62-
slack:
63-
name: Notify Slack Failure
64-
needs: test
65-
runs-on: ubuntu-latest
66-
if: always() && github.event_name == 'schedule'
67-
steps:
68-
- uses: technote-space/workflow-conclusion-action@v2
69-
- uses: voxmedia/github-action-slack-notify-build@v1
70-
if: env.WORKFLOW_CONCLUSION == 'failure'
35+
- uses: codecov/codecov-action@v5
7136
with:
72-
channel: nightly-dev
73-
status: FAILED
74-
color: danger
75-
env:
76-
SLACK_BOT_TOKEN: ${{ secrets.DEV_SLACK_BOT_TOKEN }}
37+
files: lcov.info
7738

7839
docs:
7940
name: Documentation
8041
runs-on: ubuntu-latest
8142
steps:
82-
- uses: actions/checkout@v2
83-
- uses: julia-actions/setup-julia@v1
43+
- uses: actions/checkout@v4
44+
- uses: julia-actions/setup-julia@v2
45+
with:
46+
version: "1"
47+
- name: ainstall dependencies
48+
shell: julia --color=yes --project=docs {0}
49+
run: |
50+
using Pkg
51+
Pkg.develop(PackageSpec(path=pwd()))
52+
- name: Build docs
53+
uses: julia-actions/julia-docdeploy@v1
8454
with:
85-
version: '1'
86-
- run: |
87-
julia --project=docs -e '
88-
using Pkg
89-
Pkg.develop(PackageSpec(path=pwd()))
90-
Pkg.instantiate()
91-
include("docs/make.jl")'
55+
install-package: false # Avoid instantiating twice
9256
env:
9357
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
94-
DOCUMENTER_KEY: ${{ secrets.DOCUMENTER_KEY }}

.github/workflows/CompatHelper.yml

Lines changed: 22 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,33 @@
1+
---
12
name: CompatHelper
23
on:
4+
pull_request:
5+
paths:
6+
- ".github/workflows/CompatHelper.yml"
37
schedule:
4-
- cron: '0 0 * * *' # Everyday at midnight
8+
- cron: "0 0 * * *" # Everyday at midnight
59
workflow_dispatch:
610
jobs:
711
CompatHelper:
12+
permissions:
13+
contents: write
14+
pull-requests: write
815
runs-on: ubuntu-latest
916
steps:
10-
- name: Pkg.add("CompatHelper")
11-
run: julia -e 'using Pkg; Pkg.add("CompatHelper")'
12-
- name: CompatHelper.main()
17+
- uses: julia-actions/setup-julia@v2
18+
with:
19+
version: "1"
20+
- uses: julia-actions/cache@v2
21+
- name: Install CompatHelper
22+
shell: julia --color=yes {0}
23+
run: |
24+
using Pkg
25+
Pkg.add(PackageSpec(name="CompatHelper", version="3"))
26+
- name: Run CompatHelper
27+
shell: julia --color=yes {0}
28+
run: |
29+
using CompatHelper
30+
CompatHelper.main()
1331
env:
1432
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
1533
COMPATHELPER_PRIV: ${{ secrets.DOCUMENTER_KEY }}
16-
run: julia -e 'using CompatHelper; CompatHelper.main()'

.github/workflows/JuliaNightly.yml

Lines changed: 27 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,39 @@
1+
---
12
name: JuliaNightly
2-
# Nightly Scheduled Julia Nightly Run
33
on:
4+
pull_request:
5+
paths:
6+
- ".github/workflows/JuliaNightly.yml"
47
schedule:
5-
- cron: '0 2 * * *' # Daily at 2 AM UTC (8 PM CST)
8+
- cron: "0 2 * * *" # Daily at 2 AM UTC (8 PM CST)
69
jobs:
710
test:
8-
name: Julia Nightly - Ubuntu - x64
11+
name: Julia nightly - ubuntu-latest - x64
912
runs-on: ubuntu-latest
1013
steps:
11-
- uses: actions/checkout@v2
12-
- uses: julia-actions/setup-julia@v1
14+
- uses: actions/checkout@v4
15+
- uses: julia-actions/setup-julia@v2
1316
with:
1417
version: nightly
1518
arch: x64
16-
- uses: actions/cache@v2
17-
env:
18-
cache-name: julia-nightly-cache-artifacts
19-
with:
20-
path: ~/.julia/artifacts
21-
key: ${{ env.cache-name }}-${{ hashFiles('**/Project.toml') }}
22-
restore-keys: |
23-
${{ env.cache-name }}-
24-
- uses: julia-actions/julia-buildpkg@latest
25-
- uses: julia-actions/julia-runtest@latest
19+
- uses: julia-actions/cache@v2
20+
- uses: julia-actions/julia-buildpkg@v1
21+
- uses: julia-actions/julia-runtest@v1
2622
- uses: julia-actions/julia-processcoverage@v1
27-
- uses: codecov/codecov-action@v1
23+
- uses: codecov/codecov-action@v5
2824
with:
29-
file: lcov.info
25+
files: lcov.info
26+
27+
# Work around having GitHub suspend the scheduled workflow if there is no commit activity
28+
# for the past 60 days. As this repo doesn't get much activity beyond artifact updates
29+
# this can be quite annoying.
30+
keepalive:
31+
name: Keepalive
32+
runs-on: ubuntu-latest
33+
# These permissions are needed to:
34+
# - Keep the workflow alive: https://github.com/marketplace/actions/keepalive-workflow#github-api-keepalive-workflow---default-for-github-actions-users
35+
permissions:
36+
actions: write
37+
steps:
38+
- uses: actions/checkout@v4
39+
- uses: gautamkrishnar/keepalive-workflow@v2

.github/workflows/TagBot.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
---
12
name: TagBot
23
on:
34
issue_comment:
@@ -6,7 +7,7 @@ on:
67
workflow_dispatch:
78
jobs:
89
TagBot:
9-
if: github.event_name == 'workflow_dispatch' || github.actor == 'JuliaTagBot'
10+
if: ${{ github.event_name == 'workflow_dispatch' || github.actor == 'JuliaTagBot' }}
1011
runs-on: ubuntu-latest
1112
steps:
1213
- uses: JuliaRegistries/TagBot@v1

Project.toml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,15 @@ authors = ["Invenia Technical Computing Corporation"]
44
version = "0.1.1"
55

66
[compat]
7-
Documenter = "0.23, 0.24"
7+
Aqua = "0.8.11"
8+
Test = "1"
9+
YAML = "0.4"
810
julia = "1"
911

1012
[extras]
11-
Documenter = "e30172f5-a6a5-5a46-863b-614d45cd2de4"
13+
Aqua = "4c88cf16-eb10-579e-8560-4a9242c79595"
1214
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"
1315
YAML = "ddb6d928-2868-570f-bddf-ab3f9cf99eb6"
1416

1517
[targets]
16-
test = ["Documenter", "Test", "YAML"]
18+
test = ["Aqua", "Test", "YAML"]

docs/Manifest.toml

Lines changed: 0 additions & 97 deletions
This file was deleted.

docs/Project.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
11
[deps]
22
MultilineStrings = "1e8d2bf6-9821-4900-9a2f-4d87552df2bd"
33
Documenter = "e30172f5-a6a5-5a46-863b-614d45cd2de4"
4+
5+
[compat]
6+
Documenter = "1"

docs/make.jl

Lines changed: 7 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,18 @@
11
using MultilineStrings
22
using Documenter
33

4+
const IS_CI = get(ENV, "CI", nothing) == "true"
5+
46
makedocs(;
57
modules=[MultilineStrings],
6-
authors="Invenia Technical Computing Corporation",
7-
repo="https://github.com/JuliaStrings/MultilineStrings.jl/blob/{commit}{path}#L{line}",
8-
sitename="MultilineStrings.jl",
9-
format=Documenter.HTML(;
10-
prettyurls=get(ENV, "CI", "false") == "true",
11-
canonical="https://juliastrings.github.io/MultilineStrings.jl",
12-
assets=String[],
13-
),
8+
format=Documenter.HTML(prettyurls=IS_CI),
149
pages=[
1510
"Home" => "index.md",
1611
],
17-
strict=true,
12+
sitename="MultilineStrings.jl",
1813
checkdocs=:exports,
14+
linkcheck=true,
15+
doctest=true,
1916
)
2017

21-
deploydocs(;
22-
repo="github.com/JuliaStrings/MultilineStrings.jl",
23-
)
18+
IS_CI && deploydocs(; repo="github.com/JuliaStrings/MultilineStrings.jl")

docs/src/assets/logo-dark.png

-7.1 KB
Binary file not shown.

docs/src/assets/logo.png

-7.53 KB
Binary file not shown.

0 commit comments

Comments
 (0)