Skip to content

Commit b1a9691

Browse files
committed
separate out CompatCheck
1 parent ac896f1 commit b1a9691

2 files changed

Lines changed: 70 additions & 25 deletions

File tree

.github/workflows/CI.yml

Lines changed: 0 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -123,28 +123,3 @@ jobs:
123123
run: |
124124
echo "Compat check result: ${{ needs.compatcheck.result }}"
125125
continue-on-error: true
126-
127-
compatcheck:
128-
name: "Compat (${{ matrix.group }}, Julia ${{ matrix.julia-version }})"
129-
needs: [setup-matrix, test]
130-
if: github.event.pull_request.draft != true
131-
runs-on: ubuntu-latest
132-
strategy:
133-
fail-fast: false
134-
matrix:
135-
downgrade_mode: ['deps']
136-
group: ${{ fromJSON(needs.setup-matrix.outputs.groups) }}
137-
julia-version: ['1', '1.10']
138-
steps:
139-
- uses: actions/checkout@v6
140-
- uses: julia-actions/setup-julia@v2
141-
with:
142-
version: ${{ matrix.julia-version }}
143-
- uses: julia-actions/cache@v3
144-
- uses: julia-actions/julia-downgrade-compat@v2
145-
with:
146-
mode: ${{ matrix.downgrade_mode }}
147-
skip: Random, LinearAlgebra, Test, Combinatorics
148-
julia_version: ${{ matrix.julia-version }}
149-
- uses: julia-actions/julia-buildpkg@v1
150-
- uses: julia-actions/julia-runtest@v1

.github/workflows/CompatCheck.yml

Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
name: CompatCheck
2+
3+
on:
4+
push:
5+
branches:
6+
- 'main'
7+
- 'release-'
8+
9+
tags: '*'
10+
11+
paths:
12+
- 'Project.toml'
13+
- 'test/Project.toml'
14+
15+
pull_request:
16+
types: [opened, synchronize, reopened, ready_for_review, converted_to_draft]
17+
workflow_dispatch:
18+
19+
concurrency:
20+
group: ${{ github.workflow }}-${{ github.ref }}
21+
# Cancel intermediate builds: only if it is a pull request build.
22+
cancel-in-progress: ${{ startsWith(github.ref, 'refs/pull/') }}
23+
24+
jobs:
25+
setup-matrix:
26+
runs-on: ubuntu-latest
27+
outputs:
28+
groups: ${{ steps.mk.outputs.groups }}
29+
version: ${{ steps.mk.outputs.version }}
30+
os: ${{ steps.mk.outputs.os }}
31+
steps:
32+
- uses: actions/checkout@v6
33+
- id: mk
34+
shell: bash
35+
run: |
36+
# Auto-discover test groups from all subdirectory names.
37+
groups=$(find test -mindepth 1 -maxdepth 1 -type d \
38+
| xargs -I{} basename {} | sort \
39+
| jq -R -s -c '[split("\n")[] | select(length > 0)]')
40+
41+
echo "groups=${groups}" >> "$GITHUB_OUTPUT"
42+
fi
43+
compatcheck:
44+
name: "Compat (${{ matrix.group }}, Julia ${{ matrix.julia-version }})"
45+
needs: [setup-matrix, test]
46+
if: github.event.pull_request.draft != true
47+
runs-on: ubuntu-latest
48+
strategy:
49+
fail-fast: false
50+
matrix:
51+
downgrade_mode: ['deps']
52+
group: ${{ fromJSON(needs.setup-matrix.outputs.groups) }}
53+
julia-version: ['1', '1.10']
54+
steps:
55+
- uses: actions/checkout@v6
56+
- uses: julia-actions/setup-julia@v2
57+
with:
58+
version: ${{ matrix.julia-version }}
59+
- uses: julia-actions/cache@v3
60+
- uses: julia-actions/julia-downgrade-compat@v2
61+
with:
62+
mode: ${{ matrix.downgrade_mode }}
63+
skip: Random, LinearAlgebra, Test, Combinatorics
64+
julia_version: ${{ matrix.julia-version }}
65+
- uses: julia-actions/julia-buildpkg@v1
66+
- uses: julia-actions/julia-runtest@v1
67+
with:
68+
test_args: '${{ matrix.group }} --fast'
69+
env:
70+
JULIA_NUM_THREADS: "4"

0 commit comments

Comments
 (0)