Repository navigation
66 lines (58 loc) · 2.87 KB
/
Copy pathcompat.yml
File metadata and controls
66 lines (58 loc) · 2.87 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
name: Compatibility
# The real-world compatibility corpus (docs/18-compatibility.md, tools/compat/): ~320 pinned console
# programs from dotnet/samples and dotnet/docs, each built and run under real .NET (JIT), published and
# run with NativeAOT (the parity denominator), and compiled and run with csharpc.
# Too heavy for every push (hours); run on demand and weekly. The summary lands in the job summary,
# the per-program results as an artifact (copy results into tools/compat/results.tsv to publish them).
# Builds csharpc from this commit (not the published tool): parity is about the tree under test.
on:
workflow_dispatch:
inputs:
filter:
description: "Only program ids containing this substring (empty: all)"
required: false
default: ""
schedule:
- cron: "0 3 * * 0" # Sundays 03:00 UTC
permissions:
contents: read
concurrency:
group: compat-${{ github.ref }}
cancel-in-progress: true
jobs:
compat:
runs-on: ubuntu-24.04
timeout-minutes: 340
env:
DOTNET_CLI_TELEMETRY_OPTOUT: 1
DOTNET_NOLOGO: 1
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- name: Install LLVM 18, clang and lld (and zlib, which NativeAOT links)
run: sudo apt-get update && sudo apt-get install -y llvm-18 clang-18 libllvm18 lld-18 zlib1g-dev && sudo ln -sf /usr/bin/clang-18 /usr/local/bin/clang && sudo ln -sf /usr/bin/ld.lld-18 /usr/local/bin/ld.lld
- name: Install .NET 11 SDK
run: |
curl -sSLf --retry 5 --retry-all-errors --retry-delay 5 https://dot.net/v1/dotnet-install.sh -o dotnet-install.sh
bash dotnet-install.sh --channel 11.0.1xx --install-dir "$HOME/.dotnet11"
echo "$HOME/.dotnet11" >> "$GITHUB_PATH"
- name: Run the corpus
run: |
tools/compat/run.sh -j 4 --corpus "$RUNNER_TEMP/compat-corpus" --work "$RUNNER_TEMP/compat-work" ${{ github.event.inputs.filter }} | tail -60
cat "$RUNNER_TEMP/compat-work/summary.md" >> "$GITHUB_STEP_SUMMARY"
# One results.tsv in the committed format (run.sh header: id, category, detail, NativeAOT columns), sorted.
cat "$RUNNER_TEMP"/compat-work/results/*.tsv | sort > results.tsv
cp "$RUNNER_TEMP/compat-work/summary.md" summary.md
# The csharpc logs and diffs of every program that doesn't pass, to rank and reproduce blockers.
mkdir -p logs
awk -F'\t' '$2 != "PASS" && $2 != "SKIPPED" { print $1 }' results.tsv | while read -r id; do
mkdir -p "logs/$id"
cp "$RUNNER_TEMP/compat-work/logs/$id/"{csharpc.log,diff,aot.diff} "logs/$id/" 2>/dev/null || true
done
- uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7.0.2
if: always()
with:
name: compat-results
path: |
results.tsv
summary.md
logs/