-
Notifications
You must be signed in to change notification settings - Fork 1
51 lines (51 loc) · 1.92 KB
/
invalidations.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
# https://github.com/julia-actions/julia-invalidations
name: Invalidations
on:
pull_request:
paths-ignore:
- 'LICENSE'
- 'README.md'
workflow_dispatch:
concurrency:
# cancel intermediate builds
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
evaluate:
runs-on: ubuntu-latest
if: "!contains(github.event.head_commit.message, 'skip ci')"
env:
JULIA_PKG_SERVER: ''
steps:
- name: Set up Julia
uses: julia-actions/setup-julia@v2
with:
version: '1.10' # currently not compatible with Julia v1.11
# current branch
- name: Check out repository in current branch
uses: actions/checkout@v4
- name: Cache artifacts
uses: julia-actions/cache@v2
- name: Build package in current branch
uses: julia-actions/julia-buildpkg@v1
- name: Count invalidations in current branch
uses: julia-actions/julia-invalidations@v1
id: invs_branch
# default branch
- name: Check out repository in default branch
uses: actions/checkout@v4
with:
ref: ${{ github.event.repository.default_branch }}
- name: Build package in default branch
uses: julia-actions/julia-buildpkg@v1
- name: Count invalidations in default branch
uses: julia-actions/julia-invalidations@v1
id: invs_default
# aggregate results
- name: Report invalidation counts
run: |
echo "Invalidations on default branch: ${{ steps.invs_default.outputs.total }} (${{ steps.invs_default.outputs.deps }} via deps)" >> $GITHUB_STEP_SUMMARY
echo "Invalidations on this branch: ${{ steps.invs_branch.outputs.total }} (${{ steps.invs_branch.outputs.deps }} via deps)" >> $GITHUB_STEP_SUMMARY
- name: Check whether branch increases invalidations
if: steps.invs_branch.outputs.total > steps.invs_default.outputs.total
run: exit 1