diff --git a/.claude/settings.local.json b/.claude/settings.local.json index 7a8244e5..8fa1a294 100644 --- a/.claude/settings.local.json +++ b/.claude/settings.local.json @@ -12,7 +12,10 @@ "Bash(mix deps.get:*)", "Bash(cargo fmt:*)", "WebFetch(domain:docs.github.com)", - "Bash(yamllint:*)" + "Bash(yamllint:*)", + "Bash(mix help:*)", + "Bash(MIX_ENV=test mix clean:*)", + "Bash(MIX_ENV=test mix compile:*)" ], "deny": [], "ask": [] diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 38db9848..8495ff28 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -41,7 +41,7 @@ jobs: ~/.cargo/registry/index/ ~/.cargo/registry/cache/ ~/.cargo/git/db/ - native/ecto_libsql/target/ + target/ key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.toml') }} restore-keys: | ${{ runner.os }}-cargo- @@ -76,19 +76,6 @@ jobs: with: toolchain: stable - - name: Cache Rust dependencies - uses: actions/cache@v4 - with: - path: | - ~/.cargo/bin/ - ~/.cargo/registry/index/ - ~/.cargo/registry/cache/ - ~/.cargo/git/db/ - native/ecto_libsql/target/ - key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.toml') }} - restore-keys: | - ${{ runner.os }}-cargo- - - name: Set up Elixir uses: erlef/setup-beam@v1 with: @@ -101,7 +88,7 @@ jobs: path: | deps _build - key: ${{ runner.os }}-mix-${{ matrix.elixir }}-${{ matrix.otp }}-${{ hashFiles('**/mix.exs', '**/Cargo.toml') }} + key: ${{ runner.os }}-mix-${{ matrix.elixir }}-${{ matrix.otp }}-${{ hashFiles('mix.exs', '**/Cargo.toml') }} restore-keys: | ${{ runner.os }}-mix-${{ matrix.elixir }}-${{ matrix.otp }}- @@ -111,11 +98,11 @@ jobs: - name: Check Elixir formatting run: mix format --check-formatted - - name: Build Rust NIF library - run: cargo build --release --manifest-path native/ecto_libsql/Cargo.toml - - name: Compile (warnings as errors) - run: mix compile --warnings-as-errors + run: mix compile --force --warnings-as-errors + + - name: Debug .so files + run: find . -name '*.so' -print - name: Run Elixir tests run: mix test @@ -140,19 +127,6 @@ jobs: with: toolchain: stable - - name: Cache Rust dependencies - uses: actions/cache@v4 - with: - path: | - ~/.cargo/bin/ - ~/.cargo/registry/index/ - ~/.cargo/registry/cache/ - ~/.cargo/git/db/ - native/ecto_libsql/target/ - key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.toml') }} - restore-keys: | - ${{ runner.os }}-cargo- - - name: Set up Elixir uses: erlef/setup-beam@v1 with: @@ -165,18 +139,15 @@ jobs: path: | deps _build - key: ${{ runner.os }}-mix-${{ matrix.elixir }}-${{ matrix.otp }}-${{ hashFiles('**/mix.exs', '**/Cargo.toml') }} + key: ${{ runner.os }}-mix-${{ matrix.elixir }}-${{ matrix.otp }}-${{ hashFiles('mix.exs', '**/Cargo.toml') }} restore-keys: | ${{ runner.os }}-mix-${{ matrix.elixir }}-${{ matrix.otp }}- - name: Install Mix dependencies run: mix deps.get - - name: Build Rust NIF library - run: cargo build --release --manifest-path native/ecto_libsql/Cargo.toml - - name: Compile (warnings as errors) - run: mix compile --warnings-as-errors + run: mix compile --force --warnings-as-errors - name: Run Elixir tests run: mix test @@ -205,7 +176,7 @@ jobs: path: | deps _build - key: ${{ runner.os }}-integration-mix-${{ hashFiles('**/mix.exs', '**/Cargo.toml') }} + key: ${{ runner.os }}-integration-mix-${{ hashFiles('mix.exs', '**/Cargo.toml') }} restore-keys: | ${{ runner.os }}-integration-mix- @@ -217,7 +188,7 @@ jobs: ~/.cargo/registry/index/ ~/.cargo/registry/cache/ ~/.cargo/git/db/ - native/ecto_libsql/target/ + target/ key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.toml') }} restore-keys: | ${{ runner.os }}-cargo- @@ -233,8 +204,7 @@ jobs: - name: Compile project run: | echo "Compiling with MIX_ENV=$MIX_ENV" - mix compile --force --verbose - echo "Compilation finished" + mix compile --force - name: Verify NIF library exists run: | @@ -301,7 +271,7 @@ jobs: path: | deps _build - key: ${{ runner.os }}-turso-mix-${{ hashFiles('**/mix.exs', '**/Cargo.toml') }} + key: ${{ runner.os }}-turso-mix-${{ hashFiles('mix.exs', '**/Cargo.toml') }} restore-keys: | ${{ runner.os }}-turso-mix- @@ -314,7 +284,7 @@ jobs: ~/.cargo/registry/index/ ~/.cargo/registry/cache/ ~/.cargo/git/db/ - native/ecto_libsql/target/ + target/ key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.toml') }} restore-keys: | ${{ runner.os }}-cargo- @@ -325,7 +295,7 @@ jobs: - name: Compile project if: steps.check-secrets.outputs.skip != 'true' - run: mix compile + run: mix compile --force - name: Run Turso remote tests if: steps.check-secrets.outputs.skip != 'true'