-
Notifications
You must be signed in to change notification settings - Fork 1.1k
137 lines (121 loc) · 3.91 KB
/
Copy pathelle.yml
File metadata and controls
137 lines (121 loc) · 3.91 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
127
128
129
130
131
132
133
134
135
136
137
name: Elle Consistency Check
on:
push:
branches:
- main
pull_request:
branches:
- main
workflow_dispatch:
inputs:
max_steps:
description: "Maximum simulation steps"
required: false
default: "100000"
seed:
description: "Random seed (leave empty for random)"
required: false
default: ""
schedule:
# Run nightly at 3am UTC
- cron: "0 3 * * *"
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }}
cancel-in-progress: true
env:
CARGO_TERM_COLOR: always
jobs:
elle-check:
name: Elle ${{ matrix.elle_model }} (${{ matrix.mvcc && 'MVCC' || 'default' }})
runs-on: blacksmith-4vcpu-ubuntu-2404
timeout-minutes: 60
strategy:
fail-fast: false
matrix:
mvcc: [false, true]
elle_model: [list-append, rw-register]
steps:
- uses: actions/checkout@v4
- uses: useblacksmith/rust-cache@v3
with:
prefix-key: "v1-rust"
- uses: "./.github/shared/setup-sccache"
- name: Setup Java
uses: actions/setup-java@v4
with:
distribution: "temurin"
java-version: "21"
- name: Cache Leiningen
uses: actions/cache@v4
with:
path: |
/tmp/lein
~/.lein
key: lein-${{ runner.os }}
- name: Cache elle-cli
uses: actions/cache@v4
with:
path: /tmp/elle-cli
key: elle-cli-${{ runner.os }}-${{ hashFiles('.github/workflows/elle.yml') }}
- name: Build simulator
run: cargo build -p turso_whopper
- name: Run simulation with Elle
env:
SEED: ${{ github.event.inputs.seed }}
run: |
SEED_ARG=""
if [ -n "$SEED" ]; then
export SEED="$SEED"
fi
MAX_STEPS="${{ github.event.inputs.max_steps }}"
MAX_STEPS="${MAX_STEPS:-100000}"
MVCC_FLAG=""
if [ "${{ matrix.mvcc }}" = "true" ]; then
MVCC_FLAG="--enable-mvcc"
fi
./target/debug/turso_whopper \
--elle ${{ matrix.elle_model }} \
--elle-output elle-history.edn \
--max-steps "$MAX_STEPS" \
$MVCC_FLAG
- name: Setup Leiningen
run: |
if [ ! -x /tmp/lein/lein ]; then
mkdir -p /tmp/lein
curl -sL https://raw.githubusercontent.com/technomancy/leiningen/2.11.2/bin/lein -o /tmp/lein/lein
chmod +x /tmp/lein/lein
/tmp/lein/lein version
fi
- name: Build elle-cli
run: |
if [ ! -d /tmp/elle-cli ]; then
git clone --depth 1 https://github.com/ligurio/elle-cli.git /tmp/elle-cli
fi
cd /tmp/elle-cli
if [ ! -f target/*-standalone.jar ]; then
/tmp/lein/lein uberjar
fi
- name: Install Graphviz
run: sudo apt-get update && sudo apt-get install -y graphviz
- name: Run Elle analysis
run: |
ELLE_JAR=$(ls -t /tmp/elle-cli/target/*-standalone.jar | head -1)
mkdir -p elle-results
echo "Using JAR: $ELLE_JAR"
echo "History file: $(pwd)/elle-history.edn"
echo "History size: $(wc -l < elle-history.edn) events"
echo ""
CONSISTENCY_FLAG="--consistency-models serializable"
if [ "${{ matrix.mvcc }}" = "true" ]; then
CONSISTENCY_FLAG="--consistency-models snapshot-isolation"
fi
java -jar "$ELLE_JAR" --model ${{ matrix.elle_model }} $CONSISTENCY_FLAG --verbose --directory elle-results elle-history.edn
- name: Upload Elle results
uses: actions/upload-artifact@v4
if: always()
with:
name: elle-results-${{ matrix.elle_model }}-${{ matrix.mvcc && 'mvcc' || 'default' }}
path: |
elle-history.edn
elle-results/
retention-days: 30