mirror of
https://github.com/tursodatabase/limbo.git
synced 2025-07-07 12:35:00 +00:00
github: Run simulator on pull requests
This commit is contained in:
parent
e5331c94ab
commit
67809233d4
2 changed files with 38 additions and 2 deletions
11
.github/workflows/rust.yml
vendored
11
.github/workflows/rust.yml
vendored
|
@ -64,6 +64,17 @@ jobs:
|
|||
run: curl https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf | sh
|
||||
- run: wasm-pack build --target nodejs bindings/wasm
|
||||
|
||||
simulator:
|
||||
runs-on: blacksmith-4vcpu-ubuntu-2404
|
||||
timeout-minutes: 20
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: useblacksmith/rust-cache@v3
|
||||
with:
|
||||
prefix-key: "v1-rust" # can be updated if we need to reset caches due to non-trivial change in the dependencies (for example, custom env var were set for single workspace project)
|
||||
- name: Install the project
|
||||
run: ./scripts/run-sim --iterations 50
|
||||
|
||||
test-limbo:
|
||||
runs-on: blacksmith-4vcpu-ubuntu-2404
|
||||
timeout-minutes: 20
|
||||
|
|
|
@ -2,6 +2,31 @@
|
|||
|
||||
set -e
|
||||
|
||||
while true; do
|
||||
cargo run -p limbo_sim
|
||||
iterations=""
|
||||
while [[ $# -gt 0 ]]; do
|
||||
case $1 in
|
||||
--iterations)
|
||||
iterations="$2"
|
||||
shift 2
|
||||
;;
|
||||
*)
|
||||
echo "Unknown option: $1"
|
||||
echo "Usage: $0 [--max-iterations N]"
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
if [[ -n "$iterations" ]]; then
|
||||
echo "Running limbo_sim for $iterations iterations..."
|
||||
for ((i=1; i<=iterations; i++)); do
|
||||
echo "Iteration $i of $iterations"
|
||||
cargo run -p limbo_sim
|
||||
done
|
||||
echo "Completed $iterations iterations"
|
||||
else
|
||||
echo "Running limbo_sim in infinite loop..."
|
||||
while true; do
|
||||
cargo run -p limbo_sim
|
||||
done
|
||||
fi
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue