Skip to content

Commit c0a89a8

Browse files
ci(freebsd): use all processors for aarch64 vm (#466)
1 parent 68ebc0f commit c0a89a8

File tree

1 file changed

+31
-40
lines changed

1 file changed

+31
-40
lines changed

.github/workflows/ci.yml

Lines changed: 31 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -373,11 +373,35 @@ jobs:
373373
echo "MSYS2_ROOT=${{ runner.temp }}/msys64" >> $GITHUB_ENV
374374
cat "${{ runner.temp }}/setup-msys2/msys2.CMD"
375375
376+
- name: Get submodule history
377+
shell: bash
378+
run: |
379+
# x265.pc will not be installed if their cmake cannot detect the latest tag
380+
# SVT-AV1 cannot determine version if the git history is not available
381+
382+
for repo in "x265_git" "SVT-AV1"; do
383+
cd ${GITHUB_WORKSPACE}/third-party/FFmpeg/$repo
384+
git fetch --tags --force origin
385+
done
386+
387+
- name: Get Processor Count
388+
id: processor_count
389+
shell: bash
390+
run: |
391+
if [ "${{ runner.os }}" = 'macOS' ]; then
392+
PROCESSOR_COUNT=$(sysctl -n hw.ncpu)
393+
else
394+
PROCESSOR_COUNT=$(nproc)
395+
fi
396+
echo "PROCESSOR_COUNT=${PROCESSOR_COUNT}" >> $GITHUB_OUTPUT
397+
echo "PROCESSOR_COUNT: $PROCESSOR_COUNT"
398+
376399
- name: Setup FreeBSD
377400
if: startsWith(matrix.shell, 'freebsd')
378401
uses: vmactions/[email protected]
379402
with:
380403
arch: ${{ matrix.arch }}
404+
cpu: ${{ steps.processor_count.outputs.PROCESSOR_COUNT }}
381405
prepare: |
382406
pkg install -y \
383407
devel/autoconf \
@@ -440,31 +464,6 @@ jobs:
440464
echo "CCPREFIX=/usr/bin/${{ matrix.target }}-" >> $GITHUB_ENV
441465
fi
442466
443-
- name: Get Processor Count
444-
id: processor_count
445-
run: |
446-
set -e
447-
cd $GITHUB_WORKSPACE
448-
if [ "${{ runner.os }}" = 'macOS' ]; then
449-
PROCESSOR_COUNT=$(sysctl -n hw.ncpu)
450-
else
451-
PROCESSOR_COUNT=$(nproc)
452-
fi
453-
echo "PROCESSOR_COUNT=${PROCESSOR_COUNT}" >> $GITHUB_OUTPUT
454-
echo "PROCESSOR_COUNT: $PROCESSOR_COUNT"
455-
456-
- name: Get submodule history
457-
run: |
458-
set -e
459-
460-
# x265.pc will not be installed if their cmake cannot detect the latest tag
461-
# SVT-AV1 cannot determine version if the git history is not available
462-
463-
for repo in "x265_git" "SVT-AV1"; do
464-
cd $GITHUB_WORKSPACE/third-party/FFmpeg/$repo
465-
git fetch --tags --force origin
466-
done
467-
468467
- name: Configure
469468
run: |
470469
set -e
@@ -508,10 +507,8 @@ jobs:
508507
509508
- name: Debug logs
510509
if: always()
510+
shell: bash
511511
run: |
512-
set -e
513-
cd $GITHUB_WORKSPACE
514-
515512
echo "::group::x264 config.log"
516513
cat ./third-party/FFmpeg/x264/config.log || true
517514
echo "::endgroup::"
@@ -522,23 +519,17 @@ jobs:
522519
523520
- name: Debug build directory
524521
if: always()
525-
run: |
526-
set -e
527-
cd $GITHUB_WORKSPACE
528-
ls -R ./build
522+
shell: bash
523+
run: ls -R ./build
529524

530525
- name: Debug build/dist directory
531526
if: always()
532-
run: |
533-
set -e
534-
cd $GITHUB_WORKSPACE
535-
ls -R ./build/dist
527+
shell: bash
528+
run: ls -R ./build/dist
536529

537530
- name: Cleanup
538-
run: |
539-
set -e
540-
cd $GITHUB_WORKSPACE
541-
rm -f -r ./build/dist/share
531+
shell: bash
532+
run: rm -f -r ./build/dist/share
542533

543534
- name: Upload Artifacts
544535
uses: actions/upload-artifact@v4

0 commit comments

Comments
 (0)