Repository navigation
126 lines (112 loc) · 4.71 KB
/
Copy pathnextest-shards.yml
File metadata and controls
126 lines (112 loc) · 4.71 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
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
name: archived nextest shards
on:
workflow_call:
inputs:
suite:
description: Closed shard-suite selector (core|oracle|tui).
required: true
type: string
permissions:
contents: read
jobs:
shards:
name: ${{ inputs.suite }} tests shard ${{ matrix.partition }}/20 (linux x86_64)
runs-on: ubuntu-24.04
timeout-minutes: ${{ inputs.suite == 'oracle' && 120 || 60 }}
env:
CARGO_TERM_COLOR: always
RUST_BACKTRACE: 1
NEOVM_ORACLE_MODE: snapshot
NEOVM_BINARY_PATH: ${{ github.workspace }}/target/release/neomacs
NEOMACS_TUI_NEOMACS_BIN: ${{ github.workspace }}/target/release/neomacs
NEOMACS_RUNTIME_ROOT: ${{ github.workspace }}
TMPDIR: ${{ github.workspace }}/tmp
strategy:
fail-fast: false
matrix:
partition: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20]
steps:
- name: Checkout
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- name: Prepare workspace temp directory
run: mkdir -p "$TMPDIR/nextest"
- name: Decode closed shard suite
env:
SHARD_SUITE: ${{ inputs.suite }}
run: |
case "$SHARD_SUITE" in
core)
echo "LINUX_PROFILE=build" >> "$GITHUB_ENV"
echo "NEXTEST_FILTER=package(neovm-core)" >> "$GITHUB_ENV"
;;
oracle)
echo "LINUX_PROFILE=oracle" >> "$GITHUB_ENV"
echo "NEXTEST_FILTER=package(neovm-oracle-tests)" >> "$GITHUB_ENV"
;;
tui)
echo "LINUX_PROFILE=oracle" >> "$GITHUB_ENV"
echo "NEXTEST_FILTER=package(neomacs-tui-tests)" >> "$GITHUB_ENV"
;;
*) echo "unknown shard suite: $SHARD_SUITE" >&2; exit 2 ;;
esac
- name: Install suite dependencies
run: scripts/ci/setup-linux.sh "$LINUX_PROFILE"
# Only the tui suite spawns GNU Emacs (pair comparisons); core and
# oracle shards run in snapshot mode with no live oracle process.
- name: Set up GNU Emacs oracle
if: inputs.suite == 'tui'
uses: ./.github/actions/setup-gnu-emacs
- name: Set up Rust tooling
uses: ./.github/actions/setup-rust
with:
# A shard compiles NOTHING: it runs prebuilt binaries out of the
# downloaded nextest archive. Caching ~/.cargo and target/ here
# bought nothing and cost ~246 MiB per shard. Across all partitions,
# those redundant caches consumed most of the repo's 10 GiB store
# for jobs that never invoke rustc. Over the limit GitHub
# evicts least-recently-used entries, and the release caches are
# written once per tag while these were rewritten every CI run, so
# the shards were evicting the release builds and making every
# release compile from cold.
cache: "false"
cache-key: ci-${{ inputs.suite }}-shards
cache-save-if: ${{ github.ref == 'refs/heads/main' }}
install-nextest: true
- name: Configure libfaketime for oracle tests
if: inputs.suite == 'oracle'
run: |
libfaketime_so="$(dpkg -L libfaketime | grep -E '/libfaketime\.so\.1$' | head -n 1)"
test -n "$libfaketime_so"
echo "NEOVM_LIBFAKETIME_SO=$libfaketime_so" >> "$GITHUB_ENV"
- name: Download shared test runtime
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
with:
name: neomacs-test-runtime-linux-x86_64
path: .
- name: Unpack shared test runtime
run: |
tar xzf neomacs-test-runtime-linux-x86_64.tar.gz
chmod +x target/release/neomacs
test -f lisp/international/charscript.el
test -f lisp/international/charprop.el
- name: Download workspace test archive
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
with:
name: neomacs-workspace-tests-nextest-archive-linux-x86_64
path: .
- name: Run nextest shard
env:
NEOMACS_TUI_RECORD: ${{ inputs.suite == 'tui' && 'on' || 'off' }}
run: |
cargo nextest run \
--archive-file neomacs-workspace-tests.tar.zst \
--extract-to "$TMPDIR/nextest" \
-E "$NEXTEST_FILTER" \
--workspace-remap "$GITHUB_WORKSPACE" \
--partition slice:${{ matrix.partition }}/20 \
--no-fail-fast
- name: Upload TUI recordings
if: inputs.suite == 'tui' && always()
uses: ./.github/actions/upload-tui-recordings
with:
artifact-name: neomacs-tui-recordings-${{ github.run_id }}-${{ matrix.partition }}