Files
Partner/.github/workflows/test-partnerctl-native.yml
Workflow config file is invalid. Please check your config file: yaml: line 20: did not find expected key

78 lines
2.3 KiB
YAML

name: Test PartnerCtl Native Build
on:
workflow_dispatch:
inputs:
platform:
description: "Target platform to test"
required: true
default: "windows-x64"
type: choice
options:
- windows-x64
- linux-x64
- linux-arm64
permissions:
contents: read
jobs:
test-native-build:
name: Test ${{ inputs.platform }}
runs-on: ${{
inputs.platform == 'windows-x64' && 'windows-latest' ||
inputs.platform == 'linux-arm64' && 'ubuntu-24.04-arm' ||
'ubuntu-latest'
}}
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up GraalVM 21
uses: graalvm/setup-graalvm@v1
with:
distribution: graalvm-community
java-version: "21"
github-token: ${{ github.token }}
- name: Build partnerctl native image
run: mvn -B -DskipTests=true -pl PartnerCtl -am package native:compile
- name: Check Linux output
if: ${{ inputs.platform == 'linux-x64' || inputs.platform == 'linux-arm64' }}
shell: bash
run: |
if [ ! -f "PartnerCtl/target/partnerctl" ]; then
echo "Expected native binary not found: PartnerCtl/target/partnerctl"
echo "Available PartnerCtl target files:"
find PartnerCtl/target -maxdepth 2 -type f -print
exit 1
fi
chmod +x PartnerCtl/target/partnerctl
./PartnerCtl/target/partnerctl --help
- name: Check Windows output
if: ${{ inputs.platform == 'windows-x64' }}
shell: pwsh
run: |
if (!(Test-Path "PartnerCtl/target/partnerctl.exe")) {
Write-Host "Expected native binary not found: PartnerCtl/target/partnerctl.exe"
Write-Host "Available PartnerCtl target files:"
Get-ChildItem -Recurse PartnerCtl/target | Select-Object FullName
throw "partnerctl.exe not found"
}
.\PartnerCtl\target\partnerctl.exe --help
- name: Upload test artifact
uses: actions/upload-artifact@v4
with:
name: partnerctl-${{ inputs.platform }}-test
path: |
PartnerCtl/target/partnerctl
PartnerCtl/target/partnerctl.exe
if-no-files-found: ignore
retention-days: 1