11name : CI
22on :
3- pull_request :
4- branches :
5- - master
6- - dev
73 push :
8- branches :
9- - master
10- - dev
11- tags : ' *'
4+ branches : [master, dev]
5+ tags : ["*"]
6+ pull_request :
127jobs :
138 test :
149 name : Julia ${{ matrix.version }} - ${{ matrix.os }} - ${{ matrix.arch }} - ${{ github.event_name }}
@@ -17,106 +12,38 @@ jobs:
1712 fail-fast : false
1813 matrix :
1914 version :
15+ - ' 1' # automatically expands to the latest stable 1.x release of Julia
2016 - ' 1.10'
21- - ' 1' # automatically expands to the latest stable 1.x release of Julia.
2217 os :
2318 - ubuntu-latest
19+ - windows-latest
2420 arch :
2521 - x64
22+ include :
23+ - os : macOS-latest
24+ arch : aarch64
25+ version : 1
2626 steps :
27- - uses : actions/checkout@v5
27+ - uses : actions/checkout@v4
2828 - uses : julia-actions/setup-julia@v2
2929 with :
3030 version : ${{ matrix.version }}
3131 arch : ${{ matrix.arch }}
3232 - uses : julia-actions/cache@v2
33- env :
34- cache-name : cache-artifacts
35- with :
36- path : ~/.julia/artifacts
37- key : ${{ runner.os }}-test-${{ env.cache-name }}-${{ hashFiles('**/Project.toml') }}
38- restore-keys : |
39- ${{ runner.os }}-test-${{ env.cache-name }}-
40- ${{ runner.os }}-test-
41- ${{ runner.os }}-
4233 - uses : julia-actions/julia-buildpkg@v1
4334 - uses : julia-actions/julia-runtest@v1
4435 - uses : julia-actions/julia-processcoverage@v1
4536 - uses : codecov/codecov-action@v5
4637 with :
38+ files : lcov.info
4739 token : ${{ secrets.CODECOV_TOKEN }}
48- fail_ci_if_error : false
49- verbose : true
5040 docs :
5141 name : Documentation
5242 runs-on : ubuntu-latest
5343 steps :
54- - uses : actions/checkout@v5
55- - uses : julia-actions/setup-julia@v2
56- with :
57- version : ' 1'
58- - shell : julia --color=yes {0}
59- run : |
60- function set_environment_variable(name::AbstractString, value::AbstractString)
61- github_env = ENV["GITHUB_ENV"]
62- touch(github_env)
63- open(github_env, "a") do io
64- println(io, "$(name)=$(value)")
65- end
66- end
67- event_name = "${{ github.event_name }}"
68- if event_name == "pull_request"
69- base_ref = "${{ github.base_ref }}"
70- head_ref = "${{ github.head_ref }}"
71- base_repository = "${{ github.repository }}"
72- head_repository = "${{ github.event.pull_request.head.repo.full_name }}"
73- build_docs = (base_ref == "master") && (head_ref == "dev") && (base_repository == head_repository)
74- elseif event_name == "push"
75- ref = "${{ github.ref }}"
76- build_docs = (ref == "refs/heads/master") || (startswith(ref, "refs/tags/"))
77- elseif event_name == "schedule"
78- build_docs = ref == "refs/heads/master"
79- elseif event_name == "workflow_dispatch"
80- build_docs = ref == "refs/heads/master"
81- else
82- build_docs = false
83- end
84- if build_docs
85- @info("We will build the docs")
86- set_environment_variable("BUILD_DOCS", "true")
87- else
88- @info("We will NOT build the docs")
89- set_environment_variable("BUILD_DOCS", "false")
90- end
91- - name : Instantiate docs environment
92- shell : julia --color=yes --project=docs {0}
93- run : |
94- if ENV["BUILD_DOCS"] == "true"
95- using Pkg
96- Pkg.develop(PackageSpec(path=pwd()))
97- Pkg.instantiate()
98- end
99- - name : Run doctests
100- shell : julia --color=yes --project=docs {0}
101- run : |
102- if ENV["BUILD_DOCS"] == "true"
103- using Documenter: doctest
104- using ScientificTypes
105- @info "attempting to run the doctests"
106- doctest(ScientificTypes)
107- else
108- @info "skipping the doctests"
109- end
110- - name : Build documentation
111- shell : julia --color=yes --project=docs {0}
112- run : |
113- if ENV["BUILD_DOCS"] == "true"
114- @info "attempting to build the docs"
115- run(`julia --project=docs docs/make.jl`)
116- @info "successfully built the docs"
117- else
118- @info "skipping the docs build"
119- end
44+ - uses : actions/checkout@v4
45+ - uses : julia-actions/julia-buildpkg@latest
46+ - uses : julia-actions/julia-docdeploy@latest
12047 env :
12148 GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
12249 DOCUMENTER_KEY : ${{ secrets.DOCUMENTER_KEY }}
0 commit comments