File tree Expand file tree Collapse file tree 5 files changed +34
-1
lines changed Expand file tree Collapse file tree 5 files changed +34
-1
lines changed Original file line number Diff line number Diff line change @@ -144,22 +144,29 @@ jobs:
144
144
echo "📦 Building Darwin ARM64..."
145
145
GOOS=darwin GOARCH=arm64 go build -ldflags "-X main.Version=v$VERSION" -o $BUILD_DIR/duckduckgo-chat-cli_v${VERSION}_darwin_arm64 ./cmd/duckchat/main.go
146
146
147
+ # Build for Intel Mac
148
+ echo "📦 Building Darwin AMD64..."
149
+ GOOS=darwin GOARCH=amd64 go build -ldflags "-X main.Version=v$VERSION" -o $BUILD_DIR/duckduckgo-chat-cli_v${VERSION}_darwin_amd64 ./cmd/duckchat/main.go
150
+
147
151
# Generate SHA256 hashes
148
152
echo "🔐 Generating SHA256 hashes..."
149
153
cd $BUILD_DIR
150
154
sha256sum duckduckgo-chat-cli_v${VERSION}_windows_amd64.exe > duckduckgo-chat-cli_v${VERSION}_windows_amd64.exe.sha256
151
155
sha256sum duckduckgo-chat-cli_v${VERSION}_linux_amd64 > duckduckgo-chat-cli_v${VERSION}_linux_amd64.sha256
152
156
sha256sum duckduckgo-chat-cli_v${VERSION}_darwin_arm64 > duckduckgo-chat-cli_v${VERSION}_darwin_arm64.sha256
157
+ sha256sum duckduckgo-chat-cli_v${VERSION}_darwin_amd64 > duckduckgo-chat-cli_v${VERSION}_darwin_amd64.sha256
153
158
154
159
# Create release archive
155
160
echo "📚 Creating release archive..."
156
161
zip duckduckgo-chat-cli_v${VERSION}_release.zip \
157
162
duckduckgo-chat-cli_v${VERSION}_linux_amd64 \
158
163
duckduckgo-chat-cli_v${VERSION}_darwin_arm64 \
164
+ duckduckgo-chat-cli_v${VERSION}_darwin_amd64 \
159
165
duckduckgo-chat-cli_v${VERSION}_windows_amd64.exe \
160
166
duckduckgo-chat-cli_v${VERSION}_windows_amd64.exe.sha256 \
161
167
duckduckgo-chat-cli_v${VERSION}_linux_amd64.sha256 \
162
- duckduckgo-chat-cli_v${VERSION}_darwin_arm64.sha256
168
+ duckduckgo-chat-cli_v${VERSION}_darwin_arm64.sha256 \
169
+ duckduckgo-chat-cli_v${VERSION}_darwin_amd64.sha256
163
170
164
171
echo "✅ Build v$VERSION complete!"
165
172
ls -lah
Original file line number Diff line number Diff line change @@ -152,6 +152,7 @@ jobs:
152
152
fi
153
153
154
154
# Test macOS build
155
+ # Test macOS ARM build
155
156
GOOS=darwin GOARCH=arm64 go build -o test_darwin ./cmd/duckchat/main.go
156
157
if [ -f "test_darwin" ]; then
157
158
echo "✅ Darwin ARM64 build successful"
@@ -161,4 +162,14 @@ jobs:
161
162
exit 1
162
163
fi
163
164
165
+ # Test macOS Intel build
166
+ GOOS=darwin GOARCH=amd64 go build -o test_darwin_amd64 ./cmd/duckchat/main.go
167
+ if [ -f "test_darwin_amd64" ]; then
168
+ echo "✅ Darwin AMD64 build successful"
169
+ rm test_darwin_amd64
170
+ else
171
+ echo "❌ Darwin AMD64 build failed"
172
+ exit 1
173
+ fi
174
+
164
175
echo "🎉 All cross-compilation tests passed!"
Original file line number Diff line number Diff line change @@ -167,10 +167,19 @@ curl -LO $(curl -s https://api.github.com/repos/benoitpetit/duckduckGO-chat-cli/
167
167
<details >
168
168
<summary ><strong >🍎 MacOS (curl)</strong ></summary >
169
169
170
+ <br />
171
+ <strong >Apple Silicon (ARM64):</strong >
172
+
170
173
``` bash
171
174
curl -LO $( curl -s https://api.github.com/repos/benoitpetit/duckduckGO-chat-cli/releases/latest | grep -oP ' https.*darwin_arm64' | grep -oP ' https.*v[0-9]+\.[0-9]+\.[0-9]+_darwin_arm64' | head -1) && chmod +x duckduckgo-chat-cli_v* _darwin_arm64 && ./duckduckgo-chat-cli_v* _darwin_arm64
172
175
```
173
176
177
+ <strong >Intel (AMD64):</strong >
178
+
179
+ ``` bash
180
+ curl -LO $( curl -s https://api.github.com/repos/benoitpetit/duckduckGO-chat-cli/releases/latest | grep -oP ' https.*darwin_amd64' | grep -oP ' https.*v[0-9]+\.[0-9]+\.[0-9]+_darwin_amd64' | head -1) && chmod +x duckduckgo-chat-cli_v* _darwin_amd64 && ./duckduckgo-chat-cli_v* _darwin_amd64
181
+ ```
182
+
174
183
</details >
175
184
176
185
### 🔨 2. Build from source
Original file line number Diff line number Diff line change @@ -49,12 +49,17 @@ cd ..
49
49
echo " 📦 Building Darwin ARM64..."
50
50
GOOS=darwin GOARCH=arm64 go build -ldflags " -X main.Version=v$VERSION " -o $BUILD_DIR /duckduckgo-chat-cli_v${VERSION} _darwin_arm64 ./cmd/duckchat/main.go
51
51
52
+ # Build pour Intel Mac
53
+ echo " 📦 Building Darwin AMD64..."
54
+ GOOS=darwin GOARCH=amd64 go build -ldflags " -X main.Version=v$VERSION " -o $BUILD_DIR /duckduckgo-chat-cli_v${VERSION} _darwin_amd64 ./cmd/duckchat/main.go
55
+
52
56
# Création du zip de release
53
57
echo " 📚 Creating release archive..."
54
58
cd $BUILD_DIR
55
59
zip duckduckgo-chat-cli_v${VERSION} _release.zip \
56
60
duckduckgo-chat-cli_v${VERSION} _linux_amd64 \
57
61
duckduckgo-chat-cli_v${VERSION} _darwin_arm64 \
62
+ duckduckgo-chat-cli_v${VERSION} _darwin_amd64 \
58
63
duckduckgo-chat-cli_v${VERSION} _windows_amd64.exe \
59
64
duckduckgo-chat-cli_v${VERSION} _windows_amd64.exe.sha256
60
65
cd ..
Original file line number Diff line number Diff line change @@ -65,6 +65,7 @@ log_info "Checking cross-platform builds..."
65
65
check " GOOS=linux GOARCH=amd64 go build -o /tmp/test_linux ./cmd/duckchat/main.go && rm -f /tmp/test_linux" " Linux AMD64 build"
66
66
check " GOOS=windows GOARCH=amd64 go build -o /tmp/test_windows.exe ./cmd/duckchat/main.go && rm -f /tmp/test_windows.exe" " Windows AMD64 build"
67
67
check " GOOS=darwin GOARCH=arm64 go build -o /tmp/test_darwin ./cmd/duckchat/main.go && rm -f /tmp/test_darwin" " Darwin ARM64 build"
68
+ check " GOOS=darwin GOARCH=amd64 go build -o /tmp/test_darwin_amd64 ./cmd/duckchat/main.go && rm -f /tmp/test_darwin_amd64" " Darwin AMD64 build"
68
69
69
70
# Git verification
70
71
log_info " Checking Git..."
You can’t perform that action at this time.
0 commit comments