mirror of
https://github.com/Soccera1/agg.git
synced 2025-09-20 13:47:28 +02:00
fix aarch64
This commit is contained in:
parent
2d7e6e492e
commit
79177be9a5
1 changed files with 70 additions and 12 deletions
82
.github/workflows/release.yml
vendored
82
.github/workflows/release.yml
vendored
|
@ -28,7 +28,7 @@ jobs:
|
|||
name: agg-linux-amd64
|
||||
path: bin/agg
|
||||
|
||||
build_windows:
|
||||
build_windows_amd64:
|
||||
runs-on: windows-latest
|
||||
steps:
|
||||
- name: Checkout code
|
||||
|
@ -89,7 +89,7 @@ jobs:
|
|||
- name: Install cross-compilation tools for Windows (AArch64)
|
||||
run: |
|
||||
sudo apt-get update
|
||||
sudo apt-get install -y build-essential gcc-aarch64-w64-mingw32
|
||||
sudo apt-get install -y build-essential g++-aarch64-w64-mingw32
|
||||
|
||||
- name: Build project for Windows (AArch64)
|
||||
run: make CC=aarch64-w64-mingw32-gcc all
|
||||
|
@ -101,16 +101,56 @@ jobs:
|
|||
name: agg-windows-aarch64
|
||||
path: bin/agg.exe # Windows executables have .exe extension
|
||||
|
||||
create_release_and_upload_assets:
|
||||
runs-on: ubuntu-latest
|
||||
needs: [
|
||||
build_linux,
|
||||
build_windows,
|
||||
build_linux_aarch64,
|
||||
build_windows_aarch64,
|
||||
] # Depends on all build jobs to complete
|
||||
permissions:
|
||||
contents: write # Grant write permissions to the GITHUB_TOKEN for creating releases
|
||||
build_windows_aarch64:
|
||||
runs-on: windows-latest # Cross-compile from an x64 Windows runner
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Install MinGW-w64 AArch64 toolchain
|
||||
run: |
|
||||
# Attempt to install via Choco. Package names for AArch64 MinGW can vary.
|
||||
# We'll try common package names. If these fail, manual download/setup of a toolchain
|
||||
# from MSYS2 or similar might be needed.
|
||||
choco install mingw-w64-ucrt-aarch64 --limit-features || \
|
||||
choco install mingw-w64-arm-none-eabi --limit-features || \
|
||||
Write-Host "Could not install AArch64 MinGW via Choco. Manual intervention might be needed." -ForegroundColor Red
|
||||
|
||||
# Add the appropriate bin directory to PATH for the current session.
|
||||
# This path depends on which choco package was actually installed.
|
||||
# We'll try common paths.
|
||||
if (Test-Path "C:\ProgramData\chocolatey\lib\mingw-w64-ucrt-aarch64\tools\install\mingw64\bin") {
|
||||
"C:\ProgramData\chocolatey\lib\mingw-w64-ucrt-aarch64\tools\install\mingw64\bin" | Out-File -FilePath $env:GITHUB_PATH -Encoding Utf8 -Append
|
||||
} elseif (Test-Path "C:\ProgramData\chocolatey\lib\mingw-w64-arm-none-eabi\tools\install\mingw64\bin") {
|
||||
"C:\ProgramData\chocolatey\lib\mingw-w64-arm-none-eabi\tools\install\mingw64\bin" | Out-File -FilePath $env:GITHUB_PATH -Encoding Utf8 -Append
|
||||
} else {
|
||||
Write-Host "Could not find MinGW AArch64 bin path after install. Build might fail." -ForegroundColor Yellow
|
||||
}
|
||||
shell: powershell
|
||||
|
||||
- name: Build project for Windows (AArch64)
|
||||
run: make CC=aarch64-w64-mingw32-gcc all
|
||||
working-directory: ${{ github.workspace }}
|
||||
shell: pwsh # Use PowerShell for consistent path handling
|
||||
|
||||
- name: Upload Windows aarch64 artifact
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: agg-windows-aarch64
|
||||
path: bin/agg.exe # Windows executables have .exe extension
|
||||
|
||||
create_release_and_upload_assets:
|
||||
runs-on: ubuntu-latest
|
||||
needs: [
|
||||
build_linux,
|
||||
build_windows_amd64,
|
||||
build_linux_aarch64,
|
||||
build_windows_aarch64,
|
||||
] # Depends on all build jobs to complete
|
||||
permissions:
|
||||
contents: write # Grant write permissions to the GITHUB_TOKEN for creating releases
|
||||
|
||||
steps:
|
||||
- name: Checkout code
|
||||
|
@ -192,6 +232,24 @@ jobs:
|
|||
asset_name: agg-${{ env.NEW_TAG }}-linux-amd64
|
||||
asset_content_type: application/octet-stream
|
||||
|
||||
- name: Download Windows aarch64 artifact
|
||||
uses: actions/download-artifact@v4
|
||||
with:
|
||||
name: agg-windows-aarch64
|
||||
path: ./artifacts/windows-aarch64/
|
||||
|
||||
- name: Upload Windows aarch64 Release Asset
|
||||
uses: actions/upload-release-asset@v1
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
with:
|
||||
upload_url: ${{ steps.create_release.outputs.upload_url }}
|
||||
asset_path: ./artifacts/windows-aarch64/agg.exe
|
||||
asset_name: agg-${{ env.NEW_TAG }}-windows-aarch64.exe
|
||||
asset_content_type: application/octet-stream
|
||||
|
||||
|
||||
|
||||
- name: Upload Linux aarch64 Release Asset
|
||||
uses: actions/upload-release-asset@v1
|
||||
env:
|
||||
|
|
Loading…
Add table
Reference in a new issue