From 50f5e2e905c87c23911a4bcf58cc8d2dbb23547d Mon Sep 17 00:00:00 2001 From: Nathan Stocks Date: Fri, 27 Mar 2026 10:51:11 -0600 Subject: [PATCH 01/20] use a larger runner that Josh configured for Windows --- .github/workflows/ci_test.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci_test.yml b/.github/workflows/ci_test.yml index 59db1864a..092cc56a7 100644 --- a/.github/workflows/ci_test.yml +++ b/.github/workflows/ci_test.yml @@ -12,7 +12,7 @@ jobs: shell: ${{ matrix.shell }} strategy: matrix: - os: [ubuntu-latest, macos-latest, windows-latest] + os: [ubuntu-latest, macos-latest, windows-x64-8cpu-32ram-300ssd] include: - os: ubuntu-latest platform: linux @@ -20,7 +20,7 @@ jobs: - os: macos-latest platform: macos shell: bash -leo pipefail {0} - - os: windows-latest + - os: windows-x64-8cpu-32ram-300ssd platform: windows shell: powershell fail-fast: false From 7836d15cb07818322fe1d559dc200420bb93397a Mon Sep 17 00:00:00 2001 From: Nathan Stocks Date: Fri, 27 Mar 2026 11:20:21 -0600 Subject: [PATCH 02/20] the larger runner apparently doesn't have a D: drive --- .github/workflows/ci_test.yml | 3 --- 1 file changed, 3 deletions(-) diff --git a/.github/workflows/ci_test.yml b/.github/workflows/ci_test.yml index 092cc56a7..b50349dd8 100644 --- a/.github/workflows/ci_test.yml +++ b/.github/workflows/ci_test.yml @@ -146,9 +146,6 @@ jobs: - name: Build oxen rust project run: | cargo build --workspace - env: - TEMP: ${{ matrix.platform == 'windows' && 'D:\a\_temp' || runner.temp }} - TMP: ${{ matrix.platform == 'windows' && 'D:\a\_temp' || runner.temp }} - name: Setup oxen-server user (Linux/macOS) if: matrix.platform != 'windows' From 397f6f5f1795fe73d00693df1f6121a307c6d5c6 Mon Sep 17 00:00:00 2001 From: Nathan Stocks Date: Fri, 27 Mar 2026 13:14:09 -0600 Subject: [PATCH 03/20] make it explicit we use Swatinem/rust-cache through the setup-rust-toolchain action; add more config options --- .github/workflows/ci_test.yml | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/.github/workflows/ci_test.yml b/.github/workflows/ci_test.yml index b50349dd8..7bb7faa07 100644 --- a/.github/workflows/ci_test.yml +++ b/.github/workflows/ci_test.yml @@ -68,20 +68,15 @@ jobs: uses: actions-rust-lang/setup-rust-toolchain@v1 with: rustflags: ${{ matrix.platform == 'windows' && '-D warnings -C link-arg=/DEBUG:NONE' || '-D warnings' }} + cache: true # This is the default--making it explicit. This uses Swatinem/rust-cache under the hood. + cache-all-crates: true + cache-workspace-crates: true - name: Install uv uses: astral-sh/setup-uv@v6 with: python-version: "3.11" # Test against the earliest supported Python version - - name: Cache Rust dependencies - uses: Swatinem/rust-cache@v2 - with: - # Only cache builds from main. Otherwise our caches will be too big and start to churn. (10 GB limit in GitHub Actions) - # Other branches will still use the cache but won't save it. - save-if: ${{ github.ref == 'refs/heads/main' }} - workspaces: "." - - name: Install dependencies (macOS) if: matrix.platform == 'macos' run: | From 946d75c57229c0c7484c8411c80daabaeeec7be4 Mon Sep 17 00:00:00 2001 From: Nathan Stocks Date: Fri, 27 Mar 2026 13:17:05 -0600 Subject: [PATCH 04/20] do all test builds with the test profile so we stop recompiling so much --- .github/workflows/ci_test.yml | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci_test.yml b/.github/workflows/ci_test.yml index 7bb7faa07..deab35ef0 100644 --- a/.github/workflows/ci_test.yml +++ b/.github/workflows/ci_test.yml @@ -139,8 +139,7 @@ jobs: mkdir .\data\test\runs - name: Build oxen rust project - run: | - cargo build --workspace + run: cargo build --workspace --profile test # use test profile so we don't have to rebuild later - name: Setup oxen-server user (Linux/macOS) if: matrix.platform != 'windows' @@ -206,7 +205,7 @@ jobs: uv sync --no-install-project source .venv/bin/activate - maturin develop + maturin develop --profile test pytest -s tests - name: Run oxen-python tests (Windows) @@ -219,5 +218,5 @@ jobs: uv sync --no-install-project dir .venv .venv\Scripts\Activate.ps1 - maturin develop + maturin develop --profile test pytest -s tests --ignore=tests/test_data_frame.py --ignore=tests/test_embeddings.py --ignore=tests/test_fsspec_backend.py From 239b10d5b49453f243c813a769a4f0ff0d50af03 Mon Sep 17 00:00:00 2001 From: Nathan Stocks Date: Fri, 27 Mar 2026 13:49:48 -0600 Subject: [PATCH 05/20] use Rust's lld linker on Windows --- .cargo/config.toml | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 .cargo/config.toml diff --git a/.cargo/config.toml b/.cargo/config.toml new file mode 100644 index 000000000..c4ebe008d --- /dev/null +++ b/.cargo/config.toml @@ -0,0 +1,2 @@ +[target.x86_64-pc-windows-msvc] +linker = "rust-lld.exe" From 20179d5d7968b73858ac9956458eed7ad579ead9 Mon Sep 17 00:00:00 2001 From: Nathan Stocks Date: Fri, 27 Mar 2026 14:55:11 -0600 Subject: [PATCH 06/20] have oxen-py use the glob from the workspace --- crates/oxen-py/Cargo.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/oxen-py/Cargo.toml b/crates/oxen-py/Cargo.toml index 05ddd7c51..8df78eeca 100644 --- a/crates/oxen-py/Cargo.toml +++ b/crates/oxen-py/Cargo.toml @@ -28,5 +28,5 @@ uuid = { workspace = true } [build-dependencies] bindgen = { version = "0.71.1", default-features = false, features = ["runtime"] } cc = { version = "1.0", features = ["parallel"] } -glob = "0.3" +glob = { workspace = true } pkg-config = { version = "0.3", optional = true } From 99fdd7ac8f2512fed0548ed96075c25f14e47fce Mon Sep 17 00:00:00 2001 From: Nathan Stocks Date: Fri, 27 Mar 2026 14:55:36 -0600 Subject: [PATCH 07/20] the test profile doesn't produce symbols for Python to use, so have everything use the dev profile instead --- .github/workflows/ci_test.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/ci_test.yml b/.github/workflows/ci_test.yml index deab35ef0..7d04f0200 100644 --- a/.github/workflows/ci_test.yml +++ b/.github/workflows/ci_test.yml @@ -139,7 +139,7 @@ jobs: mkdir .\data\test\runs - name: Build oxen rust project - run: cargo build --workspace --profile test # use test profile so we don't have to rebuild later + run: cargo build --workspace - name: Setup oxen-server user (Linux/macOS) if: matrix.platform != 'windows' @@ -157,13 +157,13 @@ jobs: if: matrix.platform != 'windows' run: | ./target/debug/oxen-server start & - cargo nextest run --workspace --profile ci + cargo nextest run --workspace --profile ci --cargo-profile dev - name: Run oxen rust tests (Windows) if: matrix.platform == 'windows' run: | Start-Process -FilePath "${{ github.workspace }}\target\debug\oxen-server.exe" -WindowStyle Hidden -ArgumentList "start" - cargo nextest run --workspace --profile ci + cargo nextest run --workspace --profile ci --cargo-profile dev # CLI Tests - name: Run CLI tests (Linux/macOS) @@ -205,7 +205,7 @@ jobs: uv sync --no-install-project source .venv/bin/activate - maturin develop --profile test + maturin develop pytest -s tests - name: Run oxen-python tests (Windows) @@ -218,5 +218,5 @@ jobs: uv sync --no-install-project dir .venv .venv\Scripts\Activate.ps1 - maturin develop --profile test + maturin develop pytest -s tests --ignore=tests/test_data_frame.py --ignore=tests/test_embeddings.py --ignore=tests/test_fsspec_backend.py From e1fee9ee77fe800bb4badcc54be1442d43afe8fd Mon Sep 17 00:00:00 2001 From: Nathan Stocks Date: Fri, 27 Mar 2026 15:24:51 -0600 Subject: [PATCH 08/20] use the latest version of each runner to avoid Node 20 vs 24 warnings --- .github/workflows/ci_test.yml | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci_test.yml b/.github/workflows/ci_test.yml index 7d04f0200..69dab4b15 100644 --- a/.github/workflows/ci_test.yml +++ b/.github/workflows/ci_test.yml @@ -55,10 +55,10 @@ jobs: df -h - name: Checkout - uses: actions/checkout@v4 + uses: actions/checkout@v6 - name: Configure AWS Credentials - uses: aws-actions/configure-aws-credentials@v4 + uses: aws-actions/configure-aws-credentials@v6 with: role-to-assume: ${{ env.AWS_ROLE }} role-duration-seconds: 3600 @@ -73,7 +73,7 @@ jobs: cache-workspace-crates: true - name: Install uv - uses: astral-sh/setup-uv@v6 + uses: astral-sh/setup-uv@v7 with: python-version: "3.11" # Test against the earliest supported Python version @@ -124,7 +124,9 @@ jobs: # echo "PKG_CONFIG_PATH=$pkgConfigPath" >> $env:GITHUB_ENV - name: Install nextest runner - uses: taiki-e/install-action@nextest + uses: taiki-e/install-action@v2 + with: + tool: nextest@0.9.114 # Oxen Rust Tests - name: Setup test directories (Linux/macOS) From 3d91530334663fad6643e0f1cf08d7356ddb1118 Mon Sep 17 00:00:00 2001 From: Nathan Stocks Date: Fri, 27 Mar 2026 16:18:49 -0600 Subject: [PATCH 09/20] try using a ramdisk on windows for cargo target dir and oxen data dirs --- .github/workflows/ci_test.yml | 26 ++++++++++++++++++++++---- 1 file changed, 22 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci_test.yml b/.github/workflows/ci_test.yml index 69dab4b15..bc8ab98bc 100644 --- a/.github/workflows/ci_test.yml +++ b/.github/workflows/ci_test.yml @@ -64,6 +64,24 @@ jobs: role-duration-seconds: 3600 aws-region: ${{ env.AWS_REGION }} + - name: Setup ramdisk (Windows) + if: matrix.platform == 'windows' + run: | + choco install imdisk -y + imdisk -a -s 12G -m R: -p "/fs:ntfs /q /y" + + # Use ramdisk for cargo build artifacts + echo "CARGO_TARGET_DIR=R:\target" >> $env:GITHUB_ENV + + # Move repo data directory to ramdisk for faster test I/O + if (Test-Path "data") { + Copy-Item -Recurse -Path "data" -Destination "R:\data" + Remove-Item -Recurse -Force "data" + } else { + New-Item -ItemType Directory -Path "R:\data" | Out-Null + } + cmd /c mklink /J data R:\data + - name: Setup Rust Toolchain uses: actions-rust-lang/setup-rust-toolchain@v1 with: @@ -152,7 +170,7 @@ jobs: - name: Setup oxen-server user (Windows) if: matrix.platform == 'windows' run: | - .\target\debug\oxen-server.exe add-user --email ox@oxen.ai --name Ox --output user_config.toml + & "$env:CARGO_TARGET_DIR\debug\oxen-server.exe" add-user --email ox@oxen.ai --name Ox --output user_config.toml copy user_config.toml data\test\config\user_config.toml - name: Run oxen rust tests (Linux/macOS) @@ -164,7 +182,7 @@ jobs: - name: Run oxen rust tests (Windows) if: matrix.platform == 'windows' run: | - Start-Process -FilePath "${{ github.workspace }}\target\debug\oxen-server.exe" -WindowStyle Hidden -ArgumentList "start" + Start-Process "$env:CARGO_TARGET_DIR\debug\oxen-server.exe" -ArgumentList "start" cargo nextest run --workspace --profile ci --cargo-profile dev # CLI Tests @@ -180,7 +198,7 @@ jobs: - name: Run CLI tests (Windows) if: matrix.platform == 'windows' env: - PATH: ${{ env.PATH }};${{ github.workspace }}/target/debug + PATH: ${{ env.PATH }};${{ env.CARGO_TARGET_DIR }}\debug run: | cd ${{ github.workspace }}\cli-test uv sync @@ -196,7 +214,7 @@ jobs: - name: Copy binaries for Python tests (Windows) if: matrix.platform == 'windows' run: | - copy target\debug\oxen.exe ${{ github.workspace }}\oxen.exe + copy "$env:CARGO_TARGET_DIR\debug\oxen.exe" ${{ github.workspace }}\oxen.exe - name: Run oxen-python tests (Linux/macOS) if: matrix.platform != 'windows' From 3bf26ed12943130be1d95da322e2b1cf838a2960 Mon Sep 17 00:00:00 2001 From: Nathan Stocks Date: Fri, 27 Mar 2026 16:22:00 -0600 Subject: [PATCH 10/20] narrow the windows oxen-server ramdisk usage to data/test/runs --- .github/workflows/ci_test.yml | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/.github/workflows/ci_test.yml b/.github/workflows/ci_test.yml index bc8ab98bc..db3ac1a6f 100644 --- a/.github/workflows/ci_test.yml +++ b/.github/workflows/ci_test.yml @@ -73,14 +73,10 @@ jobs: # Use ramdisk for cargo build artifacts echo "CARGO_TARGET_DIR=R:\target" >> $env:GITHUB_ENV - # Move repo data directory to ramdisk for faster test I/O - if (Test-Path "data") { - Copy-Item -Recurse -Path "data" -Destination "R:\data" - Remove-Item -Recurse -Force "data" - } else { - New-Item -ItemType Directory -Path "R:\data" | Out-Null - } - cmd /c mklink /J data R:\data + # Junction only the test runs directory to ramdisk for faster test I/O + New-Item -ItemType Directory -Path "R:\runs" | Out-Null + New-Item -ItemType Directory -Path "data\test" -Force | Out-Null + cmd /c mklink /J data\test\runs R:\runs - name: Setup Rust Toolchain uses: actions-rust-lang/setup-rust-toolchain@v1 From 06e17509ae59a3d6063c4ac8be5b14481449597a Mon Sep 17 00:00:00 2001 From: Nathan Stocks Date: Fri, 27 Mar 2026 16:30:33 -0600 Subject: [PATCH 11/20] avoid using a junction; instead use an env var to point oxen-server to the ramdisk --- .github/workflows/ci_test.yml | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci_test.yml b/.github/workflows/ci_test.yml index db3ac1a6f..921474b6b 100644 --- a/.github/workflows/ci_test.yml +++ b/.github/workflows/ci_test.yml @@ -73,10 +73,8 @@ jobs: # Use ramdisk for cargo build artifacts echo "CARGO_TARGET_DIR=R:\target" >> $env:GITHUB_ENV - # Junction only the test runs directory to ramdisk for faster test I/O - New-Item -ItemType Directory -Path "R:\runs" | Out-Null - New-Item -ItemType Directory -Path "data\test" -Force | Out-Null - cmd /c mklink /J data\test\runs R:\runs + # Use ramdisk for oxen-server sync directory + echo "SYNC_DIR=R:\sync" >> $env:GITHUB_ENV - name: Setup Rust Toolchain uses: actions-rust-lang/setup-rust-toolchain@v1 @@ -153,6 +151,7 @@ jobs: if: matrix.platform == 'windows' run: | mkdir .\data\test\runs + mkdir R:\sync - name: Build oxen rust project run: cargo build --workspace From 584e43c3f12fe7cf0ef6ff6f717ecfe562fd276c Mon Sep 17 00:00:00 2001 From: Nathan Stocks Date: Fri, 27 Mar 2026 16:43:37 -0600 Subject: [PATCH 12/20] cache cargo build artifacts on the ramdisk in windows --- .github/workflows/ci_test.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/ci_test.yml b/.github/workflows/ci_test.yml index 921474b6b..bd336b52a 100644 --- a/.github/workflows/ci_test.yml +++ b/.github/workflows/ci_test.yml @@ -83,6 +83,7 @@ jobs: cache: true # This is the default--making it explicit. This uses Swatinem/rust-cache under the hood. cache-all-crates: true cache-workspace-crates: true + cache-directories: ${{ env.CARGO_TARGET_DIR }} # Cache cargo build artifacts on the ramdisk in windows - name: Install uv uses: astral-sh/setup-uv@v7 From 76f10d9d975a45732098cc5c8135d6a26f1b9232 Mon Sep 17 00:00:00 2001 From: Nathan Stocks Date: Fri, 27 Mar 2026 16:52:41 -0600 Subject: [PATCH 13/20] use a virtual hard drive file on the ramdisk to provide full NTFS compatibility in order to build libduckdb-sys --- .github/workflows/ci_test.yml | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci_test.yml b/.github/workflows/ci_test.yml index bd336b52a..d6d2f279f 100644 --- a/.github/workflows/ci_test.yml +++ b/.github/workflows/ci_test.yml @@ -67,8 +67,19 @@ jobs: - name: Setup ramdisk (Windows) if: matrix.platform == 'windows' run: | + # Layer 1: imdisk ramdisk at T: (RAM-backed, but driver lacks full NTFS support, so building libduckdb-sys fails) choco install imdisk -y - imdisk -a -s 12G -m R: -p "/fs:ntfs /q /y" + imdisk -a -s 12G -m T: -p "/fs:ntfs /q /y" + + # Layer 2: VHD file on the ramdisk, mounted at R: (standard NTFS driver, full support) + @" + create vdisk file="T:\build.vhdx" maximum=11264 type=fixed + select vdisk file="T:\build.vhdx" + attach vdisk + create partition primary + format fs=ntfs quick label=CargoBuild + assign letter=R + "@ | diskpart # Use ramdisk for cargo build artifacts echo "CARGO_TARGET_DIR=R:\target" >> $env:GITHUB_ENV From d8753e35052cb46a54cb3fa8019f2a5ffefdd4e7 Mon Sep 17 00:00:00 2001 From: Nathan Stocks Date: Fri, 27 Mar 2026 17:24:41 -0600 Subject: [PATCH 14/20] try bumping the size of the ramdisk and virtual hard drive --- .github/workflows/ci_test.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci_test.yml b/.github/workflows/ci_test.yml index d6d2f279f..b1d1a3d0c 100644 --- a/.github/workflows/ci_test.yml +++ b/.github/workflows/ci_test.yml @@ -67,13 +67,13 @@ jobs: - name: Setup ramdisk (Windows) if: matrix.platform == 'windows' run: | - # Layer 1: imdisk ramdisk at T: (RAM-backed, but driver lacks full NTFS support, so building libduckdb-sys fails) + # Layer 1: imdisk ramdisk at T: (RAM-backed, but driver lacks full NTFS support, so building libduckdb-sys ) choco install imdisk -y - imdisk -a -s 12G -m T: -p "/fs:ntfs /q /y" + imdisk -a -s 18G -m T: -p "/fs:ntfs /q /y" # Layer 2: VHD file on the ramdisk, mounted at R: (standard NTFS driver, full support) @" - create vdisk file="T:\build.vhdx" maximum=11264 type=fixed + create vdisk file="T:\build.vhdx" maximum=17920 type=fixed select vdisk file="T:\build.vhdx" attach vdisk create partition primary From ea24850c8ecd9ce5d979943a0595d0438441af31 Mon Sep 17 00:00:00 2001 From: Nathan Stocks Date: Fri, 27 Mar 2026 17:42:23 -0600 Subject: [PATCH 15/20] add configuration to store test temp files on the vhd in windows ci --- .github/workflows/ci_test.yml | 4 ++++ bin/test-rust | 3 +++ crates/lib/src/test.rs | 5 ++++- crates/server/src/test.rs | 3 +-- 4 files changed, 12 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci_test.yml b/.github/workflows/ci_test.yml index b1d1a3d0c..4c0cfab18 100644 --- a/.github/workflows/ci_test.yml +++ b/.github/workflows/ci_test.yml @@ -87,6 +87,9 @@ jobs: # Use ramdisk for oxen-server sync directory echo "SYNC_DIR=R:\sync" >> $env:GITHUB_ENV + # Use ramdisk for test harness run directories + echo "OXEN_TEST_RUN_DIR=R:\test\runs" >> $env:GITHUB_ENV + - name: Setup Rust Toolchain uses: actions-rust-lang/setup-rust-toolchain@v1 with: @@ -163,6 +166,7 @@ jobs: if: matrix.platform == 'windows' run: | mkdir .\data\test\runs + mkdir R:\test\runs mkdir R:\sync - name: Build oxen rust project diff --git a/bin/test-rust b/bin/test-rust index 915151b07..46c693bc9 100755 --- a/bin/test-rust +++ b/bin/test-rust @@ -53,6 +53,9 @@ cleanup() { echo "==> Removing test data..." rm -rf ./data/ox rm -rf ./data/test/runs + if [ -n "${OXEN_TEST_RUN_DIR:-}" ]; then + rm -rf "$OXEN_TEST_RUN_DIR" + fi else echo "==> Keeping test data in data/ox and data/test/runs" fi diff --git a/crates/lib/src/test.rs b/crates/lib/src/test.rs index a6a1dc9ec..84b3fe767 100644 --- a/crates/lib/src/test.rs +++ b/crates/lib/src/test.rs @@ -45,7 +45,10 @@ pub static REPO_ROOT: LazyLock = LazyLock::new(|| { pub static TEST_DATA_DIR: LazyLock = LazyLock::new(|| REPO_ROOT.join("data")); pub fn test_run_dir() -> PathBuf { - TEST_DATA_DIR.join("test").join("runs") + match std::env::var("OXEN_TEST_RUN_DIR") { + Ok(dir) => PathBuf::from(dir), + Err(_) => TEST_DATA_DIR.join("test").join("runs"), + } } pub fn test_host() -> String { diff --git a/crates/server/src/test.rs b/crates/server/src/test.rs index 9f8f9ccff..094228776 100644 --- a/crates/server/src/test.rs +++ b/crates/server/src/test.rs @@ -16,8 +16,7 @@ use liboxen::test::init_test_env; pub fn get_sync_dir() -> Result { init_test_env(); - let sync_dir = - liboxen::test::REPO_ROOT.join(format!("data/test/runs/{}", uuid::Uuid::new_v4())); + let sync_dir = liboxen::test::test_run_dir().join(uuid::Uuid::new_v4().to_string()); util::fs::create_dir_all(&sync_dir)?; Ok(sync_dir) } From 604df350cde93f11e47fbef2043e4120ce469112 Mon Sep 17 00:00:00 2001 From: Nathan Stocks Date: Fri, 27 Mar 2026 17:47:19 -0600 Subject: [PATCH 16/20] use the same canonicalization in all the places--it spits out a different syntax on a windows vhd --- crates/lib/src/core/v_latest/workspaces/files.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/lib/src/core/v_latest/workspaces/files.rs b/crates/lib/src/core/v_latest/workspaces/files.rs index e1d0cc37c..6e9f9b778 100644 --- a/crates/lib/src/core/v_latest/workspaces/files.rs +++ b/crates/lib/src/core/v_latest/workspaces/files.rs @@ -727,7 +727,7 @@ pub fn decompress_zip(zip_filepath: &PathBuf) -> Result, OxenError> // Get the canonical (absolute) path of the parent directory let parent = match zip_filepath.parent() { - Some(p) => p.canonicalize()?, + Some(p) => crate::util::fs::canonicalize(p)?, None => std::env::current_dir()?, }; From adfee3cf2a2a08ca42855ecc0d39dc1a50b961cf Mon Sep 17 00:00:00 2001 From: Nathan Stocks Date: Fri, 27 Mar 2026 18:02:00 -0600 Subject: [PATCH 17/20] try using only the vhd/ramdisk for test data to see if it will fit --- .github/workflows/ci_test.yml | 23 +++++++++-------------- 1 file changed, 9 insertions(+), 14 deletions(-) diff --git a/.github/workflows/ci_test.yml b/.github/workflows/ci_test.yml index 4c0cfab18..e44847eec 100644 --- a/.github/workflows/ci_test.yml +++ b/.github/workflows/ci_test.yml @@ -67,27 +67,22 @@ jobs: - name: Setup ramdisk (Windows) if: matrix.platform == 'windows' run: | - # Layer 1: imdisk ramdisk at T: (RAM-backed, but driver lacks full NTFS support, so building libduckdb-sys ) + # Layer 1: imdisk ramdisk at T: (RAM-backed, but driver lacks full NTFS support) choco install imdisk -y imdisk -a -s 18G -m T: -p "/fs:ntfs /q /y" - # Layer 2: VHD file on the ramdisk, mounted at R: (standard NTFS driver, full support) + # Layer 2: VHD file on the ramdisk, mounted at R: (standard NTFS driver, full canonicalize support) @" create vdisk file="T:\build.vhdx" maximum=17920 type=fixed select vdisk file="T:\build.vhdx" attach vdisk create partition primary - format fs=ntfs quick label=CargoBuild + format fs=ntfs quick label=TestData assign letter=R "@ | diskpart - # Use ramdisk for cargo build artifacts - echo "CARGO_TARGET_DIR=R:\target" >> $env:GITHUB_ENV - - # Use ramdisk for oxen-server sync directory + # Use ramdisk for oxen-server sync directory and test runs (not cargo target--too large) echo "SYNC_DIR=R:\sync" >> $env:GITHUB_ENV - - # Use ramdisk for test harness run directories echo "OXEN_TEST_RUN_DIR=R:\test\runs" >> $env:GITHUB_ENV - name: Setup Rust Toolchain @@ -97,7 +92,7 @@ jobs: cache: true # This is the default--making it explicit. This uses Swatinem/rust-cache under the hood. cache-all-crates: true cache-workspace-crates: true - cache-directories: ${{ env.CARGO_TARGET_DIR }} # Cache cargo build artifacts on the ramdisk in windows + cache-directories: ${{ env.CARGO_TARGET_DIR }} - name: Install uv uses: astral-sh/setup-uv@v7 @@ -181,7 +176,7 @@ jobs: - name: Setup oxen-server user (Windows) if: matrix.platform == 'windows' run: | - & "$env:CARGO_TARGET_DIR\debug\oxen-server.exe" add-user --email ox@oxen.ai --name Ox --output user_config.toml + .\target\debug\oxen-server.exe add-user --email ox@oxen.ai --name Ox --output user_config.toml copy user_config.toml data\test\config\user_config.toml - name: Run oxen rust tests (Linux/macOS) @@ -193,7 +188,7 @@ jobs: - name: Run oxen rust tests (Windows) if: matrix.platform == 'windows' run: | - Start-Process "$env:CARGO_TARGET_DIR\debug\oxen-server.exe" -ArgumentList "start" + Start-Process ".\target\debug\oxen-server.exe" -ArgumentList "start" cargo nextest run --workspace --profile ci --cargo-profile dev # CLI Tests @@ -209,7 +204,7 @@ jobs: - name: Run CLI tests (Windows) if: matrix.platform == 'windows' env: - PATH: ${{ env.PATH }};${{ env.CARGO_TARGET_DIR }}\debug + PATH: ${{ env.PATH }};${{ github.workspace }}\target\debug run: | cd ${{ github.workspace }}\cli-test uv sync @@ -225,7 +220,7 @@ jobs: - name: Copy binaries for Python tests (Windows) if: matrix.platform == 'windows' run: | - copy "$env:CARGO_TARGET_DIR\debug\oxen.exe" ${{ github.workspace }}\oxen.exe + copy target\debug\oxen.exe ${{ github.workspace }}\oxen.exe - name: Run oxen-python tests (Linux/macOS) if: matrix.platform != 'windows' From cf5a0be350ee6446b3ac44b3814ea5705ec774fd Mon Sep 17 00:00:00 2001 From: Nathan Stocks Date: Sat, 28 Mar 2026 16:17:10 -0600 Subject: [PATCH 18/20] try using just a ramdisk for test data --- .github/workflows/ci_test.yml | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/.github/workflows/ci_test.yml b/.github/workflows/ci_test.yml index e44847eec..c7d1a31ba 100644 --- a/.github/workflows/ci_test.yml +++ b/.github/workflows/ci_test.yml @@ -67,19 +67,8 @@ jobs: - name: Setup ramdisk (Windows) if: matrix.platform == 'windows' run: | - # Layer 1: imdisk ramdisk at T: (RAM-backed, but driver lacks full NTFS support) choco install imdisk -y - imdisk -a -s 18G -m T: -p "/fs:ntfs /q /y" - - # Layer 2: VHD file on the ramdisk, mounted at R: (standard NTFS driver, full canonicalize support) - @" - create vdisk file="T:\build.vhdx" maximum=17920 type=fixed - select vdisk file="T:\build.vhdx" - attach vdisk - create partition primary - format fs=ntfs quick label=TestData - assign letter=R - "@ | diskpart + imdisk -a -s 16G -m R: -p "/fs:ntfs /q /y" # Use ramdisk for oxen-server sync directory and test runs (not cargo target--too large) echo "SYNC_DIR=R:\sync" >> $env:GITHUB_ENV From 848727aeca3a79f45c8673898453dc8fe55bb4cc Mon Sep 17 00:00:00 2001 From: Nathan Stocks Date: Mon, 30 Mar 2026 11:32:39 -0600 Subject: [PATCH 19/20] try splitting python tests into separate workflows --- .github/workflows/ci_test.yml | 189 +++++++++++++++++++++------------- 1 file changed, 117 insertions(+), 72 deletions(-) diff --git a/.github/workflows/ci_test.yml b/.github/workflows/ci_test.yml index c7d1a31ba..7dc3b46a3 100644 --- a/.github/workflows/ci_test.yml +++ b/.github/workflows/ci_test.yml @@ -3,9 +3,17 @@ name: 🐂📝 Continuous integration - Test Suite on: workflow_call: +env: + AWS_REGION: us-west-1 + AWS_ROLE: arn:aws:iam::213020545630:role/ci-test-integration-role + +permissions: + id-token: write + contents: read + jobs: - test: - name: Test Suite + rust-tests: + name: Rust Tests runs-on: ${{ matrix.os }} defaults: run: @@ -25,14 +33,6 @@ jobs: shell: powershell fail-fast: false - env: - AWS_REGION: us-west-1 - AWS_ROLE: arn:aws:iam::213020545630:role/ci-test-integration-role - - permissions: - id-token: write - contents: read - steps: - name: Free up disk space if: matrix.platform == 'linux' @@ -64,16 +64,6 @@ jobs: role-duration-seconds: 3600 aws-region: ${{ env.AWS_REGION }} - - name: Setup ramdisk (Windows) - if: matrix.platform == 'windows' - run: | - choco install imdisk -y - imdisk -a -s 16G -m R: -p "/fs:ntfs /q /y" - - # Use ramdisk for oxen-server sync directory and test runs (not cargo target--too large) - echo "SYNC_DIR=R:\sync" >> $env:GITHUB_ENV - echo "OXEN_TEST_RUN_DIR=R:\test\runs" >> $env:GITHUB_ENV - - name: Setup Rust Toolchain uses: actions-rust-lang/setup-rust-toolchain@v1 with: @@ -81,7 +71,6 @@ jobs: cache: true # This is the default--making it explicit. This uses Swatinem/rust-cache under the hood. cache-all-crates: true cache-workspace-crates: true - cache-directories: ${{ env.CARGO_TARGET_DIR }} - name: Install uv uses: astral-sh/setup-uv@v7 @@ -95,45 +84,6 @@ jobs: brew install redis pkg-config brew services start redis - # NOTE: This adds a lot of bloat and takes a long time to build. - # we have ffmpeg disabled by default in the CI pipeline - # Set PKG_CONFIG_PATH so pkg-config can find FFmpeg libraries - # brew install ffmpeg@7 imagemagick - # echo "PKG_CONFIG_PATH=$(brew --prefix ffmpeg@7)/lib/pkgconfig:$PKG_CONFIG_PATH" >> $GITHUB_ENV - - # NOTE: This adds a lot of bloat to the Windows image and takes a long time to build. - # we have ffmpeg disabled by default in the CI pipeline - # - name: Install dependencies (Linux) - # if: matrix.platform == 'linux' - # run: | - # sudo apt-get update - # sudo apt install -y clang libavcodec-dev libavformat-dev libavutil-dev libavfilter-dev libavdevice-dev pkg-config - - # - name: Install dependencies (Windows) - # if: matrix.platform == 'windows' - # run: | - # # Install clang (via llvm) and pkg-config via Chocolatey - # choco install -y llvm pkgconfiglite - - # # Install vcpkg for FFmpeg static development libraries (libavcodec, libavformat, libavutil, libavfilter, libavdevice) - # # Using x64-windows-static-md for static libraries with dynamic MSVC runtime (better compatibility) - # git clone https://github.com/microsoft/vcpkg.git C:\vcpkg - # cd C:\vcpkg - # .\bootstrap-vcpkg.bat - - # # Install FFmpeg (includes libavutil, libavcodec, libavformat, libavfilter, libavdevice) - # # FFmpeg installation provides libavutil.pc and other .pc files needed by pkg-config - # .\vcpkg.exe install ffmpeg:x64-windows-static-md - - # # Set VCPKG_ROOT for cargo to find FFmpeg libraries - # echo "VCPKG_ROOT=C:\vcpkg" >> $env:GITHUB_ENV - - # # Set PKG_CONFIG_PATH so pkg-config can find libavutil.pc and other FFmpeg .pc files - # # vcpkg installs pkg-config files in the installed//lib/pkgconfig directory - # # This must be set before cargo build runs, as ffmpeg-sys-next uses pkg-config during build - # $pkgConfigPath = "C:\vcpkg\installed\x64-windows-static-md\lib\pkgconfig" - # echo "PKG_CONFIG_PATH=$pkgConfigPath" >> $env:GITHUB_ENV - - name: Install nextest runner uses: taiki-e/install-action@v2 with: @@ -150,8 +100,6 @@ jobs: if: matrix.platform == 'windows' run: | mkdir .\data\test\runs - mkdir R:\test\runs - mkdir R:\sync - name: Build oxen rust project run: cargo build --workspace @@ -199,25 +147,125 @@ jobs: uv sync uv run pytest tests -v - # Oxen Python Tests - - name: Copy binaries for Python tests (Linux/macOS) + python-tests: + name: Python Tests + runs-on: ${{ matrix.os }} + defaults: + run: + shell: ${{ matrix.shell }} + strategy: + matrix: + os: [ubuntu-latest, macos-latest, windows-x64-8cpu-32ram-300ssd] + include: + - os: ubuntu-latest + platform: linux + shell: bash -leo pipefail {0} + - os: macos-latest + platform: macos + shell: bash -leo pipefail {0} + - os: windows-x64-8cpu-32ram-300ssd + platform: windows + shell: powershell + fail-fast: false + + steps: + - name: Free up disk space + if: matrix.platform == 'linux' + run: | + echo "=== Before cleanup ===" + df -h + + sudo rm -rf /usr/share/dotnet + sudo rm -rf /usr/share/swift + sudo rm -rf /usr/local/share/powershell + sudo rm -rf /usr/local/lib/android + sudo rm -rf /opt/ghc + sudo apt-get clean + + echo "=== After cleanup ===" + df -h + + - name: Checkout + uses: actions/checkout@v6 + + - name: Configure AWS Credentials + uses: aws-actions/configure-aws-credentials@v6 + with: + role-to-assume: ${{ env.AWS_ROLE }} + role-duration-seconds: 3600 + aws-region: ${{ env.AWS_REGION }} + + - name: Setup Rust Toolchain + uses: actions-rust-lang/setup-rust-toolchain@v1 + with: + rustflags: ${{ matrix.platform == 'windows' && '-D warnings -C link-arg=/DEBUG:NONE' || '-D warnings' }} + cache: true + cache-all-crates: true + cache-workspace-crates: true + + - name: Install uv + uses: astral-sh/setup-uv@v7 + with: + python-version: "3.11" + + - name: Install dependencies (macOS) + if: matrix.platform == 'macos' + run: | + brew update + brew install redis pkg-config + brew services start redis + + - name: Build oxen binaries + run: cargo build -p oxen-cli -p oxen-server + + - name: Setup test directories (Linux/macOS) + if: matrix.platform != 'windows' + run: | + mkdir -p data/test/runs + mkdir -p /tmp/oxen_sync/ + + - name: Setup test directories (Windows) + if: matrix.platform == 'windows' + run: | + mkdir .\data\test\runs + + - name: Setup oxen-server user (Linux/macOS) + if: matrix.platform != 'windows' + run: | + ./target/debug/oxen-server add-user --email ox@oxen.ai --name Ox --output user_config.toml + cp user_config.toml data/test/config/user_config.toml + + - name: Setup oxen-server user (Windows) + if: matrix.platform == 'windows' + run: | + .\target\debug\oxen-server.exe add-user --email ox@oxen.ai --name Ox --output user_config.toml + copy user_config.toml data\test\config\user_config.toml + + - name: Start oxen-server (Linux/macOS) + if: matrix.platform != 'windows' + run: ./target/debug/oxen-server start & + + - name: Start oxen-server (Windows) + if: matrix.platform == 'windows' + run: Start-Process ".\target\debug\oxen-server.exe" -ArgumentList "start" + + - name: Configure oxen user (Linux/macOS) if: matrix.platform != 'windows' run: | cp ${{ github.workspace }}/target/debug/oxen ~/oxen - chmod +x ~/oxen ~/oxen + chmod +x ~/oxen + ~/oxen config --name "Bessie Testington" --email "bessie@yourcompany.com" - - name: Copy binaries for Python tests (Windows) + - name: Configure oxen user (Windows) if: matrix.platform == 'windows' run: | copy target\debug\oxen.exe ${{ github.workspace }}\oxen.exe + ${{ github.workspace }}\oxen.exe config --name "Bessie Testington" --email "bessie@yourcompany.com" - name: Run oxen-python tests (Linux/macOS) if: matrix.platform != 'windows' run: | cd ${{ github.workspace }}/oxen-python - - ~/oxen config --name "Bessie Testington" --email "bessie@yourcompany.com" - uv sync --no-install-project source .venv/bin/activate maturin develop @@ -227,9 +275,6 @@ jobs: if: matrix.platform == 'windows' run: | cd ${{ github.workspace }}\oxen-python - - ${{ github.workspace }}\oxen.exe config --name "Bessie Testington" --email "bessie@yourcompany.com" - uv sync --no-install-project dir .venv .venv\Scripts\Activate.ps1 From 48846ad2471c9bae819ec47f40bde8663ec67014 Mon Sep 17 00:00:00 2001 From: Nathan Stocks Date: Mon, 30 Mar 2026 12:38:15 -0600 Subject: [PATCH 20/20] use the same build options in python tests so we don't rebuild --- .github/workflows/ci_test.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci_test.yml b/.github/workflows/ci_test.yml index 7dc3b46a3..9d9deeb84 100644 --- a/.github/workflows/ci_test.yml +++ b/.github/workflows/ci_test.yml @@ -215,8 +215,8 @@ jobs: brew install redis pkg-config brew services start redis - - name: Build oxen binaries - run: cargo build -p oxen-cli -p oxen-server + - name: Build oxen rust project + run: cargo build --workspace - name: Setup test directories (Linux/macOS) if: matrix.platform != 'windows'