Skip to content

Commit 44365df

Browse files
authoredOct 11, 2023
Merge pull request #2 from jpsamaroo/jps/ci
Add GHA CI
2 parents fdf56f4 + dfba78f commit 44365df

File tree

1 file changed

+73
-0
lines changed

1 file changed

+73
-0
lines changed
 

‎.github/workflows/ci.yml

+73
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
name: CI
2+
on:
3+
pull_request:
4+
branches:
5+
- 'main'
6+
- 'release-*'
7+
push:
8+
branches:
9+
- 'main'
10+
- 'release-*'
11+
tags: '*'
12+
concurrency:
13+
# Skip intermediate builds: all builds except for builds on the `main` or `release-*` branches
14+
# Cancel intermediate builds: only pull request builds
15+
group: ${{ github.workflow }}-${{ github.ref }}-${{ github.ref != 'refs/heads/main' || startsWith(github.ref, 'refs/heads/release-') || github.run_number }}
16+
cancel-in-progress: ${{ startsWith(github.ref, 'refs/pull/') }}
17+
jobs:
18+
test:
19+
name: Julia ${{ matrix.version }} - ${{ matrix.os }} - ${{ matrix.arch }} - ${{ github.event_name }}
20+
runs-on: ${{ matrix.os }}
21+
strategy:
22+
fail-fast: false
23+
matrix:
24+
version:
25+
- 'nightly'
26+
os:
27+
- ubuntu-latest
28+
- macOS-latest
29+
- windows-latest
30+
arch:
31+
- x64
32+
- x86
33+
exclude:
34+
- os: macOS-latest
35+
arch: x86
36+
steps:
37+
- uses: actions/checkout@v2
38+
- uses: julia-actions/setup-julia@v1
39+
with:
40+
version: ${{ matrix.version }}
41+
arch: ${{ matrix.arch }}
42+
- uses: actions/cache@v1
43+
env:
44+
cache-name: cache-artifacts
45+
with:
46+
path: ~/.julia/artifacts
47+
key: ${{ runner.os }}-test-${{ env.cache-name }}-${{ hashFiles('**/Project.toml') }}
48+
restore-keys: |
49+
${{ runner.os }}-test-${{ env.cache-name }}-
50+
${{ runner.os }}-test-${{ matrix.os }}
51+
${{ runner.os }}-
52+
- run: julia --color=yes .ci/test_and_change_uuid.jl
53+
- uses: julia-actions/julia-buildpkg@v1
54+
- uses: julia-actions/julia-runtest@v1
55+
- uses: julia-actions/julia-processcoverage@v1
56+
- uses: codecov/codecov-action@v1
57+
with:
58+
file: lcov.info
59+
docs:
60+
runs-on: ubuntu-latest
61+
steps:
62+
- uses: actions/checkout@v2
63+
- uses: julia-actions/setup-julia@latest
64+
with:
65+
# version: '1.6'
66+
version: 'nightly'
67+
- name: Generate docs
68+
run: |
69+
julia --color=yes -e 'write("Project.toml", replace(read("Project.toml", String), r"uuid = .*?\n" =>"uuid = \"47e2e46d-f89d-539d-b4ee-838fcccc9c8e\"\n"));'
70+
julia --project --color=yes -e 'using Pkg; Pkg.activate("docs"); Pkg.instantiate(); Pkg.develop(PackageSpec(path = pwd()))'
71+
julia --project=docs --color=yes docs/make.jl pdf
72+
env:
73+
DOCUMENTER_KEY: ${{ secrets.DOCUMENTER_KEY }}

0 commit comments

Comments
 (0)
Please sign in to comment.