Skip to content

Commit ab339de

Browse files
committed
Update build configurations and documentation for v1.4.0:
- Change macOS runner to use 'macos-latest' and update architecture to arm64. - Revise README and GO_GET_USERS.md to clarify library paths and version requirements. - Modify library management documentation to reflect removal of Intel Mac and 32-bit ARM support. - Enhance error messages in download-libs for unsupported architectures.
1 parent 97cc26a commit ab339de

File tree

5 files changed

+74
-30
lines changed

5 files changed

+74
-30
lines changed

.github/workflows/build.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,9 @@ jobs:
1818
- os: windows-latest
1919
go-version: '1.21'
2020
arch: x64
21-
- os: macos-13 # Intel-based macOS runner
21+
- os: macos-latest # Apple Silicon macOS runner (v1.4.0+)
2222
go-version: '1.21'
23-
arch: x64
23+
arch: arm64
2424
runs-on: ${{ matrix.os }}
2525

2626
steps:
@@ -65,8 +65,8 @@ jobs:
6565
if: runner.os == 'macOS'
6666
run: |
6767
ls -la rticonnextdds-connector/lib/
68-
echo "Library files in osx-x64:"
69-
ls -la rticonnextdds-connector/lib/osx-x64/ || echo "osx-x64 directory not found"
68+
echo "Library files in osx-arm64:"
69+
ls -la rticonnextdds-connector/lib/osx-arm64/ || echo "osx-arm64 directory not found"
7070
7171
- name: Install dependencies
7272
run: |

README.md

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -63,10 +63,11 @@ go run github.com/rticommunity/rticonnextdds-connector-go/cmd/download-libs@late
6363

6464
4. **Set library path (for runtime):**
6565
```bash
66-
# macOS (Apple Silicon/ARM64)
66+
# macOS (Apple Silicon/ARM64) - v1.4.0+
6767
export DYLD_LIBRARY_PATH=$(pwd)/rticonnextdds-connector/lib/osx-arm64:$DYLD_LIBRARY_PATH
6868

69-
# macOS (Intel/x86_64)
69+
# macOS (Intel/x86_64) - requires v1.3.1
70+
# go run github.com/rticommunity/rticonnextdds-connector-go/cmd/download-libs@latest -version v1.3.1
7071
export DYLD_LIBRARY_PATH=$(pwd)/rticonnextdds-connector/lib/osx-x64:$DYLD_LIBRARY_PATH
7172

7273
# Linux
@@ -76,7 +77,7 @@ export LD_LIBRARY_PATH=$(pwd)/rticonnextdds-connector/lib/linux-x64:$LD_LIBRARY_
7677
$env:PATH = "$(pwd)\rticonnextdds-connector\lib\win-x64;$env:PATH"
7778
```
7879

79-
> **💡 macOS Users**: Use `osx-arm64` for Apple Silicon Macs (M1/M2/M3) and `osx-x64` for Intel Macs. You can check your architecture with `uname -m` (arm64 = Apple Silicon, x86_64 = Intel).
80+
> **💡 macOS Users**: Use `osx-arm64` for Apple Silicon Macs (M1/M2/M3). Intel Mac support (`osx-x64`) requires v1.3.1. Check your architecture with `uname -m` (arm64 = Apple Silicon, x86_64 = Intel).
8081
8182
> **💡 New to RTI Connector Go?** Try the [go-get-example](examples/go-get-example/) first - it provides a complete walkthrough of this installation process with a simple working example.
8283
@@ -259,15 +260,15 @@ Explore our comprehensive examples to learn different patterns and use cases:
259260

260261
RTI Connector supports the following platforms with automated CI testing:
261262

262-
| Platform | Architecture | CI Status |
263-
|----------|-------------|-----------|
264-
| **Linux** | x86_64 | ✅ Tested on Ubuntu 22.04 (ubuntu-latest) |
265-
| **Linux** | ARM64 | ✅ Supported (libraries included) |
266-
| **macOS** | Apple Silicon (ARM64) | ✅ Supported |
267-
| **macOS** | Intel (x86_64) | ✅ Tested on macOS 13 (macos-13) |
268-
| **Windows** | x86_64 | ✅ Tested on Windows Server 2022 (windows-latest) |
263+
| Platform | Architecture | CI Status | Notes |
264+
|----------|-------------|-----------|-------|
265+
| **Linux** | x86_64 | ✅ Tested on Ubuntu 22.04 (ubuntu-latest) | |
266+
| **Linux** | ARM64 | ✅ Supported (libraries included) | |
267+
| **macOS** | Apple Silicon (ARM64) | ✅ Supported | v1.4.0+ |
268+
| **macOS** | Intel (x86_64) | ⚠️ Use v1.3.1 | Removed in v1.4.0 |
269+
| **Windows** | x86_64 | ✅ Tested on Windows Server 2022 (windows-latest) | |
269270

270-
> 📝 **Note**: Linux x64, macOS x64, and Windows x64 are continuously tested via GitHub Actions CI. If you need support for additional architectures, please contact your RTI account manager or [sales@rti.com](mailto:[email protected]).
271+
> 📝 **Note**: Starting with v1.4.0, Intel Mac (`osx-x64`) and 32-bit ARM Linux (`linux-arm`) support have been removed. If you need these platforms, use v1.3.1: `go run github.com/rticommunity/rticonnextdds-connector-go/cmd/download-libs@latest -version v1.3.1`
271272
272273
### Version Information
273274

cmd/download-libs/main.go

Lines changed: 29 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -84,13 +84,21 @@ func detectPlatform() string {
8484
return "linux-x64"
8585
case "arm64":
8686
return "linux-arm64"
87+
case "arm":
88+
// linux-arm (32-bit) was removed in v1.4.0
89+
fmt.Printf("⚠️ Warning: linux-arm (32-bit) support was removed in v1.4.0\n")
90+
fmt.Printf(" Use v1.3.1 or earlier for 32-bit ARM support\n")
91+
return "linux-arm"
8792
default:
8893
fmt.Printf("Unsupported Linux architecture: %s\n", runtime.GOARCH)
8994
os.Exit(1)
9095
}
9196
case "darwin":
9297
switch runtime.GOARCH {
9398
case "amd64":
99+
// osx-x64 (Intel Mac) was removed in v1.4.0
100+
fmt.Printf("⚠️ Warning: osx-x64 (Intel Mac) support was removed in v1.4.0\n")
101+
fmt.Printf(" Use v1.3.1 or earlier for Intel Mac support\n")
94102
return "osx-x64"
95103
case "arm64":
96104
return "osx-arm64"
@@ -368,14 +376,31 @@ func extractZip(src, dest, connectorDir string) error {
368376
// Create the rticonnextdds-connector directory
369377
os.MkdirAll(connectorDir, 0755)
370378

379+
// Detect archive structure:
380+
// - v1.3.1 and earlier: lib/* (need to prepend connectorDir)
381+
// - v1.4.0 and later: rticonnextdds-connector/lib/* (already has prefix)
382+
hasConnectorPrefix := false
383+
for _, f := range r.File {
384+
if strings.HasPrefix(f.Name, "rticonnextdds-connector/") {
385+
hasConnectorPrefix = true
386+
break
387+
}
388+
}
389+
371390
// Extract files
372391
for _, f := range r.File {
373-
// Map the extracted path to include the connector directory
374-
// The ZIP contains lib/* which we want to extract to rticonnextdds-connector/lib/*
375-
path := filepath.Join(connectorDir, f.Name)
392+
var path string
393+
if hasConnectorPrefix {
394+
// v1.4.0+: Extract directly to dest, the archive already has rticonnextdds-connector/ prefix
395+
path = filepath.Join(dest, f.Name)
396+
} else {
397+
// v1.3.1 and earlier: Prepend connectorDir to create rticonnextdds-connector/lib/*
398+
path = filepath.Join(connectorDir, f.Name)
399+
}
376400

377401
// Check for ZipSlip vulnerability - ensure path is within the destination tree
378-
if !strings.HasPrefix(path, filepath.Clean(connectorDir)+string(os.PathSeparator)) {
402+
cleanDest := filepath.Clean(dest)
403+
if !strings.HasPrefix(filepath.Clean(path), cleanDest+string(os.PathSeparator)) && filepath.Clean(path) != cleanDest {
379404
continue
380405
}
381406

docs/GO_GET_USERS.md

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -108,16 +108,16 @@ your-project/
108108
├── rticonnextdds-connector/
109109
│ ├── lib/
110110
│ │ ├── linux-x64/ # Intel/AMD Linux
111-
│ │ ├── linux-arm64/ # ARM Linux
112-
│ │ ├── osx-x64/ # Intel macOS
113-
│ │ ├── osx-arm64/ # Apple Silicon macOS
114-
│ │ └── win-x64/ # Windows x64
115-
│ ├── include/ # Header files
116-
│ └── examples/ # C/Lua examples
111+
│ │ ├── linux-arm64/ # ARM64 Linux
112+
│ │ ├── osx-arm64/ # Apple Silicon macOS (v1.4.0+)
113+
│ │ └── win-x64/ # Windows x64
114+
│ └── include/ # Header files
117115
├── main.go
118116
└── go.mod
119117
```
120118

119+
> **Note**: v1.3.1 and earlier also included `osx-x64/` (Intel macOS) and `linux-arm/` (32-bit ARM Linux).
120+
121121
## Best Practices
122122

123123
### 1. Library Path Management
@@ -136,6 +136,10 @@ export LD_LIBRARY_PATH=$(pwd)/rticonnextdds-connector/lib/linux-x64:$LD_LIBRARY_
136136
For reproducible builds, pin to specific versions:
137137

138138
```bash
139+
# Latest version (v1.4.0+)
140+
go run github.com/rticommunity/rticonnextdds-connector-go/cmd/download-libs@latest
141+
142+
# For Intel Mac or 32-bit ARM Linux support, use v1.3.1
139143
go run github.com/rticommunity/rticonnextdds-connector-go/cmd/download-libs@latest -version v1.3.1
140144
```
141145

docs/LIBRARY_MANAGEMENT.md

Lines changed: 19 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -63,12 +63,18 @@ make list-lib-versions # List available versions
6363

6464
The tool automatically detects your platform and downloads the appropriate libraries:
6565

66+
**Supported Platforms (v1.4.0+):**
6667
- **Linux x64**: `linux-x64` libraries
6768
- **Linux ARM64**: `linux-arm64` libraries
68-
- **macOS Intel**: `osx-x64` libraries
6969
- **macOS Apple Silicon**: `osx-arm64` libraries
7070
- **Windows x64**: `win-x64` libraries
7171

72+
**Legacy Platforms (v1.3.1 and earlier only):**
73+
- **macOS Intel**: `osx-x64` libraries (removed in v1.4.0)
74+
- **Linux ARM 32-bit**: `linux-arm` libraries (removed in v1.4.0)
75+
76+
> ⚠️ **Note**: If you need Intel Mac or 32-bit ARM Linux support, use v1.3.1: `go run ./cmd/download-libs -version v1.3.1`
77+
7278
### Library Path Setup
7379

7480
After downloading, the tool shows the appropriate environment setup:
@@ -134,7 +140,8 @@ make list-lib-versions
134140
```
135141

136142
Recent versions include:
137-
- v1.3.1 (latest)
143+
- v1.4.0 (latest) - Apple Silicon support, removed Intel Mac and 32-bit ARM
144+
- v1.3.1 - Last version with Intel Mac (osx-x64) and 32-bit ARM (linux-arm) support
138145
- v1.3.0
139146
- v1.2.3
140147
- v1.2.2
@@ -152,16 +159,23 @@ rticonnextdds-connector/
152159
│ │ ├── libnddscore.so
153160
│ │ └── librtiddsconnector.so
154161
│ ├── linux-arm64/
155-
│ ├── osx-x64/
162+
│ │ ├── libnddsc.so
163+
│ │ ├── libnddscore.so
164+
│ │ └── librtiddsconnector.so
156165
│ ├── osx-arm64/
157166
│ │ ├── libnddsc.dylib
158167
│ │ ├── libnddscore.dylib
159168
│ │ └── librtiddsconnector.dylib
160169
│ └── win-x64/
161-
├── include/
162-
└── examples/
170+
│ ├── nddsc.dll
171+
│ ├── nddscore.dll
172+
│ ├── rtiddsconnector.dll
173+
│ └── vcruntime140.dll
174+
└── include/
163175
```
164176

177+
> **Note**: v1.3.1 and earlier also included `osx-x64/` and `linux-arm/` directories.
178+
165179
## Troubleshooting
166180

167181
### Common Issues

0 commit comments

Comments
 (0)