Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 18 additions & 18 deletions .github/workflows/qualcomm-internal-build-and-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,26 +51,26 @@ jobs:
target_py_vsn: "3.10"

build-linux-aarch64-oe-gcc11_2:
if: ${{ inputs.do_all }}
uses: ./.github/workflows/qualcomm-internal-build-and-test-single-os.yml
secrets: inherit
with:
nightly_build: ${{ inputs.nightly_build }}
target_os: linux
target_arch: aarch64_oe_gcc11_2
target_py_vsn: None
upload_test_archive: true
upload_wheel: false
run_tests: false
if: ${{ inputs.do_all }}
uses: ./.github/workflows/qualcomm-internal-build-and-test-single-os.yml
secrets: inherit
with:
nightly_build: ${{ inputs.nightly_build }}
target_os: linux
target_arch: aarch64_oe_gcc11_2
target_py_vsn: None
upload_test_archive: true
upload_wheel: false
run_tests: false

test-linux-aarch64-oe-gcc11_2:
if: ${{ inputs.do_all }}
needs: [build-linux-aarch64-oe-gcc11_2]
uses: ./.github/workflows/qualcomm-internal-qdc-test.yml
secrets: inherit
with:
target_os: linux
target_arch: aarch64_oe_gcc11_2
if: ${{ inputs.do_all }}
needs: [build-linux-aarch64-oe-gcc11_2]
uses: ./.github/workflows/qualcomm-internal-qdc-test.yml
secrets: inherit
with:
target_os: linux
target_arch: aarch64_oe_gcc11_2

build-and-test-linux-arm64:
if: ${{ inputs.do_all }}
Expand Down
24 changes: 13 additions & 11 deletions .github/workflows/qualcomm-internal-build-artifacts.yml
Original file line number Diff line number Diff line change
Expand Up @@ -102,17 +102,17 @@ jobs:
upload_archive: ${{ matrix.target_py_vsn == fromJSON(inputs.linux_aarch64_manylinux_2_34_target_py_vsns)[0] }}

build-linux-aarch64-oe-gcc11_2:
if: ${{ inputs.build_linux_aarch64_oe_gcc11_2 }}
uses: ./.github/workflows/qualcomm-internal-build-and-test-single-os.yml
secrets: inherit
with:
nightly_build: ${{ inputs.nightly_build }}
target_os: linux
target_arch: aarch64_oe_gcc11_2
target_py_vsn: None
run_tests: false
upload_test_archive: true
upload_wheel: false
if: ${{ inputs.build_linux_aarch64_oe_gcc11_2 }}
uses: ./.github/workflows/qualcomm-internal-build-and-test-single-os.yml
secrets: inherit
with:
nightly_build: ${{ inputs.nightly_build }}
target_os: linux
target_arch: aarch64_oe_gcc11_2
target_py_vsn: None
run_tests: false
upload_test_archive: true
upload_wheel: false

build-linux-x86_64:
if: ${{ inputs.build_linux_x86_64 }}
Expand Down Expand Up @@ -168,5 +168,7 @@ jobs:
build_runner_arch: ARM64
run_tests: false
upload_wheel: false
build_archive: true
upload_archive: true
build_nuget: true
upload_nuget: true
11 changes: 8 additions & 3 deletions .github/workflows/qualcomm-internal-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -268,6 +268,11 @@ jobs:
with:
name: windows-arm64-py3.11-zip

- name: Download ARM64 (ARM64x) Windows Zip Package
uses: ./.github/actions/download-ci-artifact
with:
name: windows-arm64x-py3.11-zip

- name: Download aarch64 manylinux_2_34 Linux TGZ Package from Artifactory
uses: ./.github/actions/download-ci-artifact
with:
Expand Down Expand Up @@ -328,12 +333,12 @@ jobs:
echo "Found $count .tar.bz2 archive(s)"
[ "$count" -eq 3 ] || { echo "ERROR: Expected 3 .tar.bz2 archives, found $count"; exit 1; }

- name: Verify Zip artifact
- name: Verify Zip artifacts
run: |
# 4 test archives + 1 windows zip + 3 PDB archives = 8 zips
# 4 test archives + 1 Windows ARM64 zip + 1 Windows ARM64 (ARM64x) zip + 3 PDB archives = 9 zips
count=$(find "${{ github.workspace }}/build" -name "*.zip" | wc -l)
echo "Found $count Zip archive(s)"
[ "$count" -eq 8 ] || { echo "ERROR: Expected 8 Zip archives, found $count"; exit 1; }
[ "$count" -eq 9 ] || { echo "ERROR: Expected 9 Zip archives, found $count"; exit 1; }

- name: Verify TGZ artifact
run: |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -199,6 +199,28 @@ jobs:
source uplevel_venv/bin/activate
twine check ${{ github.workspace }}/build/dist/*.whl

- name: Prepare Windows Wheel libs for signing
run: |
./qcom/scripts/signing/prepare_wheels_for_signing.sh \
"${{ github.workspace }}/build/dist" \
"${{ github.workspace }}/build/dist/output"

- name: Upload unsigned Windows Wheel libs to Artifactory
if: ${{ !inputs.skip_publish }}
run: |
NETRC_FILE=$(mktemp -p /tmp)
chmod 600 "$NETRC_FILE"
cat > "$NETRC_FILE" <<EOF
machine re-artifactory.qualcomm.com
login ${{ secrets.ARTIFACTORY_USERNAME }}
password ${{ secrets.ARTIFACTORY_UPLOADER_PASSWORD }}
EOF
VERSION=$(ls "${{ github.workspace }}/build/dist/"*win_arm64*.whl 2>/dev/null | head -1 | xargs -I{} basename {} | sed 's/.*-\([0-9.]*rc[0-9]*\).*/\1/' | sed 's/-//g')
./qcom/scripts/signing/upload_unsigned_to_artifactory.sh \
"${{ github.workspace }}/build/dist/output/unsigned_libs/wheel.zip" \
"wheels.zip" "$VERSION" "$NETRC_FILE"
rm -f "$NETRC_FILE"

- name: Publish
if: ${{ !inputs.skip_publish }}
env:
Expand Down Expand Up @@ -240,6 +262,39 @@ jobs:
Write-Host "Found $count NuGet package(s)"
if ($count -ne 1) { Write-Error "Expected 1 NuGet package, found $count"; exit 1 }

- name: Prepare Windows NuGet libs for signing
shell: powershell
run: |
.\qcom\scripts\signing\prepare_nuget_for_signing.ps1 `
-NuGetDirectory "${{ github.workspace }}\build\windows-arm64x\Release\Release\dist" `
-OutputDirectory "${{ github.workspace }}\build\dist\output"

- name: Upload unsigned Windows NuGet libs to Artifactory
if: ${{ !inputs.skip_publish }}
shell: powershell
env:
ARTIFACTORY_USERNAME: ${{ secrets.ARTIFACTORY_USERNAME }}
ARTIFACTORY_PASSWORD: ${{ secrets.ARTIFACTORY_UPLOADER_PASSWORD }}
run: |
$netrcFile = New-TemporaryFile
@"
machine re-artifactory.qualcomm.com
login $env:ARTIFACTORY_USERNAME
password $env:ARTIFACTORY_PASSWORD
"@ | Set-Content -Path $netrcFile
icacls $netrcFile /inheritance:r /grant:r "${env:USERNAME}:(R,W)" | Out-Null

$pkg = Get-ChildItem -Path "${{ github.workspace }}\build\windows-arm64x\Release\Release\dist" -Filter "*.nupkg" | Select-Object -First 1
$version = $pkg.BaseName -replace '^Qualcomm\.ML\.OnnxRuntime\.QNN\.' -replace '\.nupkg$' -replace '-', ''

.\qcom\scripts\signing\upload_unsigned_to_artifactory.ps1 `
-ZipFile "${{ github.workspace }}\build\dist\output\unsigned_libs\nuget.zip" `
-Filename "nuget.zip" `
-Version $version `
-NetrcFile $netrcFile

Remove-Item -Path $netrcFile -Force

- name: Publish
if: ${{ !inputs.skip_publish }}
shell: powershell
Expand Down Expand Up @@ -281,6 +336,11 @@ jobs:
with:
name: windows-arm64-py3.11-zip

- name: Download Windows ARM64 (ARM64x) Zip from Artifactory
uses: ./.github/actions/download-ci-artifact
with:
name: windows-arm64x-py3.11-zip

- name: Download Linux aarch64 manylinux_2_34 TGZ from Artifactory
uses: ./.github/actions/download-ci-artifact
with:
Expand All @@ -303,17 +363,45 @@ jobs:

- name: Verify Zip artifacts
run: |
# 1 windows zip + 3 PDB archives = 4 zips
# 1 Windows ARM64 Zip + 3 PDB archives + 1 Windows ARM64 (ARM64x) Zip = 5 zips
count=$(find "${{ github.workspace }}/build" -name "*.zip" | wc -l)
echo "Found $count Zip archive(s)"
[ "$count" -eq 4 ] || { echo "ERROR: Expected 4 Zip archive, found $count"; exit 1; }
[ "$count" -eq 5 ] || { echo "ERROR: Expected 5 Zip archive, found $count"; exit 1; }

- name: Verify TGZ artifact
run: |
count=$(find "${{ github.workspace }}/build" -name "*.tgz" | wc -l)
echo "Found $count TGZ archive(s)"
[ "$count" -eq 1 ] || { echo "ERROR: Expected 1 TGZ archive, found $count"; exit 1; }

- name: Prepare Windows ARM64 Zip lib for signing
run: |
./qcom/scripts/signing/prepare_zip_for_signing.sh \
"${{ github.workspace }}/build/windows-arm64/Release/dist" \
"${{ github.workspace }}/build/dist/output"

- name: Prepare Windows ARM64 (ARM64x) Zip lib for signing
run: |
./qcom/scripts/signing/prepare_zip_for_signing.sh \
"${{ github.workspace }}/build/windows-arm64x/Release/Release/dist" \
"${{ github.workspace }}/build/dist/output"

- name: Upload unsigned Windows Zip libs to Artifactory
if: ${{ !inputs.skip_publish }}
run: |
NETRC_FILE=$(mktemp -p /tmp)
chmod 600 "$NETRC_FILE"
cat > "$NETRC_FILE" <<EOF
machine re-artifactory.qualcomm.com
login ${{ secrets.ARTIFACTORY_USERNAME }}
password ${{ secrets.ARTIFACTORY_UPLOADER_PASSWORD }}
EOF
VERSION=$(basename "$(ls "${{ github.workspace }}/build/windows-arm64/Release/dist/"*.zip 2>/dev/null | grep -v pdb | head -1)" | sed 's/.*-\([0-9.]*rc[0-9]*\).*/\1/' | sed 's/-//g')
./qcom/scripts/signing/upload_unsigned_to_artifactory.sh \
"${{ github.workspace }}/build/dist/output/unsigned_libs/zip.zip" \
"zip.zip" "$VERSION" "$NETRC_FILE"
rm -f "$NETRC_FILE"

- name: Publish
if: ${{ !inputs.skip_publish }}
run: |
Expand All @@ -334,6 +422,11 @@ jobs:
"${{ github.workspace }}/build/windows-arm64/Release/dist" \
"$NETRC_FILE"

# Upload Windows ARM64 (ARM64x) archive
./qcom/scripts/upleveling/upload_zip_to_artifactory.sh \
"${{ github.workspace }}/build/windows-arm64x/Release/Release/dist" \
"$NETRC_FILE"

# Upload Linux aarch64 manylinux_2_34 zip
./qcom/scripts/upleveling/upload_zip_to_artifactory.sh \
"${{ github.workspace }}/build/linux-aarch64_manylinux_2_34/Release/dist" \
Expand Down
Loading