Use packaged nasm on Unix (#3106)
diff --git a/.github/actions/setup-common/action.yml b/.github/actions/setup-common/action.yml
index 62a7064..70cc7fa 100644
--- a/.github/actions/setup-common/action.yml
+++ b/.github/actions/setup-common/action.yml
@@ -37,9 +37,6 @@
     - name: Print CMake version
       run: cmake --version
       shell: bash
-    - name: Set up nasm
-      if: ${{ inputs.codec-aom == 'LOCAL' || inputs.codec-dav1d == 'LOCAL' || inputs.codec-svt == 'LOCAL' }}
-      uses: ilammy/setup-nasm@72793074d3c8cdda771dba85f6deafe00623038b # v1.5.2
     - name: Set up rust
       if: ${{ inputs.codec-rav1e == 'LOCAL' }}
       uses: actions-rs/toolchain@16499b5e05bf2e26879000db0c1d13f7e13fa3af # v1.0.7
diff --git a/.github/actions/setup-linux/action.yml b/.github/actions/setup-linux/action.yml
index 626aadf..7abbaf7 100644
--- a/.github/actions/setup-linux/action.yml
+++ b/.github/actions/setup-linux/action.yml
@@ -4,6 +4,9 @@
   codec-aom:
     description: "Can take the values: OFF, LOCAL, SYSTEM"
     default: "OFF"
+  codec-avm:
+    description: "Can take the values: OFF, LOCAL, SYSTEM"
+    default: "OFF"
   codec-dav1d:
     description: "Can take the values: OFF, LOCAL, SYSTEM"
     default: "OFF"
@@ -83,6 +86,10 @@
       if: ${{ inputs.libyuv == 'SYSTEM' }}
       run: echo "AVIF_UNIX_LIBRARIES=${{ env.AVIF_UNIX_LIBRARIES }} libyuv-dev" >> "$GITHUB_ENV"
       shell: bash
+    - name: Install nasm
+      if: ${{ inputs.codec-aom == 'LOCAL' || inputs.codec-avm == 'LOCAL' || inputs.codec-dav1d == 'LOCAL' || inputs.codec-svt == 'LOCAL' }}
+      run: echo "AVIF_UNIX_LIBRARIES=${{ env.AVIF_UNIX_LIBRARIES }} nasm" >> "$GITHUB_ENV"
+      shell: bash
     - name: Install zlibpng library
       if: ${{ inputs.zlibpng == 'SYSTEM' }}
       run: echo "AVIF_UNIX_LIBRARIES=${{ env.AVIF_UNIX_LIBRARIES }} libpng-dev" >> "$GITHUB_ENV"
diff --git a/.github/actions/setup-macos/action.yml b/.github/actions/setup-macos/action.yml
index d128fde..617536c 100644
--- a/.github/actions/setup-macos/action.yml
+++ b/.github/actions/setup-macos/action.yml
@@ -4,6 +4,9 @@
   codec-aom:
     description: "Can take the values: OFF, LOCAL, SYSTEM"
     default: "OFF"
+  codec-avm:
+    description: "Can take the values: OFF, LOCAL, SYSTEM"
+    default: "OFF"
   codec-dav1d:
     description: "Can take the values: OFF, LOCAL, SYSTEM"
     default: "OFF"
@@ -50,29 +53,33 @@
       if: ${{ inputs.codec-svt == 'SYSTEM' }}
       run: echo "AVIF_MAC_LIBRARIES=${{ env.AVIF_MAC_LIBRARIES }} svt-av1" >> "$GITHUB_ENV"
       shell: bash
-    - name: Set up meson
+    - name: Install meson
       if: ${{ inputs.codec-dav1d == 'LOCAL' }}
       run: echo "AVIF_MAC_LIBRARIES=${{ env.AVIF_MAC_LIBRARIES }} meson" >> "$GITHUB_ENV"
       shell: bash
-    - name: Set up gtest
+    - name: Install imagemagick
       # imagemagick is used in sh tests (not gtest tests) but we assume that no tests are run by the CI
       # if gtest is off
       if: ${{ inputs.gtest != 'OFF' }}
       run: echo "AVIF_MAC_LIBRARIES=${{ env.AVIF_MAC_LIBRARIES }} imagemagick" >> "$GITHUB_ENV"
       shell: bash
-    - name: Set up tests
+    - name: Install gtest
       if: ${{ inputs.gtest == 'SYSTEM' }}
       run: echo "AVIF_MAC_LIBRARIES=${{ env.AVIF_MAC_LIBRARIES }} googletest" >> "$GITHUB_ENV"
       shell: bash
-    - name: Set up libjpeg-turbo
+    - name: Install libjpeg-turbo
       if: ${{ inputs.libjpeg-turbo == 'SYSTEM' }}
       run: echo "AVIF_MAC_LIBRARIES=${{ env.AVIF_MAC_LIBRARIES }} libjpeg-turbo" >> "$GITHUB_ENV"
       shell: bash
-    - name: Set up libxml2
+    - name: Install libxml2
       if: ${{ inputs.libxml2 == 'SYSTEM' }}
       run: echo "AVIF_MAC_LIBRARIES=${{ env.AVIF_MAC_LIBRARIES }} libxml2" >> "$GITHUB_ENV"
       shell: bash
-    - name: Set up zlibpng
+    - name: Install nasm
+      if: ${{ inputs.codec-aom == 'LOCAL' || inputs.codec-avm == 'LOCAL' || inputs.codec-dav1d == 'LOCAL' || inputs.codec-svt == 'LOCAL' }}
+      run: echo "AVIF_MAC_LIBRARIES=${{ env.AVIF_MAC_LIBRARIES }} nasm" >> "$GITHUB_ENV"
+      shell: bash
+    - name: Install zlibpng
       if: ${{ inputs.zlibpng == 'SYSTEM' }}
       run: echo "AVIF_MAC_LIBRARIES=${{ env.AVIF_MAC_LIBRARIES }} libpng" >> "$GITHUB_ENV"
       shell: bash
diff --git a/.github/actions/setup-windows/action.yml b/.github/actions/setup-windows/action.yml
index 32897c9..b88cc21 100644
--- a/.github/actions/setup-windows/action.yml
+++ b/.github/actions/setup-windows/action.yml
@@ -4,6 +4,9 @@
   codec-aom:
     description: "Can take the values: OFF, LOCAL, SYSTEM"
     default: "OFF"
+  codec-avm:
+    description: "Can take the values: OFF, LOCAL, SYSTEM"
+    default: "OFF"
   codec-dav1d:
     description: "Can take the values: OFF, LOCAL, SYSTEM"
     default: "OFF"
@@ -82,6 +85,10 @@
         token: ${{ github.token }}
         cache-key: ${{ hashFiles('cmake/Modules/*', 'ext/*.cmd', 'ext/*.sh') }}
 
+    - name: Install nasm
+      if: ${{ inputs.codec-aom == 'LOCAL' || inputs.codec-avm == 'LOCAL' || inputs.codec-dav1d == 'LOCAL' || inputs.codec-svt == 'LOCAL' }}
+      uses: ilammy/setup-nasm@72793074d3c8cdda771dba85f6deafe00623038b # v1.5.2
+
     - name: Create folders
       if: env.AVIF_WIN_LIBRARIES == ''
       run: |
diff --git a/.github/workflows/ci-unix-static-av2.yml b/.github/workflows/ci-unix-static-av2.yml
index c4e37ad..bdd2921 100644
--- a/.github/workflows/ci-unix-static-av2.yml
+++ b/.github/workflows/ci-unix-static-av2.yml
@@ -34,6 +34,7 @@
       - uses: ./.github/actions/setup-linux
         with:
           codec-aom: "LOCAL"
+          codec-avm: "LOCAL"
           codec-dav1d: ${{ matrix.also-enable-av1-codecs }}
           codec-svt: ${{ matrix.also-enable-av1-codecs }}
           extra-cache-key: ${{ matrix.also-enable-av1-codecs }}