|
1 | 1 | name: CI |
2 | 2 | on: |
3 | | - pull_request: |
4 | | - branches: |
5 | | - - 'main' |
6 | | - - 'release-*' |
7 | 3 | push: |
8 | 4 | branches: |
9 | 5 | - 'main' |
10 | 6 | - 'release-*' |
11 | | - tags: '*' |
| 7 | + tags: ['*'] |
| 8 | + pull_request: |
| 9 | + workflow_dispatch: |
12 | 10 | concurrency: |
13 | 11 | # Skip intermediate builds: all builds except for builds on the `main` or `release-*` branches |
14 | 12 | # Cancel intermediate builds: only pull request builds |
15 | 13 | group: ${{ github.workflow }}-${{ github.ref }}-${{ github.ref != 'refs/heads/main' || startsWith(github.ref, 'refs/heads/release-') || github.run_number }} |
16 | 14 | cancel-in-progress: ${{ startsWith(github.ref, 'refs/pull/') }} |
17 | 15 | jobs: |
18 | 16 | test: |
19 | | - name: Julia ${{ matrix.version }} - ${{ matrix.os }} - ${{ matrix.arch }} - ${{ github.event_name }} |
| 17 | + name: Julia ${{ matrix.version }} - ${{ matrix.os }} - ${{ matrix.arch }} |
20 | 18 | runs-on: ${{ matrix.os }} |
| 19 | + permissions: # needed to allow julia-actions/cache to proactively delete old caches that it has created |
| 20 | + actions: write |
| 21 | + contents: read |
21 | 22 | strategy: |
22 | 23 | fail-fast: false |
23 | 24 | matrix: |
24 | | - version: |
25 | | - - '1.6' |
26 | | - - '1.7' |
27 | | - - 'nightly' |
28 | 25 | os: |
29 | 26 | - ubuntu-latest |
30 | | - - macOS-latest |
| 27 | + - macos-13 # Intel |
31 | 28 | - windows-latest |
32 | 29 | arch: |
33 | | - - x64 |
34 | | - - x86 |
| 30 | + - 'x64' |
| 31 | + - 'x86' |
| 32 | + version: |
| 33 | + - '1.6' # compat |
| 34 | + - 'lts' |
| 35 | + - 'nightly' |
35 | 36 | exclude: |
36 | | - - os: macOS-latest |
| 37 | + - os: macos-13 # Intel |
37 | 38 | arch: x86 |
| 39 | + include: |
| 40 | + # macos-latest -> Apple Silicon (Need julia >= v1.8) |
| 41 | + - os: macos-latest # Apple Silicon |
| 42 | + arch: 'aarch64' |
| 43 | + version: 'lts' |
| 44 | + - os: macos-latest # Apple Silicon |
| 45 | + arch: 'aarch64' |
| 46 | + version: 'nightly' |
38 | 47 | steps: |
39 | | - - uses: actions/checkout@v2 |
40 | | - - uses: julia-actions/setup-julia@v1 |
| 48 | + - uses: actions/checkout@v4 |
| 49 | + - uses: julia-actions/setup-julia@v2 |
41 | 50 | with: |
42 | 51 | version: ${{ matrix.version }} |
43 | 52 | arch: ${{ matrix.arch }} |
44 | | - - uses: actions/cache@v1 |
45 | | - env: |
46 | | - cache-name: cache-artifacts |
47 | | - with: |
48 | | - path: ~/.julia/artifacts |
49 | | - key: ${{ runner.os }}-test-${{ env.cache-name }}-${{ hashFiles('**/Project.toml') }} |
50 | | - restore-keys: | |
51 | | - ${{ runner.os }}-test-${{ env.cache-name }}- |
52 | | - ${{ runner.os }}-test-${{ matrix.os }} |
53 | | - ${{ runner.os }}- |
| 53 | + - uses: julia-actions/cache@v2 |
54 | 54 | - run: julia --color=yes .ci/test_and_change_uuid.jl |
55 | 55 | - uses: julia-actions/julia-buildpkg@v1 |
56 | 56 | - uses: julia-actions/julia-runtest@v1 |
57 | 57 | - uses: julia-actions/julia-processcoverage@v1 |
58 | | - - uses: codecov/codecov-action@v1 |
| 58 | + - uses: codecov/codecov-action@v5 |
59 | 59 | with: |
60 | | - file: lcov.info |
| 60 | + token: ${{ secrets.CODECOV_TOKEN }} |
| 61 | + files: lcov.info |
| 62 | + |
61 | 63 | docs: |
62 | | - permissions: write-all |
| 64 | + name: Documentation |
63 | 65 | runs-on: ubuntu-latest |
| 66 | + permissions: |
| 67 | + # needed to allow julia-actions/cache to proactively delete old caches that it has created |
| 68 | + actions: write |
| 69 | + contents: write |
| 70 | + statuses: write |
64 | 71 | steps: |
65 | | - - uses: actions/checkout@v2 |
66 | | - - uses: julia-actions/setup-julia@latest |
| 72 | + - uses: actions/checkout@v4 |
| 73 | + - uses: julia-actions/setup-julia@v2 |
67 | 74 | with: |
68 | | - # version: '1.6' |
69 | 75 | version: 'nightly' |
70 | | - - name: Generate docs |
| 76 | + - uses: julia-actions/cache@v2 |
| 77 | + - run: julia --color=yes .ci/test_and_change_uuid.jl |
| 78 | + - name: Configure doc environment |
| 79 | + shell: julia --project=docs --color=yes {0} |
| 80 | + run: | |
| 81 | + using Pkg |
| 82 | + Pkg.develop(PackageSpec(path=pwd())) |
| 83 | + Pkg.instantiate() |
| 84 | + - uses: julia-actions/julia-buildpkg@v1 |
| 85 | + - name: Run doctests |
| 86 | + shell: julia --project=docs --color=yes {0} |
71 | 87 | run: | |
72 | | - julia --color=yes -e 'write("Project.toml", replace(read("Project.toml", String), r"uuid = .*?\n" =>"uuid = \"9bb1440f-4735-579b-a4ab-409b98df4dab\"\n"));' |
73 | | - julia --project --color=yes -e 'using Pkg; Pkg.activate("docs"); Pkg.instantiate(); Pkg.develop(PackageSpec(path = pwd()))' |
74 | | - julia --project=docs --color=yes docs/make.jl pdf |
| 88 | + using Documenter: DocMeta, doctest |
| 89 | + using DelimitedFiles |
| 90 | + DocMeta.setdocmeta!(DelimitedFiles, :DocTestSetup, :(using DelimitedFiles); recursive=true) |
| 91 | + doctest(DelimitedFiles) |
| 92 | + - uses: julia-actions/julia-docdeploy@v1 |
75 | 93 | env: |
| 94 | + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
76 | 95 | DOCUMENTER_KEY: ${{ secrets.DOCUMENTER_KEY }} |
0 commit comments