-
Notifications
You must be signed in to change notification settings - Fork 33
56 lines (53 loc) · 1.98 KB
/
treehash.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
name: Treehash
on:
push:
branches:
- 'master'
- 'release-*'
tags: '*'
pull_request:
concurrency:
# group by workflow and ref; the last slightly strange component ensures that for pull
# requests, we limit to 1 concurrent job, but for the master branch we don't
group: ${{ github.workflow }}-${{ github.ref }}-${{ github.ref != 'refs/heads/master' || github.run_number }}
# Cancel intermediate builds, but only if it is a pull request build.
cancel-in-progress: ${{ startsWith(github.ref, 'refs/pull/') }}
jobs:
treehash:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: "Set up Julia"
uses: julia-actions/setup-julia@v2
with:
version: 1
- name: "Cache artifacts"
uses: julia-actions/cache@v2
- name: "Build package"
uses: julia-actions/julia-buildpkg@v1
- name: "Check treehash match"
run: |
julia --project --color=yes -e '
using Pkg
using libsingular_julia_jll
path = libsingular_julia_jll.find_artifact_dir()
path = joinpath(path, "lib", "libsingular_julia.treehash")
jll_hash = chomp(read(path, String))
src_hash = bytes2hex(Pkg.GitTools.tree_hash(joinpath("deps", "src")))
jll_hash == src_hash || error("tree hash is $src_hash, but JLL uses $jll_hash")
'
# next force a treehash mismatch and verify that Singular runs in this
# setup; as a side effect this also reduce code coverage fluctuation when
# updating libsingular_julia_jll
- name: "Force treehash mismatch"
run: |
touch deps/src/FORCE_TREEHASH_MISMATCH
- name: "Run tests"
uses: julia-actions/julia-runtest@v1
with:
depwarn: error
- name: "Process code coverage"
uses: julia-actions/julia-processcoverage@v1
- name: "Upload coverage data to Codecov"
continue-on-error: true
uses: codecov/codecov-action@v3