Skip to content

Commit 0ec5cd7

Browse files
committed
fix(ci): fix Linux build and lint failures from PR #4
- Remove unused getCIEDir() function that golangci-lint flagged - Fix Linux build: copy platform-specific libcozo_c.a to repo lib/ instead of system paths, so CGO LDFLAGS -L${SRCDIR}/../../lib finds the correct library (not the vendored macOS one)
1 parent ea8918a commit 0ec5cd7

3 files changed

Lines changed: 6 additions & 16 deletions

File tree

.github/workflows/ci.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,8 @@ jobs:
6868
# Download pre-built CozoDB C library (gzip compressed)
6969
curl -L "https://github.com/cozodb/cozo/releases/download/v${COZO_VERSION}/libcozo_c-${COZO_VERSION}-x86_64-unknown-linux-gnu.a.gz" -o /tmp/libcozo_c.a.gz
7070
gunzip /tmp/libcozo_c.a.gz
71-
sudo cp /tmp/libcozo_c.a /usr/lib/libcozo_c.a
71+
# Place in repo lib/ so CGO LDFLAGS -L${SRCDIR}/../../lib finds the correct platform library
72+
cp /tmp/libcozo_c.a lib/libcozo_c.a
7273
7374
- name: Download modules
7475
run: go mod download
@@ -169,7 +170,8 @@ jobs:
169170
# Download pre-built CozoDB C library (gzip compressed)
170171
curl -L "https://github.com/cozodb/cozo/releases/download/v${COZO_VERSION}/libcozo_c-${COZO_VERSION}-x86_64-unknown-linux-gnu.a.gz" -o /tmp/libcozo_c.a.gz
171172
gunzip /tmp/libcozo_c.a.gz
172-
sudo cp /tmp/libcozo_c.a /usr/lib/libcozo_c.a
173+
# Place in repo lib/ so CGO LDFLAGS -L${SRCDIR}/../../lib finds the correct platform library
174+
cp /tmp/libcozo_c.a lib/libcozo_c.a
173175
174176
- name: Build
175177
run: |

.github/workflows/release.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -119,8 +119,8 @@ jobs:
119119
run: |
120120
curl -L "https://github.com/cozodb/cozo/releases/download/v${COZO_VERSION}/libcozo_c-${COZO_VERSION}-${COZO_PLATFORM}.a.gz" -o /tmp/libcozo_c.a.gz
121121
gunzip /tmp/libcozo_c.a.gz
122-
sudo mkdir -p /usr/local/lib
123-
sudo cp /tmp/libcozo_c.a /usr/local/lib/libcozo_c.a
122+
# Place in repo lib/ so CGO LDFLAGS -L${SRCDIR}/../../lib finds the correct platform library
123+
cp /tmp/libcozo_c.a lib/libcozo_c.a
124124
125125
- name: Build binary
126126
env:

cmd/cie/config.go

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -353,18 +353,6 @@ func (c *Config) applyEnvOverrides() {
353353
}
354354
}
355355

356-
// getCIEDir returns the path to ~/.cie directory, creating it if needed.
357-
func getCIEDir() (string, error) {
358-
home, err := os.UserHomeDir()
359-
if err != nil {
360-
return "", err
361-
}
362-
cieDir := filepath.Join(home, ".cie")
363-
if err := os.MkdirAll(cieDir, 0750); err != nil {
364-
return "", err
365-
}
366-
return cieDir, nil
367-
}
368356

369357
// getEnv retrieves an environment variable or returns a fallback value if not set.
370358
//

0 commit comments

Comments
 (0)