add arm64 support and update native components #7
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Build AVIF binaries | |
| on: | |
| push: | |
| # any branch | |
| branches: [ "*" ] | |
| workflow_dispatch: # Allows manual triggering | |
| jobs: | |
| build-amd64: | |
| runs-on: ubuntu-24.04-arm | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| with: | |
| submodules: true | |
| - name: Install dependencies | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y build-essential nasm cmake ninja-build libjpeg-dev libpng-dev libtiff-dev libwebp-dev libaom-dev libyuv-dev zlib1g-dev | |
| - name: Build libavif binaries | |
| run: | | |
| cd libavif | |
| mkdir -p build | |
| cd build | |
| cmake -DBUILD_SHARED_LIBS=OFF -DCONFIG_PIC=1 -DCMAKE_BUILD_TYPE=Release -DAVIF_CODEC_AOM=LOCAL -DAVIF_LIBYUV=LOCAL -DAVIF_BUILD_APPS=ON -G Ninja .. | |
| ninja | |
| - name: Upload artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: c-native-artifact | |
| path: | | |
| libavif/build/avifenc | |
| libavif/build/avifdec | |
| if-no-files-found: error | |
| # Retain artifacts for 1 day | |
| retention-days: 1 | |