Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
44 changes: 44 additions & 0 deletions .config/nextest.toml
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,26 @@ slow-timeout = { period = "180s", terminate-after = 1 }
filter = 'test(parity_function_first_class_callable_dispatch)'
slow-timeout = { period = "180s", terminate-after = 1 }

# PDO_ODBC surface/live fixtures compile the full versioned PDO prelude and may
# also rebuild the optional system-client archive on a cold local cache.
[[profile.default.overrides]]
filter = 'test(pdo_odbc)'
slow-timeout = { period = "180s", terminate-after = 1 }

[[profile.ci.overrides]]
filter = 'test(pdo_odbc)'
slow-timeout = { period = "180s", terminate-after = 1 }

# PDO_OCI loads the full PDO surface and the cold optional ODPI-C archive build
# is appreciably slower on GitHub's shared runners.
[[profile.default.overrides]]
filter = 'test(pdo_oci)'
slow-timeout = { period = "300s", terminate-after = 1 }

[[profile.ci.overrides]]
filter = 'test(pdo_oci)'
slow-timeout = { period = "300s", terminate-after = 1 }

# `lowers_examples_corpus` type-checks and lowers every program under examples/;
# ~40s alone and past the global 60s cap on loaded runners.
[[profile.default.overrides]]
Expand Down Expand Up @@ -103,6 +123,30 @@ slow-timeout = { period = "180s", terminate-after = 1 }
filter = 'test(test_eval_aot_callable_named_ref_arg_prep_fatal_cleans_up_stack)'
slow-timeout = { period = "180s", terminate-after = 1 }

[[profile.default.overrides]]
filter = 'test(test_eval_aot_function_by_ref_arg_prep_fatal_cleans_up_stack)'
slow-timeout = { period = "180s", terminate-after = 1 }

[[profile.ci.overrides]]
filter = 'test(test_eval_aot_function_by_ref_arg_prep_fatal_cleans_up_stack)'
slow-timeout = { period = "180s", terminate-after = 1 }

[[profile.default.overrides]]
filter = 'test(test_eval_reflection_class_new_instance_rejects_aot_non_instantiable_class_likes)'
slow-timeout = { period = "180s", terminate-after = 1 }

[[profile.ci.overrides]]
filter = 'test(test_eval_reflection_class_new_instance_rejects_aot_non_instantiable_class_likes)'
slow-timeout = { period = "180s", terminate-after = 1 }

[[profile.default.overrides]]
filter = 'test(test_eval_reflection_class_new_instance_without_constructor_rejects_aot_non_classes)'
slow-timeout = { period = "180s", terminate-after = 1 }

[[profile.ci.overrides]]
filter = 'test(test_eval_reflection_class_new_instance_without_constructor_rejects_aot_non_classes)'
slow-timeout = { period = "180s", terminate-after = 1 }

[[profile.default.overrides]]
filter = 'test(test_eval_declared_method_return_type_values)'
slow-timeout = { period = "180s", terminate-after = 1 }
Expand Down
2 changes: 2 additions & 0 deletions .github/docker/ci.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -32,13 +32,15 @@ RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y --no-ins
ca-certificates \
curl \
file \
freetds-dev \
git \
libbz2-dev \
libpcre2-dev \
libssl-dev \
netbase \
pkg-config \
tzdata \
unixodbc-dev \
zlib1g-dev \
zstd \
&& rm -rf /var/lib/apt/lists/*
Expand Down
162 changes: 157 additions & 5 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,10 @@ concurrency:

env:
CARGO_TERM_COLOR: always
# Deep parser/lowering fixtures overflow Rust's small default worker stack on
# ARM64 runners. Keep one value for every archived nextest process so shard
# placement cannot change whether a test has enough stack.
RUST_MIN_STACK: "33554432"
BRIDGE_CRATES: >-
-p elephc-tls
-p elephc-pdo
Expand Down Expand Up @@ -52,8 +56,8 @@ jobs:
- name: Install cargo-nextest
uses: taiki-e/install-action@nextest

- name: Install test-only native providers
run: brew install pcre2
- name: Install native test dependencies
run: brew install freetds pcre2 unixodbc

- name: Check (no warnings)
shell: bash
Expand All @@ -62,6 +66,11 @@ jobs:
cargo build 2>&1 | tee "$RUNNER_TEMP/cargo-build.log"
! grep -i warning "$RUNNER_TEMP/cargo-build.log"

- name: Build combined optional PDO driver profile
run: |
cargo build -p elephc-pdo --features dblib,firebird,odbc,informix,ibm,sqlsrv,oci,cubrid
cargo clean -p elephc-pdo

- name: Build bridge/native support crates
# The codegen test runner links compiled programs against bridge
# staticlibs: libelephc_tls.a (https:// / TLS), libelephc_pdo.a (PDO),
Expand Down Expand Up @@ -126,6 +135,11 @@ jobs:
cargo build 2>&1 | tee "$RUNNER_TEMP/cargo-build.log"
! grep -i warning "$RUNNER_TEMP/cargo-build.log"

- name: Build combined optional PDO driver profile
run: |
cargo build -p elephc-pdo --features dblib,firebird,odbc,informix,ibm,sqlsrv,oci,cubrid
cargo clean -p elephc-pdo

- name: Build bridge/native support crates
# The codegen test runner links compiled programs against bridge
# staticlibs: libelephc_tls.a (https:// / TLS), libelephc_pdo.a (PDO),
Expand Down Expand Up @@ -185,6 +199,11 @@ jobs:
cargo build 2>&1 | tee "$RUNNER_TEMP/cargo-build.log"
! grep -i warning "$RUNNER_TEMP/cargo-build.log"

- name: Build combined optional PDO driver profile
run: |
cargo build -p elephc-pdo --features dblib,firebird,odbc,informix,ibm,sqlsrv,oci,cubrid
cargo clean -p elephc-pdo

- name: Build bridge/native support crates
# The codegen test runner links compiled programs against bridge
# staticlibs: libelephc_tls.a (https:// / TLS), libelephc_pdo.a (PDO),
Expand Down Expand Up @@ -429,7 +448,7 @@ jobs:
cargo nextest run --profile ci \
--archive-file "$RUNNER_TEMP/nextest-archive.tar.zst" \
--workspace-remap . \
-E 'binary(codegen_tests) and not test(~codegen::eval)' \
-E 'binary(codegen_tests) and not test(~codegen::eval) and not test(~codegen::pdo)' \
--partition hash:${{ matrix.shard }}/16 \
--no-fail-fast --retries 1 --flaky-result pass \
-j 1
Expand Down Expand Up @@ -465,7 +484,7 @@ jobs:
cargo nextest run --profile ci \
--archive-file "$RUNNER_TEMP/nextest-archive.tar.zst" \
--workspace-remap . \
-E 'binary(codegen_tests) and not test(~codegen::eval)' \
-E 'binary(codegen_tests) and not test(~codegen::eval) and not test(~codegen::pdo)' \
--partition hash:${{ matrix.shard }}/16 \
--no-fail-fast --retries 1 --flaky-result pass \
-j 1
Expand Down Expand Up @@ -501,11 +520,138 @@ jobs:
cargo nextest run --profile ci \
--archive-file "$RUNNER_TEMP/nextest-archive.tar.zst" \
--workspace-remap . \
-E 'binary(codegen_tests) and not test(~codegen::eval)' \
-E 'binary(codegen_tests) and not test(~codegen::eval) and not test(~codegen::pdo)' \
--partition hash:${{ matrix.shard }}/16 \
--no-fail-fast --retries 1 --flaky-result pass \
-j 1

# PDO fixtures all inject the same large standard-library prelude. Running a
# deterministic shard in one libtest process lets parser/runtime/bridge caches
# survive between cases while preserving the full three-target test surface.
pdo-codegen-tests-macos-aarch64:
name: PDO Codegen Tests (macos-aarch64 ${{ matrix.shard }}/4)
needs: build-archive-macos-aarch64
runs-on: macos-14
timeout-minutes: 40
strategy:
fail-fast: false
matrix:
shard: [1, 2, 3, 4]
steps:
- uses: actions/checkout@v4

- name: Install cargo-nextest
uses: taiki-e/install-action@nextest

- name: Install test-only native providers
run: brew install pcre2

- name: Download test archive
uses: actions/download-artifact@v4
with:
name: nextest-archive-macos-aarch64
path: ${{ runner.temp }}

- name: Run PDO codegen shard in one process
env:
CARGO_NET_OFFLINE: "true"
ELEPHC_TEST_PREBUILT_BRIDGES: "1"
run: |
mkdir -p "$RUNNER_TEMP/nextest"
cargo nextest run --profile ci \
--archive-file "$RUNNER_TEMP/nextest-archive.tar.zst" \
--workspace-remap . \
--extract-to "$RUNNER_TEMP/nextest" \
--extract-overwrite --no-run \
-E 'binary(codegen_tests)'
pdo_test_binary="$(find "$RUNNER_TEMP/nextest/target/debug/deps" \
-type f -name 'codegen_tests-*' -perm -111 -print -quit)"
test -n "$pdo_test_binary"
bash scripts/ci/run_pdo_codegen_shard.sh \
"$pdo_test_binary" "${{ matrix.shard }}" 4

pdo-codegen-tests-linux-x86_64:
name: PDO Codegen Tests (linux-x86_64 ${{ matrix.shard }}/4)
needs: build-archive-linux-x86_64
runs-on: ubuntu-24.04
timeout-minutes: 40
container:
image: ghcr.io/illegalstudio/elephc-ci:latest
credentials:
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
strategy:
fail-fast: false
matrix:
shard: [1, 2, 3, 4]
steps:
- uses: actions/checkout@v4

- name: Download test archive
uses: actions/download-artifact@v4
with:
name: nextest-archive-linux-x86_64
path: ${{ runner.temp }}

- name: Run PDO codegen shard in one process
env:
CARGO_NET_OFFLINE: "true"
ELEPHC_TEST_PREBUILT_BRIDGES: "1"
run: |
mkdir -p "$RUNNER_TEMP/nextest"
cargo nextest run --profile ci \
--archive-file "$RUNNER_TEMP/nextest-archive.tar.zst" \
--workspace-remap . \
--extract-to "$RUNNER_TEMP/nextest" \
--extract-overwrite --no-run \
-E 'binary(codegen_tests)'
pdo_test_binary="$(find "$RUNNER_TEMP/nextest/target/debug/deps" \
-type f -name 'codegen_tests-*' -perm -111 -print -quit)"
test -n "$pdo_test_binary"
bash scripts/ci/run_pdo_codegen_shard.sh \
"$pdo_test_binary" "${{ matrix.shard }}" 4

pdo-codegen-tests-linux-aarch64:
name: PDO Codegen Tests (linux-aarch64 ${{ matrix.shard }}/4)
needs: build-archive-linux-aarch64
runs-on: ubuntu-24.04-arm
timeout-minutes: 40
container:
image: ghcr.io/illegalstudio/elephc-ci:latest
credentials:
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
strategy:
fail-fast: false
matrix:
shard: [1, 2, 3, 4]
steps:
- uses: actions/checkout@v4

- name: Download test archive
uses: actions/download-artifact@v4
with:
name: nextest-archive-linux-aarch64
path: ${{ runner.temp }}

- name: Run PDO codegen shard in one process
env:
CARGO_NET_OFFLINE: "true"
ELEPHC_TEST_PREBUILT_BRIDGES: "1"
run: |
mkdir -p "$RUNNER_TEMP/nextest"
cargo nextest run --profile ci \
--archive-file "$RUNNER_TEMP/nextest-archive.tar.zst" \
--workspace-remap . \
--extract-to "$RUNNER_TEMP/nextest" \
--extract-overwrite --no-run \
-E 'binary(codegen_tests)'
pdo_test_binary="$(find "$RUNNER_TEMP/nextest/target/debug/deps" \
-type f -name 'codegen_tests-*' -perm -111 -print -quit)"
test -n "$pdo_test_binary"
bash scripts/ci/run_pdo_codegen_shard.sh \
"$pdo_test_binary" "${{ matrix.shard }}" 4

# Eval integration tests compile, link, and run full programs while exercising
# eval/magician paths, so keep them out of the ordinary codegen shards. Two
# workers per shard reduce wall time without increasing the number of test runs.
Expand Down Expand Up @@ -799,6 +945,9 @@ jobs:
- codegen-tests-macos-aarch64
- codegen-tests-linux-x86_64
- codegen-tests-linux-aarch64
- pdo-codegen-tests-macos-aarch64
- pdo-codegen-tests-linux-x86_64
- pdo-codegen-tests-linux-aarch64
- image-api-sync
- builtins-docs-sync
- managed-native-smoke
Expand All @@ -818,6 +967,9 @@ jobs:
test "${{ needs.codegen-tests-macos-aarch64.result }}" = "success"
test "${{ needs.codegen-tests-linux-x86_64.result }}" = "success"
test "${{ needs.codegen-tests-linux-aarch64.result }}" = "success"
test "${{ needs.pdo-codegen-tests-macos-aarch64.result }}" = "success"
test "${{ needs.pdo-codegen-tests-linux-x86_64.result }}" = "success"
test "${{ needs.pdo-codegen-tests-linux-aarch64.result }}" = "success"
test "${{ needs.image-api-sync.result }}" = "success"
test "${{ needs.builtins-docs-sync.result }}" = "success"
test "${{ needs.managed-native-smoke.result }}" = "success"
Expand Down
Loading
Loading