7171 echo "- ⏱️ Performance analytics and scan duration tracking" >> changelog.md
7272 echo "- 🗓️ Automated ClamAV scanning with cron schedules" >> changelog.md
7373 echo "- 📡 OpenTelemetry integration for observability" >> changelog.md
74- echo "- 🌐 Cross-platform support (Linux, macOS, Windows )" >> changelog.md
74+ echo "- 🌐 Cross-platform support (Linux ARM64 , macOS ARM64 )" >> changelog.md
7575 echo "" >> changelog.md
7676 echo "## Installation" >> changelog.md
7777 echo '```bash' >> changelog.md
@@ -100,52 +100,20 @@ jobs:
100100 strategy :
101101 matrix :
102102 include :
103- # Linux targets
104- - os : ubuntu-latest
105- target : x86_64-unknown-linux-gnu
106- artifact_name : clamreef-agent
107- asset_name : clamreef-agent-Linux-x86_64
108- cross : false
109- - os : ubuntu-latest
110- target : x86_64-unknown-linux-musl
111- artifact_name : clamreef-agent
112- asset_name : clamreef-agent-Linux-x86_64-musl
113- cross : true
103+ # Linux aarch64/arm64 target
114104 - os : ubuntu-latest
115105 target : aarch64-unknown-linux-gnu
116106 artifact_name : clamreef-agent
117107 asset_name : clamreef-agent-Linux-aarch64
118108 cross : true
119- - os : ubuntu-latest
120- target : armv7-unknown-linux-gnueabihf
121- artifact_name : clamreef-agent
122- asset_name : clamreef-agent-Linux-armv7
123- cross : true
124109
125- # macOS targets
126- - os : macos-latest
127- target : x86_64-apple-darwin
128- artifact_name : clamreef-agent
129- asset_name : clamreef-agent-Darwin-x86_64
130- cross : false
110+ # macOS aarch64/arm64 target (Apple Silicon)
131111 - os : macos-latest
132112 target : aarch64-apple-darwin
133113 artifact_name : clamreef-agent
134114 asset_name : clamreef-agent-Darwin-aarch64
135115 cross : false
136116
137- # Windows targets
138- - os : windows-latest
139- target : x86_64-pc-windows-msvc
140- artifact_name : clamreef-agent.exe
141- asset_name : clamreef-agent-Windows-x86_64.exe
142- cross : false
143- - os : windows-latest
144- target : i686-pc-windows-msvc
145- artifact_name : clamreef-agent.exe
146- asset_name : clamreef-agent-Windows-i686.exe
147- cross : false
148-
149117 steps :
150118 - name : Checkout code
151119 uses : actions/checkout@v4
@@ -157,51 +125,8 @@ jobs:
157125 continue-on-error : true
158126 id : toolchain
159127
160- - name : Retry Rust toolchain installation (Windows)
161- if : steps.toolchain.outcome == 'failure' && matrix.os == 'windows-latest'
162- shell : powershell
163- run : |
164- Write-Host "First attempt failed, retrying Rust toolchain installation..."
165- $ErrorActionPreference = 'Stop'
166- $maxRetries = 3
167- $retryCount = 0
168- $success = $false
169-
170- while (-not $success -and $retryCount -lt $maxRetries) {
171- $retryCount++
172- Write-Host "Attempt $retryCount of $maxRetries..."
173-
174- try {
175- # Clear any partial downloads
176- if (Test-Path "$env:USERPROFILE\.rustup\tmp") {
177- Remove-Item -Path "$env:USERPROFILE\.rustup\tmp" -Recurse -Force
178- }
179-
180- # Download and install rustup
181- Invoke-WebRequest -Uri "https://win.rustup.rs/x86_64" -OutFile "$env:TEMP\rustup-init.exe" -UseBasicParsing
182- & "$env:TEMP\rustup-init.exe" -y --default-toolchain stable --target ${{ matrix.target }}
183-
184- # Add to PATH for current session
185- $env:PATH = "$env:USERPROFILE\.cargo\bin;$env:PATH"
186-
187- # Verify installation
188- rustc --version
189- cargo --version
190-
191- $success = $true
192- Write-Host "Rust toolchain installed successfully!"
193- }
194- catch {
195- Write-Host "Attempt $retryCount failed: $_"
196- if ($retryCount -eq $maxRetries) {
197- throw "Failed to install Rust after $maxRetries attempts"
198- }
199- Start-Sleep -Seconds 10
200- }
201- }
202-
203- - name : Retry Rust toolchain installation (Unix)
204- if : steps.toolchain.outcome == 'failure' && matrix.os != 'windows-latest'
128+ - name : Retry Rust toolchain installation
129+ if : steps.toolchain.outcome == 'failure'
205130 run : |
206131 echo "First attempt failed, retrying Rust toolchain installation..."
207132 max_retries=3
@@ -271,27 +196,17 @@ jobs:
271196 CARGO_NET_RETRY : 3
272197 CARGO_HTTP_TIMEOUT : 60
273198
274- - name : Strip binary (Unix)
275- if : matrix.os != 'windows-latest'
199+ - name : Strip binary
276200 run : |
277201 strip target/${{ matrix.target }}/release/${{ matrix.artifact_name }}
278202
279- - name : Create archive (Unix)
280- if : matrix.os != 'windows-latest'
203+ - name : Create archive
281204 run : |
282205 cd target/${{ matrix.target }}/release
283206 tar czf ../../../${{ matrix.asset_name }}.tar.gz ${{ matrix.artifact_name }}
284207 cd ../../..
285208
286- - name : Create archive (Windows)
287- if : matrix.os == 'windows-latest'
288- run : |
289- cd target/${{ matrix.target }}/release
290- 7z a ../../../${{ matrix.asset_name }}.zip ${{ matrix.artifact_name }}
291- cd ../../..
292-
293- - name : Upload binary to release (Unix)
294- if : matrix.os != 'windows-latest'
209+ - name : Upload binary to release
295210 uses : actions/upload-release-asset@v1
296211 env :
297212 GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
@@ -301,19 +216,7 @@ jobs:
301216 asset_name : ${{ matrix.asset_name }}.tar.gz
302217 asset_content_type : application/gzip
303218
304- - name : Upload binary to release (Windows)
305- if : matrix.os == 'windows-latest'
306- uses : actions/upload-release-asset@v1
307- env :
308- GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
309- with :
310- upload_url : ${{ needs.create-release.outputs.upload_url }}
311- asset_path : ${{ matrix.asset_name }}.zip
312- asset_name : ${{ matrix.asset_name }}.zip
313- asset_content_type : application/zip
314-
315- - name : Upload standalone binary (Unix)
316- if : matrix.os != 'windows-latest'
219+ - name : Upload standalone binary
317220 uses : actions/upload-release-asset@v1
318221 env :
319222 GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
@@ -323,16 +226,6 @@ jobs:
323226 asset_name : ${{ matrix.asset_name }}
324227 asset_content_type : application/octet-stream
325228
326- - name : Upload standalone binary (Windows)
327- if : matrix.os == 'windows-latest'
328- uses : actions/upload-release-asset@v1
329- env :
330- GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
331- with :
332- upload_url : ${{ needs.create-release.outputs.upload_url }}
333- asset_path : target/${{ matrix.target }}/release/${{ matrix.artifact_name }}
334- asset_name : ${{ matrix.asset_name }}
335- asset_content_type : application/octet-stream
336229
337230 checksums :
338231 name : Generate Checksums
@@ -345,7 +238,7 @@ jobs:
345238 - name : Generate checksums
346239 run : |
347240 find . -name "clamreef-agent-*" -type f | while read file; do
348- if [[ "$file" == *.tar.gz ]] || [[ "$file" == *.zip ]] || [[ "$file" != *.* ]]; then
241+ if [[ "$file" == *.tar.gz ]] || [[ "$file" != *.* ]]; then
349242 sha256sum "$file" >> checksums.txt
350243 sha512sum "$file" >> checksums.txt
351244 fi
0 commit comments