fix: hex literals with E/e digits misclassified as float #392
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: gengo-ci | |
| on: | |
| push: | |
| branches: | |
| - '**' | |
| pull_request: | |
| jobs: | |
| test: | |
| runs-on: ubuntu-latest | |
| env: | |
| WASMTIME_VERSION: v45.0.0 | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Setup Zig | |
| uses: mlugg/setup-zig@v2 | |
| with: | |
| version: 0.16.0 | |
| - name: Install wasmtime | |
| run: | | |
| set -euo pipefail | |
| TARBALL="wasmtime-${WASMTIME_VERSION}-x86_64-linux.tar.xz" | |
| URL="https://github.com/bytecodealliance/wasmtime/releases/download/${WASMTIME_VERSION}/${TARBALL}" | |
| for attempt in 1 2 3; do | |
| echo "Downloading wasmtime ${WASMTIME_VERSION} (attempt ${attempt})..." | |
| curl -fsSL --retry 3 --retry-delay 5 "$URL" -o "/tmp/${TARBALL}" && break | |
| [ "$attempt" -lt 3 ] && sleep 15 || exit 1 | |
| done | |
| tar -xJf "/tmp/${TARBALL}" -C /tmp | |
| mkdir -p "$HOME/.wasmtime/bin" | |
| mv "/tmp/wasmtime-${WASMTIME_VERSION}-x86_64-linux/wasmtime" "$HOME/.wasmtime/bin/" | |
| echo "$HOME/.wasmtime/bin" >> "$GITHUB_PATH" | |
| - name: Run VM safety unit tests | |
| run: zig build unit | |
| - name: Build WASI binary | |
| run: zig build -Dpreset=dev wasi | |
| - name: Run conformance tests | |
| run: zig build -Dpreset=dev test | |
| - name: Run benchmarks | |
| run: zig build -Dpreset=dev bench | |
| - name: Run native capability tests | |
| run: zig build -Dpreset=dev native-cap | |
| - name: Check chaos test discipline (every .gengo needs .out or .err) | |
| run: | | |
| shopt -s nullglob | |
| errors=0 | |
| for f in tests/chaos/*.gengo; do | |
| base="${f%.gengo}" | |
| if [ ! -f "$base.out" ]; then | |
| echo "FAIL: $f has no .out file" | |
| errors=$((errors + 1)) | |
| fi | |
| done | |
| for f in tests/chaos/fail/*.gengo; do | |
| base="${f%.gengo}" | |
| if [ ! -f "$base.err" ]; then | |
| echo "FAIL: $f has no .err file" | |
| errors=$((errors + 1)) | |
| fi | |
| done | |
| for f in tests/chaos/*.out; do | |
| base="${f%.out}" | |
| if [ ! -f "$base.gengo" ]; then | |
| echo "FAIL: $f has no corresponding .gengo (orphaned .out)" | |
| errors=$((errors + 1)) | |
| fi | |
| done | |
| for f in tests/chaos/fail/*.err; do | |
| base="${f%.err}" | |
| if [ ! -f "$base.gengo" ]; then | |
| echo "FAIL: $f has no corresponding .gengo (orphaned .err)" | |
| errors=$((errors + 1)) | |
| fi | |
| done | |
| if [ $errors -gt 0 ]; then | |
| echo "test discipline FAILED: $errors errors" | |
| exit 1 | |
| fi | |
| echo "test discipline OK" | |
| - name: Run chaos tests | |
| run: zig build -Dpreset=dev chaos | |
| - name: Run heap tests | |
| run: zig build -Dpreset=dev heap-test | |
| stress-test: | |
| runs-on: ubuntu-latest | |
| env: | |
| WASMTIME_VERSION: v45.0.0 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: mlugg/setup-zig@v2 | |
| with: | |
| version: 0.16.0 | |
| - name: Install wasmtime | |
| run: | | |
| set -euo pipefail | |
| TARBALL="wasmtime-${WASMTIME_VERSION}-x86_64-linux.tar.xz" | |
| URL="https://github.com/bytecodealliance/wasmtime/releases/download/${WASMTIME_VERSION}/${TARBALL}" | |
| for attempt in 1 2 3; do | |
| curl -fsSL --retry 3 --retry-delay 5 "$URL" -o "/tmp/${TARBALL}" && break | |
| [ "$attempt" -lt 3 ] && sleep 15 || exit 1 | |
| done | |
| tar -xJf "/tmp/${TARBALL}" -C /tmp | |
| mkdir -p "$HOME/.wasmtime/bin" | |
| mv "/tmp/wasmtime-${WASMTIME_VERSION}-x86_64-linux/wasmtime" "$HOME/.wasmtime/bin/" | |
| echo "$HOME/.wasmtime/bin" >> "$GITHUB_PATH" | |
| - name: Run tests under stress preset (tight heap/stack limits) | |
| run: zig build -Dpreset=stress test | |
| gc-stress-test: | |
| runs-on: ubuntu-latest | |
| env: | |
| WASMTIME_VERSION: v45.0.0 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: mlugg/setup-zig@v2 | |
| with: | |
| version: 0.16.0 | |
| - name: Install wasmtime | |
| run: | | |
| set -euo pipefail | |
| TARBALL="wasmtime-${WASMTIME_VERSION}-x86_64-linux.tar.xz" | |
| URL="https://github.com/bytecodealliance/wasmtime/releases/download/${WASMTIME_VERSION}/${TARBALL}" | |
| for attempt in 1 2 3; do | |
| curl -fsSL --retry 3 --retry-delay 5 "$URL" -o "/tmp/${TARBALL}" && break | |
| [ "$attempt" -lt 3 ] && sleep 15 || exit 1 | |
| done | |
| tar -xJf "/tmp/${TARBALL}" -C /tmp | |
| mkdir -p "$HOME/.wasmtime/bin" | |
| mv "/tmp/wasmtime-${WASMTIME_VERSION}-x86_64-linux/wasmtime" "$HOME/.wasmtime/bin/" | |
| echo "$HOME/.wasmtime/bin" >> "$GITHUB_PATH" | |
| - name: Run GC stress tests (GC on every allocation) | |
| run: zig build -Dpreset=dev -Dgc_stress=true test | |
| heap-paranoia-test: | |
| runs-on: ubuntu-latest | |
| env: | |
| WASMTIME_VERSION: v45.0.0 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: mlugg/setup-zig@v2 | |
| with: | |
| version: 0.16.0 | |
| - name: Install wasmtime | |
| run: | | |
| set -euo pipefail | |
| TARBALL="wasmtime-${WASMTIME_VERSION}-x86_64-linux.tar.xz" | |
| URL="https://github.com/bytecodealliance/wasmtime/releases/download/${WASMTIME_VERSION}/${TARBALL}" | |
| for attempt in 1 2 3; do | |
| curl -fsSL --retry 3 --retry-delay 5 "$URL" -o "/tmp/${TARBALL}" && break | |
| [ "$attempt" -lt 3 ] && sleep 15 || exit 1 | |
| done | |
| tar -xJf "/tmp/${TARBALL}" -C /tmp | |
| mkdir -p "$HOME/.wasmtime/bin" | |
| mv "/tmp/wasmtime-${WASMTIME_VERSION}-x86_64-linux/wasmtime" "$HOME/.wasmtime/bin/" | |
| echo "$HOME/.wasmtime/bin" >> "$GITHUB_PATH" | |
| - name: Run tests with heap paranoia (assert no live regions overwritten) | |
| run: zig build -Dpreset=dev -Dheap_paranoia=true test | |
| parity-test: | |
| runs-on: ubuntu-latest | |
| env: | |
| WASMTIME_VERSION: v45.0.0 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: mlugg/setup-zig@v2 | |
| with: | |
| version: 0.16.0 | |
| - name: Install wasmtime | |
| run: | | |
| set -euo pipefail | |
| TARBALL="wasmtime-${WASMTIME_VERSION}-x86_64-linux.tar.xz" | |
| URL="https://github.com/bytecodealliance/wasmtime/releases/download/${WASMTIME_VERSION}/${TARBALL}" | |
| for attempt in 1 2 3; do | |
| curl -fsSL --retry 3 --retry-delay 5 "$URL" -o "/tmp/${TARBALL}" && break | |
| [ "$attempt" -lt 3 ] && sleep 15 || exit 1 | |
| done | |
| tar -xJf "/tmp/${TARBALL}" -C /tmp | |
| mkdir -p "$HOME/.wasmtime/bin" | |
| mv "/tmp/wasmtime-${WASMTIME_VERSION}-x86_64-linux/wasmtime" "$HOME/.wasmtime/bin/" | |
| echo "$HOME/.wasmtime/bin" >> "$GITHUB_PATH" | |
| - name: Run host/embedded backend parity tests | |
| run: zig build -Dpreset=dev parity |