ci: Actually check for version numbers
This commit is contained in:
@@ -63,9 +63,10 @@ jobs:
|
||||
echo "::set-output name=commit::$(git rev-parse --short=8 HEAD)"
|
||||
|
||||
# Version
|
||||
echo "::set-output name=version_major::$(cat RELEASE | sed -E 's/([0-9]+)\.([0-9]+)\.([0-9]+)/\1/')"
|
||||
echo "::set-output name=version_minor::$(cat RELEASE | sed -E 's/([0-9]+)\.([0-9]+)\.([0-9]+)/\2/')"
|
||||
echo "::set-output name=version_patch::$(cat RELEASE | sed -E 's/([0-9]+)\.([0-9]+)\.([0-9]+)/\3/')"
|
||||
VERSION=$(cat RELEASE)
|
||||
echo "::set-output name=version_major::$(echo ${VERSION} | sed -E 's/([a-z0-9]+)\.([a-z0-9]+)\.([a-z0-9]+)/\1/')"
|
||||
echo "::set-output name=version_minor::$(echo ${VERSION} | sed -E 's/([a-z0-9]+)\.([a-z0-9]+)\.([a-z0-9]+)/\2/')"
|
||||
echo "::set-output name=version_patch::$(echo ${VERSION} | sed -E 's/([a-z0-9]+)\.([a-z0-9]+)\.([a-z0-9]+)/\3/')"
|
||||
- name: "Dependency: Packages"
|
||||
shell: bash
|
||||
run: |
|
||||
@@ -100,16 +101,16 @@ jobs:
|
||||
sudo make PREFIX=/usr/${{ steps.data.outputs.cross_prefix }} install
|
||||
popd > /dev/null
|
||||
|
||||
if [[ ${{ steps.data.outputs.version_major >= 4 }} ]]; then
|
||||
if (( "${{ steps.data.outputs.version_major }}" >= 4 )); then
|
||||
echo "::set-output name=flags::--enable-ffnvcodec --enable-nvdec --enable-nvenc"
|
||||
elif [[ ${{ steps.data.outputs.version_major >= 3 }} ]]; then
|
||||
if [[ ${{ steps.data.outputs.version_minor >= 2 }} ]]; then
|
||||
elif (( "${{ steps.data.outputs.version_major }}" >= 3 )); then
|
||||
if (( "${{ steps.data.outputs.version_minor }}" >= 2 )); then
|
||||
# 3.2+ has cuda, cuvid, nvenc
|
||||
echo "::set-output name=flags::--enable-cuda --enable-cuvid --enable-nvenc"
|
||||
elif [[ ${{ steps.data.outputs.version_minor >= 1 }} ]]; then
|
||||
elif (( "${{ steps.data.outputs.version_minor }}" >= 1 )); then
|
||||
# 3.1 has cuda, nvenc
|
||||
echo "::set-output name=flags::--enable-cuda --enable-nvenc"
|
||||
elif [[ ${{ steps.data.outputs.version_minor >= 0 }} ]]; then
|
||||
elif (( "${{ steps.data.outputs.version_minor }}" >= 0 )); then
|
||||
# 3.0 has nvenc
|
||||
echo "::set-output name=flags::--enable-nvenc"
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user