Skip to content

Commit 1613073

Browse files
committed
Require Julia v1.6, update CI
1 parent 866827d commit 1613073

13 files changed

+137
-70
lines changed

.github/workflows/CompatHelper.yml

+34-9
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,45 @@
11
name: CompatHelper
2-
32
on:
43
schedule:
5-
- cron: '00 00 * * *'
6-
push:
7-
branches:
8-
- actions/trigger/CompatHelper
4+
- cron: 0 0 * * *
95
workflow_dispatch:
6+
permissions:
7+
contents: write
8+
pull-requests: write
109
jobs:
1110
CompatHelper:
1211
runs-on: ubuntu-latest
1312
steps:
14-
- name: Pkg.add("CompatHelper")
15-
run: julia -e 'using Pkg; Pkg.add("CompatHelper")'
16-
- name: CompatHelper.main()
13+
- name: Check if Julia is already available in the PATH
14+
id: julia_in_path
15+
run: which julia
16+
continue-on-error: true
17+
- name: Install Julia, but only if it is not already available in the PATH
18+
uses: julia-actions/setup-julia@v2
19+
with:
20+
version: '1'
21+
arch: ${{ runner.arch }}
22+
if: steps.julia_in_path.outcome != 'success'
23+
- name: "Add the General registry via Git"
24+
run: |
25+
import Pkg
26+
ENV["JULIA_PKG_SERVER"] = ""
27+
Pkg.Registry.add("General")
28+
shell: julia --color=yes {0}
29+
- name: "Install CompatHelper"
30+
run: |
31+
import Pkg
32+
name = "CompatHelper"
33+
uuid = "aa819f21-2bde-4658-8897-bab36330d9b7"
34+
version = "3"
35+
Pkg.add(; name, uuid, version)
36+
shell: julia --color=yes {0}
37+
- name: "Run CompatHelper"
38+
run: |
39+
import CompatHelper
40+
CompatHelper.main()
41+
shell: julia --color=yes {0}
1742
env:
1843
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
1944
COMPATHELPER_PRIV: ${{ secrets.DOCUMENTER_KEY }}
20-
run: julia -e 'using CompatHelper; CompatHelper.main()'
45+
# COMPATHELPER_PRIV: ${{ secrets.COMPATHELPER_PRIV }}

.github/workflows/TagBot.yml

+5
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,11 @@ on:
44
types:
55
- created
66
workflow_dispatch:
7+
inputs:
8+
lookback:
9+
default: 3
10+
permissions:
11+
contents: write
712
jobs:
813
TagBot:
914
if: github.event_name == 'workflow_dispatch' || github.actor == 'JuliaTagBot'

.github/workflows/ci.yml

+34-41
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
name: CI
22

3+
env:
4+
JULIA_NUM_THREADS: 2
35
on:
46
push:
57
branches:
@@ -10,6 +12,12 @@ on:
1012
pull_request:
1113
release:
1214

15+
concurrency:
16+
# Skip intermediate builds: always.
17+
# Cancel intermediate builds: only if it is a pull request build.
18+
group: ${{ github.workflow }}-${{ github.ref }}
19+
cancel-in-progress: ${{ startsWith(github.ref, 'refs/pull/') }}
20+
1321
jobs:
1422
test:
1523
name: Julia ${{ matrix.version }} - ${{ matrix.os }} - ${{ matrix.arch }} - ${{ github.event_name }}
@@ -19,68 +27,53 @@ jobs:
1927
fail-fast: false
2028
matrix:
2129
version:
22-
- '1.0'
30+
- '1.6'
2331
- '1'
2432
- 'nightly'
2533
os:
2634
- ubuntu-latest
27-
- macOS-latest
28-
- windows-latest
2935
arch:
3036
- x64
31-
- x86
32-
exclude:
33-
# 32-bit Julia binaries are not available on macOS
34-
- os: macOS-latest
35-
arch: x86
36-
- os: windows-latest
37-
arch: x86
38-
- version: nightly
37+
include:
38+
- version: 1
39+
os: ubuntu-latest
3940
arch: x86
41+
- version: 1
42+
os: macOS-latest
43+
arch: x64
44+
- version: 1
45+
os: windows-latest
46+
arch: x64
4047
steps:
41-
- uses: actions/checkout@v2
42-
- uses: julia-actions/setup-julia@latest
48+
- uses: actions/checkout@v4
49+
- uses: julia-actions/setup-julia@v2
4350
with:
4451
version: ${{ matrix.version }}
4552
arch: ${{ matrix.arch }}
46-
- name: Cache artifacts
47-
uses: actions/cache@v2
48-
env:
49-
cache-name: cache-artifacts
53+
- uses: julia-actions/cache@v1
54+
- uses: julia-actions/julia-buildpkg@v1
55+
- uses: julia-actions/julia-runtest@v1
5056
with:
51-
path: ~/.julia/artifacts
52-
key: ${{ runner.os }}-test-${{ env.cache-name }}-${{ hashFiles('**/Project.toml') }}
53-
restore-keys: |
54-
${{ runner.os }}-test-${{ env.cache-name }}-
55-
${{ runner.os }}-test-
56-
${{ runner.os }}-
57-
- uses: julia-actions/julia-buildpkg@latest
58-
- uses: julia-actions/julia-runtest@latest
57+
coverage: ${{ matrix.version == '1' && matrix.os == 'ubuntu-latest' && matrix.arch == 'x64' }}
5958
- uses: julia-actions/julia-processcoverage@v1
60-
- uses: codecov/codecov-action@v1
59+
if: matrix.version == '1' && matrix.os == 'ubuntu-latest' && matrix.arch == 'x64'
60+
- uses: codecov/codecov-action@v4
61+
if: matrix.version == '1' && matrix.os == 'ubuntu-latest' && matrix.arch == 'x64'
6162
with:
63+
fail_ci_if_error: true
64+
token: ${{ secrets.CODECOV_TOKEN }}
6265
file: lcov.info
6366
docs:
6467
name: Documentation
6568
runs-on: ubuntu-latest
6669
steps:
67-
- uses: actions/checkout@v2
68-
- uses: julia-actions/setup-julia@latest
70+
- uses: actions/checkout@v4
71+
- uses: julia-actions/setup-julia@v2
6972
with:
7073
version: '1'
71-
- name: Cache artifacts
72-
uses: actions/cache@v2
73-
env:
74-
cache-name: cache-artifacts
75-
with:
76-
path: ~/.julia/artifacts
77-
key: ${{ runner.os }}-test-${{ env.cache-name }}-${{ hashFiles('**/docs/Project.toml') }}
78-
restore-keys: |
79-
${{ runner.os }}-test-${{ env.cache-name }}-
80-
${{ runner.os }}-test-
81-
${{ runner.os }}-
82-
- uses: julia-actions/julia-buildpkg@latest
83-
- uses: julia-actions/julia-docdeploy@latest
74+
- uses: julia-actions/cache@v1
75+
- uses: julia-actions/julia-buildpkg@v1
76+
- uses: julia-actions/julia-docdeploy@v1
8477
env:
8578
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
8679
# Needed due to https://github.com/JuliaDocs/Documenter.jl/issues/1177

Project.toml

+2-7
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,5 @@ version = "0.4.3"
66
Distributed = "8ba89e20-285c-5b6f-9357-94700520ee1b"
77

88
[compat]
9-
julia = "1"
10-
11-
[extras]
12-
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"
13-
14-
[targets]
15-
test = ["Test"]
9+
Distributed = "1"
10+
julia = "1.6"

README.md

+1
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
[![License](http://img.shields.io/badge/license-MIT-brightgreen.svg?style=flat)](LICENSE.md)
66
[![Build Status](https://github.com/oschulz/ParallelProcessingTools.jl/workflows/CI/badge.svg?branch=main)](https://github.com/oschulz/ParallelProcessingTools.jl/actions?query=workflow%3ACI)
77
[![Codecov](https://codecov.io/gh/oschulz/ParallelProcessingTools.jl/branch/main/graph/badge.svg)](https://codecov.io/gh/oschulz/ParallelProcessingTools.jl)
8+
[![Aqua QA](https://raw.githubusercontent.com/JuliaTesting/Aqua.jl/master/badge.svg)](https://github.com/JuliaTesting/Aqua.jl)
89

910
This Julia package provides some tools to ease multithreaded and distributed programming, especially for more complex use cases and when using multiple processes with multiple threads on each process. It also provides functions and macros designed to ease the transition to the new multi-threading model introduced in Julia v1.3.
1011

docs/Project.toml

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
[deps]
2+
Distributed = "8ba89e20-285c-5b6f-9357-94700520ee1b"
23
Documenter = "e30172f5-a6a5-5a46-863b-614d45cd2de4"
34
Markdown = "d6f4376e-aef5-505a-96c1-9c027394607a"
45

56
[compat]
6-
Documenter = "~0.26"
7+
Documenter = "1"

docs/make.jl

+10-2
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,14 @@
77
using Documenter
88
using ParallelProcessingTools
99

10+
# Doctest setup
11+
DocMeta.setdocmeta!(
12+
ParallelProcessingTools,
13+
:DocTestSetup,
14+
:(using ParallelProcessingTools);
15+
recursive=true,
16+
)
17+
1018
makedocs(
1119
sitename = "ParallelProcessingTools",
1220
modules = [ParallelProcessingTools],
@@ -20,8 +28,8 @@ makedocs(
2028
"LICENSE" => "LICENSE.md",
2129
],
2230
doctest = ("fixdoctests" in ARGS) ? :fix : true,
23-
linkcheck = ("linkcheck" in ARGS),
24-
strict = !("nonstrict" in ARGS),
31+
linkcheck = !("nonstrict" in ARGS),
32+
warnonly = ("nonstrict" in ARGS),
2533
)
2634

2735
deploydocs(

docs/src/api.md

+7-7
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
# API
22

3-
```@meta
4-
DocTestSetup = quote
5-
using ParallelProcessingTools
6-
end
3+
## Modules
4+
5+
```@index
6+
Order = [:module]
77
```
88

9-
## Types
9+
## Types and constants
1010

1111
```@index
12-
Order = [:type]
12+
Order = [:type, :constant]
1313
```
1414

1515
## Functions and macros
@@ -22,5 +22,5 @@ Order = [:macro, :function]
2222

2323
```@autodocs
2424
Modules = [ParallelProcessingTools]
25-
Order = [:type, :macro, :function]
25+
Order = [:module, :type, :constant, :macro, :function]
2626
```

test/Project.toml

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
[deps]
2+
Aqua = "4c88cf16-eb10-579e-8560-4a9242c79595"
3+
Distributed = "8ba89e20-285c-5b6f-9357-94700520ee1b"
4+
Documenter = "e30172f5-a6a5-5a46-863b-614d45cd2de4"
5+
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"
6+
7+
[compat]
8+
Documenter = "1"

test/REQUIRE

-2
This file was deleted.

test/runtests.jl

+5-1
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,16 @@
11
# This file is a part of ParallelProcessingTools.jl, licensed under the MIT License (MIT).
22

33
import Test
4+
45
Test.@testset "Package ParallelProcessingTools" begin
56
@info "Testing with $(Base.Threads.nthreads()) Julia threads."
67

8+
include("test_aqua.jl")
79
include("test_threadsafe.jl")
810
include("test_threadlocal.jl")
911
include("test_workpartition.jl")
1012
include("test_onthreads.jl")
1113
include("test_onprocs.jl")
12-
end
14+
include("test_docs.jl")
15+
end # testset
16+

test/test_aqua.jl

+16
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# This file is a part of ParallelProcessingTools.jl, licensed under the MIT License (MIT).
2+
3+
import Test
4+
import Aqua
5+
import ParallelProcessingTools
6+
7+
Test.@testset "Package ambiguities" begin
8+
Test.@test isempty(Test.detect_ambiguities(ParallelProcessingTools))
9+
end # testset
10+
11+
Test.@testset "Aqua tests" begin
12+
Aqua.test_all(
13+
ParallelProcessingTools,
14+
ambiguities = true
15+
)
16+
end # testset

test/test_docs.jl

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# This file is a part of ParallelProcessingTools.jl, licensed under the MIT License (MIT).
2+
3+
using Test
4+
using ParallelProcessingTools
5+
import Documenter
6+
7+
Documenter.DocMeta.setdocmeta!(
8+
ParallelProcessingTools,
9+
:DocTestSetup,
10+
:(using ParallelProcessingTools);
11+
recursive=true,
12+
)
13+
Documenter.doctest(ParallelProcessingTools)

0 commit comments

Comments
 (0)