Skip to content

macos prebuilt contribs are not always generated/uploaded

This is causing macOS jobs to run much longer than they should.

This is happening right now with 4c1e8b7c: https://code.videolan.org/bobbrysonn/vlc/-/jobs/2233151

+++ extras/ci/get-contrib-sha.sh macos-arm64
++ export VLC_CONTRIB_SHA=4c1e8b7c367eb2b96bc35b12756916143094e33c
++ VLC_CONTRIB_SHA=4c1e8b7c367eb2b96bc35b12756916143094e33c
++ echo '[32;1m$ export VLC_PREBUILT_CONTRIBS_URL="https://artifacts.videolan.org/vlc/${CI_JOB_NAME##nightly-}/vlc-contrib-${TRIPLET}-${VLC_CONTRIB_SHA}.tar.bz2"[0;m'
[32;1m$ export VLC_PREBUILT_CONTRIBS_URL="https://artifacts.videolan.org/vlc/${CI_JOB_NAME##nightly-}/vlc-contrib-${TRIPLET}-${VLC_CONTRIB_SHA}.tar.bz2"[0;m
++ export VLC_PREBUILT_CONTRIBS_URL=https://artifacts.videolan.org/vlc/macos-arm64/vlc-contrib-aarch64-apple-darwin19-4c1e8b7c367eb2b96bc35b12756916143094e33c.tar.bz2
++ VLC_PREBUILT_CONTRIBS_URL=https://artifacts.videolan.org/vlc/macos-arm64/vlc-contrib-aarch64-apple-darwin19-4c1e8b7c367eb2b96bc35b12756916143094e33c.tar.bz2
[32;1m$ if ! extras/ci/check-url.sh "$VLC_PREBUILT_CONTRIBS_URL"; then unset VLC_PREBUILT_CONTRIBS_URL; fi[0;m
++ echo '[32;1m$ if ! extras/ci/check-url.sh "$VLC_PREBUILT_CONTRIBS_URL"; then unset VLC_PREBUILT_CONTRIBS_URL; fi[0;m'
++ extras/ci/check-url.sh https://artifacts.videolan.org/vlc/macos-arm64/vlc-contrib-aarch64-apple-darwin19-4c1e8b7c367eb2b96bc35b12756916143094e33c.tar.bz2
ERROR: 'https://artifacts.videolan.org/vlc/macos-arm64/vlc-contrib-aarch64-apple-darwin19-4c1e8b7c367eb2b96bc35b12756916143094e33c.tar.bz2' returned HTTP Status Code '404'

Changing things in the extra/package/macosx implies using a new contrib prebuilt. But the prebuilt contribs was not uploaded when the Merge Request was merged. Looking at the job on master:

Uploading artifacts for successful job 00:00
Uploading artifacts...
Runtime platform                                    arch=arm64 os=darwin pid=91502 revision=44feccdf version=17.0.0
WARNING: contrib/vlc-contrib-aarch64-apple-darwin19-*.tar.bz2: no matching files. Ensure that the artifact path is relative to the working directory (/Users/videolanci/builds/1RnZy2_zb/0/videolan/vlc) 
WARNING: contrib/SHA512SUM: no matching files. Ensure that the artifact path is relative to the working directory (/Users/videolanci/builds/1RnZy2_zb/0/videolan/vlc) 
ERROR: No files to upload       

The build.sh should be called with the -p option and it does so:

../extras/package/macosx/build.sh -i z -c -p -a aarch64 -x

And eventually the tarball is generated:

(cd tmp && tar c aarch64-apple-darwin19/) | bzip2 -c > ../vlc-contrib-aarch64-apple-darwin19-20250720.tar.bz2

But for some reason it's not found at the end of the job.

That works in some cases as we do have tarballs in the right place: https://artifacts.videolan.org/vlc/macos-arm64/ It contains 5ffa77ba from !7454 (merged). That Merge Request only change the XCode project as well in extra/package/macosx. And the tarball was found at the end of the job:

(cd tmp && tar c aarch64-apple-darwin19/) | bzip2 -c > ../vlc-contrib-aarch64-apple-darwin19-20250715.tar.bz2
....
Uploading artifacts for successful job 00:13
Uploading artifacts...
Runtime platform                                    arch=arm64 os=darwin pid=4080 revision=44feccdf version=17.0.0
contrib/vlc-contrib-aarch64-apple-darwin19-*.tar.bz2: found 1 matching artifact files and directories 
contrib/SHA512SUM: found 1 matching artifact files and directories 
Uploading artifacts as "archive" to coordinator... 201 Created  id=2227698 responseStatus=201 Created token=glcbt-64
Cleaning up project directory and file based variables
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information