-
Notifications
You must be signed in to change notification settings - Fork 0
94 lines (91 loc) · 3.54 KB
/
Copy pathReusableTest.yml
File metadata and controls
94 lines (91 loc) · 3.54 KB
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
name: Reusable test
on:
workflow_call:
inputs:
version:
required: false
type: string
default: "1"
os:
required: false
type: string
default: ubuntu-latest
arch:
required: false
type: string
default: x64
allow_failure:
required: false
type: boolean
default: false
run_codecov:
required: false
type: boolean
default: false
secrets:
codecov_token:
required: true
jobs:
test:
name: Julia ${{ inputs.version }} - ${{ inputs.os }} - ${{ inputs.arch }} - ${{ github.event_name }}
runs-on: ${{ inputs.os }}
continue-on-error: ${{ inputs.allow_failure }}
steps:
- uses: actions/checkout@v7
- uses: julia-actions/setup-julia@v3
with:
version: ${{ inputs.version }}
arch: ${{ inputs.arch }}
- name: Use Julia cache
uses: julia-actions/cache@v3
# `julia-buildpkg` instantiates the package (and, via `[workspace]`, its test
# environment), so it resolves the test-only JET dependency. It is skipped on
# the version that builds in a temp env instead: `pre` (the workspace resolve
# would pull the test-only registered JET, which caps below 1.13; the fork is
# injected below).
- uses: julia-actions/julia-buildpkg@v1
if: ${{ inputs.version != 'pre' }}
# On Julia 1.10, `[sources]` is ignored (honoring it is a 1.11+ feature), so
# dev the path-based test deps into a temp env and test by name. JET resolves
# from the registry.
- name: Run tests (lts path)
if: ${{ inputs.version == 'lts' }}
run: |
julia --color=yes -e '
using Pkg
Pkg.activate(; temp=true)
Pkg.develop([
PackageSpec(path=pwd()),
PackageSpec(path=joinpath(pwd(), "test", "PrecompileTest")),
])
Pkg.test("EmulatedBitIntegers"; coverage=true,
julia_args=["--check-bounds=yes", "--depwarn=yes"])'
# Julia 1.13 pre-release: registered JET does not yet support 1.13, so dev the
# deps into a temp env and add the JET fork's `julia-1.13-compat` branch there.
# Drop this step once a 1.13-compatible JET is released. Runs without coverage
# or `--check-bounds=yes` so the `performance invariants` testset measures clean
# codegen: those flags perturb the exact LLVM op counts it asserts (calibrated
# on 1.11+).
- name: Run tests (pre path with JET fork)
if: ${{ inputs.version == 'pre' }}
run: |
julia --color=yes -e '
using Pkg
Pkg.activate(; temp=true)
Pkg.develop([
PackageSpec(path=pwd()),
PackageSpec(path=joinpath(pwd(), "test", "PrecompileTest")),
])
Pkg.add(PackageSpec(url="https://github.com/PatrickHaecker/JET.jl", rev="julia-1.13-compat"))
Pkg.test("EmulatedBitIntegers"; julia_args=["--depwarn=yes"])'
# Standard path for the remaining versions: the package was instantiated by
# `julia-buildpkg` above, so run its tests directly. Gated to mirror that step.
- uses: julia-actions/julia-runtest@v1
if: ${{ inputs.version != 'lts' && inputs.version != 'pre' }}
- uses: julia-actions/julia-processcoverage@v1
if: ${{ inputs.run_codecov }}
- uses: codecov/codecov-action@v7
if: ${{ inputs.run_codecov }}
with:
files: lcov.info
token: ${{ secrets.codecov_token }}