Skip to content

Commit 9fb1559

Browse files
authored
Merge pull request #926 from JuliaCollections/mh/ci-cache
CI: use julia-actions/cache; don't force arch = x64; limit concurrency for PR CI
2 parents 96d17ae + c0961e8 commit 9fb1559

File tree

1 file changed

+21
-13
lines changed

1 file changed

+21
-13
lines changed

.github/workflows/CI.yml

Lines changed: 21 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,14 @@ on:
55
branches:
66
- master
77
tags: '*'
8+
9+
concurrency:
10+
# group by workflow and ref; the last slightly strange component ensures that for pull
11+
# requests, we limit to 1 concurrent job, but for the default repository branch we don't
12+
group: ${{ github.workflow }}-${{ github.ref }}-${{ github.ref_name != github.event.repository.default_branch || github.run_number }}
13+
# Cancel intermediate builds, but only if it is a pull request build.
14+
cancel-in-progress: ${{ startsWith(github.ref, 'refs/pull/') }}
15+
816
jobs:
917
test:
1018
name: Julia ${{ matrix.version }} - ${{ matrix.os }} - ${{ matrix.arch }} - ${{ github.event_name }}
@@ -18,26 +26,26 @@ jobs:
1826
# - 'nightly'
1927
os:
2028
- ubuntu-latest
21-
- macOS-latest
29+
- macos-latest
2230
- windows-latest
2331
arch:
24-
- x64
32+
- ''
33+
exclude:
34+
- os: macos-latest # Apple Silicon
35+
version: '1.6'
36+
arch: ''
37+
include:
38+
- os: macos-latest # Apple Silicon
39+
version: '1.6'
40+
# Install an x86_64 build of Julia, and run it under Rosetta 2 emulation
41+
arch: 'x64'
2542
steps:
2643
- uses: actions/checkout@v4
2744
- uses: julia-actions/setup-julia@v2
2845
with:
2946
version: ${{ matrix.version }}
30-
arch: ${{ matrix.arch }}
31-
- uses: actions/cache@v4
32-
env:
33-
cache-name: cache-artifacts
34-
with:
35-
path: ~/.julia/artifacts
36-
key: ${{ runner.os }}-test-${{ env.cache-name }}-${{ hashFiles('**/Project.toml') }}
37-
restore-keys: |
38-
${{ runner.os }}-test-${{ env.cache-name }}-
39-
${{ runner.os }}-test-
40-
${{ runner.os }}-
47+
arch: ${{ (matrix.arch == '') && runner.arch || matrix.arch }}
48+
- uses: julia-actions/cache@v2
4149
- uses: julia-actions/julia-buildpkg@v1
4250
- uses: julia-actions/julia-runtest@v1
4351
- uses: julia-actions/julia-processcoverage@v1

0 commit comments

Comments
 (0)