CI: fix XIMEA URL

This commit is contained in:
Martin Pulec
2025-04-04 11:14:26 +02:00
parent 465f939b86
commit 937d07ded2
4 changed files with 37 additions and 12 deletions

View File

@@ -7,12 +7,8 @@ if [ "$(id -u)" -eq 0 ]; then
fi
install_ximea() {
if [ "$(dpkg --print-architecture | cut -b1-3)" = arm ]; then
filename=XIMEA_Linux_ARM_SP.tgz
else
filename=XIMEA_Linux_SP.tgz
fi
curl -LO https://www.ximea.com/downloads/recent/$filename
filename=XIMEA.tgz
curl -L "$XIMEA_DOWNLOAD_URL" -o "$filename"
tar xzf $filename
cd package
sudo ./install -noudev

View File

@@ -116,6 +116,36 @@ if [ "$(uname -s)" = Darwin ] && [ "$(uname -m)" != arm64 ]; then
printf "UG_ARCH=%s\n" $UG_ARCH >> "$GITHUB_ENV"
fi
set_ximea_url() {
if [ "$(uname -s)" = Darwin ]; then
if [ "$(uname -m)" = arm64 ]; then
ximea_pattern=XIMEA_macOS_ARM_SP.dmg
else
ximea_pattern=XIMEA_macOX_SP.dmg
fi
elif [ "$(uname -s)" = Linux ]; then
if expr "$GITHUB_WORKFLOW" : ARM >/dev/null; then
ximea_pattern=Linux_ARM_SP.tgz
else
ximea_pattern=Linux_SP.tgz
fi
else
ximea_pattern=XIMEA_Windows_SP_Stable.exe
fi
# ignore GUID 35adfeed-8e15-4b4d-8364-bd5a65cba5c4 because it is
# ARM (LTS) with pattern Linux_SP.tgz and since it listed first,
# it will be downloaded for x86, ARM beta is OK
ximea_path=$(curl https://www.ximea.com/software-downloads |
grep -v 35adfeed-8e15-4b4d-8364-bd5a65cba5c4 |
sed -n "/$ximea_pattern/"\
' { s-^.*\(/getattachment[^"]*\).*$-\1-; p; q; }')
XIMEA_DOWNLOAD_URL=https://www.ximea.com$ximea_path
export XIMEA_DOWNLOAD_URL
printf "XIMEA_DOWNLOAD_URL=%s\n" "$XIMEA_DOWNLOAD_URL" >> "$GITHUB_ENV"
}
set_ximea_url
import_signing_key() {
if [ "$(uname -s)" != Darwin ] || [ -z "$apple_key_p12_b64" ]; then
return 0

View File

@@ -19,8 +19,7 @@ fi
install_ximea() {(
installer=/private/var/tmp/XIMEA_OSX_SP.dmg
if [ ! -f $installer ]; then
curl -S -L https://www.ximea.com/downloads/recent/XIMEA_OSX_SP\
.dmg -o $installer
curl -S -L "$XIMEA_DOWNLOAD_URL" -o $installer
fi
hdiutil mount $installer
sudo cp -a /Volumes/XIMEA/m3api.framework \

View File

@@ -151,7 +151,7 @@ jobs:
run: |
echo "nonfree=$($GITHUB_WORKSPACE/.github/scripts/get-etags.sh "$SDK_URL/$DELTA_MAC_ARCHIVE")" >> $GITHUB_OUTPUT
echo "ndi=$($GITHUB_WORKSPACE/.github/scripts/get-etags.sh https://downloads.ndi.tv/SDK/NDI_SDK_Mac/Install_NDI_SDK_v6_Apple.pkg)" >> $GITHUB_OUTPUT
echo "ximea=$($GITHUB_WORKSPACE/.github/scripts/get-etags.sh https://www.ximea.com/downloads/recent/XIMEA_OSX_SP.dmg)" >> $GITHUB_OUTPUT
echo "ximea=$($GITHUB_WORKSPACE/.github/scripts/get-etags.sh "$XIMEA_DOWNLOAD_URL")" >> $GITHUB_OUTPUT
- name: Set environment
run: . .github/scripts/environment.sh
- name: Run actions/cache for Non-Free SDKs
@@ -175,7 +175,7 @@ jobs:
key: cache-ximea-${{ runner.os }}-${{ steps.etags.outputs.ximea }}
- name: Download XIMEA
if: steps.cache-macos-ximea.outputs.cache-hit != 'true'
run: curl -S -L https://www.ximea.com/downloads/recent/XIMEA_OSX_SP.dmg -o /private/var/tmp/XIMEA_OSX_SP.dmg
run: curl -S -L "$XIMEA_DOWNLOAD_URL" -o /private/var/tmp/XIMEA_OSX_SP.dmg
- name: Run actions/cache for NDI
id: cache-ndi
uses: actions/cache@main
@@ -242,7 +242,7 @@ jobs:
id: etags
run: |
echo "ndi=$($GITHUB_WORKSPACE/.github/scripts/get-etags.sh https://downloads.ndi.tv/SDK/NDI_SDK/NDI%206%20SDK.exe)" >> $GITHUB_OUTPUT
echo "ximea=$($GITHUB_WORKSPACE/.github/scripts/get-etags.sh https://www.ximea.com/support/attachments/download/37/XIMEA_API_Installer.exe)" >> $GITHUB_OUTPUT
echo "ximea=$($GITHUB_WORKSPACE/.github/scripts/get-etags.sh "$XIMEA_DOWNLOAD_URL")" >> $GITHUB_OUTPUT
- name: Set environment
run: .github/scripts/environment.sh
- name: Find MSVC
@@ -265,7 +265,7 @@ jobs:
key: cache-ximea-${{ runner.os }}-${{ steps.etags.outputs.ximea }}
- name: Download XIMEA
if: steps.cache-macos-ximea.outputs.cache-hit != 'true'
run: curl 'https://www.ximea.com/support/attachments/download/37/XIMEA_API_Installer.exe' -o 'C:\XIMEA_API_Installer.exe'
run: curl "$XIMEA_DOWNLOAD_URL" -o 'C:\XIMEA_API_Installer.exe'
- name: Run actions/cache for libajantv2 build
id: cache-aja