-
Notifications
You must be signed in to change notification settings - Fork 0
115 lines (99 loc) · 3.43 KB
/
CI.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
name: CI
on:
merge_group:
pull_request:
push:
branches:
- main
tags:
- "*"
concurrency:
# Skip intermediate builds: all builds except for builds on the `master` branch
# Cancel intermediate builds: only pull request builds
group: ${{ github.workflow }}-${{ github.ref }}-${{ github.ref != 'refs/heads/main' || github.run_number }}
cancel-in-progress: ${{ startsWith(github.ref, 'refs/pull/') }}
permissions:
actions: write
contents: read
jobs:
finalize:
timeout-minutes: 10
needs: [test, isolated-tests]
if: always()
runs-on: ubuntu-latest
steps:
- run: |
echo test-bundle: ${{ needs.test.result }}
echo isolated-tests: ${{ needs.isolated-tests.result }}
- run: exit 1
if: |
(needs.test.result != 'success') ||
(needs.isolated-tests.result != 'success')
test:
runs-on: ${{ matrix.os }}
timeout-minutes: 60
strategy:
fail-fast: false
matrix:
version:
- "1.10"
os:
- macos-latest
- ubuntu-latest
- windows-latest
steps:
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
with:
persist-credentials: false
- uses: julia-actions/install-juliaup@2ad49a51b33d519705c111f7b6fe9d069f356da5 # v2.0.2
with:
channel: "${{ matrix.version }}"
- uses: julia-actions/cache@580d2b69d895343992af2cbad49c32a0149c2cde # v2.0.1
- uses: julia-actions/julia-buildpkg@90dd6f23eb49626e4e6612cb9d64d456f86e6a1c # v1.6.0
- uses: julia-actions/julia-runtest@d0c4f093badade621cd041bba567d1e832480ac2 # v1.10.0
- uses: actions/upload-artifact@65462800fd760344b1a7b4382951275a0abb4808 # v4.3.3
with:
name: bundle-${{ matrix.os }}
path: test/build/LocalCustomRegistry
isolated-tests:
needs: [test]
runs-on: ${{ matrix.os }}
timeout-minutes: 60
strategy:
fail-fast: false
matrix:
version:
- "1.10"
os:
- macos-latest
- ubuntu-latest
- windows-latest
bundle:
- bundle-macos-latest
- bundle-ubuntu-latest
- bundle-windows-latest
steps:
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
with:
persist-credentials: false
- uses: julia-actions/install-juliaup@2ad49a51b33d519705c111f7b6fe9d069f356da5 # v2.0.2
with:
channel: "${{ matrix.version }}"
- uses: julia-actions/cache@580d2b69d895343992af2cbad49c32a0149c2cde # v2.0.1
- uses: actions/download-artifact@65a9edc5881444af0b9093a5e628f2fe47ea3b2e # v4.1.7
with:
name: ${{ matrix.bundle }}
path: ${{ matrix.bundle }}
- name: Initialize Julia Depot
run: julia -e 'import Pkg; Pkg.status()'
- name: Install bundle
run: julia ${{ matrix.bundle }}/registry/install.jl
- name: Installing the same bundle again should uninstall and reinstall
run: julia ${{ matrix.bundle }}/registry/install.jl
- name: Instantiate scripts project
run: julia --startup-file=no --project=test/scripts -e 'import Pkg; Pkg.instantiate()'
- name: Verify bundle
run: julia --startup-file=no --project=test/scripts test/scripts/verify.jl
- name: Remove bundle
run: julia --startup-file=no --project=test/scripts test/scripts/remove.jl
if: always()