diff --git a/.github/workflows/ydms-build.yaml b/.github/workflows/ydms-build.yaml new file mode 100644 index 0000000000..4f995ed68e --- /dev/null +++ b/.github/workflows/ydms-build.yaml @@ -0,0 +1,98 @@ +name: Build libheif +run-name: ${{ github.actor }} is building libheif +on: + push: + workflow_dispatch: + +jobs: + Build-Linux: + strategy: + matrix: + osver: [ubuntu-latest, ubuntu-24.04-arm] + + runs-on: ${{ matrix.osver }} + + steps: + - name: Check out repository code + uses: actions/checkout@v4 + + - name: Set dist name + run: | + if ${{ matrix.osver == 'ubuntu-24.04-arm' }}; then + echo "distname=libheif-linux-arm" >> "$GITHUB_ENV" + else + echo "distname=libheif-linux" >> "$GITHUB_ENV" + fi + + - name: Install libaom + run: | + sudo apt-get update + sudo apt-get install -y libaom-dev + + + - name: Make build directory + run: mkdir build + + - name: Create output directory variable + id: buildoutput + run: echo "build-output-dir=${{ github.workspace }}/build" >> "$GITHUB_OUTPUT" + + - name: Configure CMake + working-directory: ${{ steps.buildoutput.outputs.build-output-dir }} + run: cmake --preset=release-noplugins .. + + - name: Build libheif + working-directory: ${{ steps.buildoutput.outputs.build-output-dir }} + run: make + + - name: Archive and put a pretty bow on it + uses: actions/upload-artifact@v4 + with: + name: ${{ env.distname }} + path: ${{ steps.buildoutput.outputs.build-output-dir }}/libheif + + Build-Windows: + runs-on: windows-latest + steps: + - name: Check out repository code + uses: actions/checkout@v4 + + - name: Make build directory + run: mkdir build + + - name: Create output directory variable + id: buildoutput + run: echo "build-output-dir=${{ github.workspace }}/build" >> "$Env:GITHUB_OUTPUT" + + - uses: ilammy/setup-nasm@v1 + + - name: Compile AOM + run: | + cd "${{ github.workspace }}\third-party" + + git clone -b v3.6.0 --depth 1 https://aomedia.googlesource.com/aom + + cd aom + + mkdir buildx + + cd buildx + + cmake -DCMAKE_BUILD_TYPE=Release -DENABLE_DOCS=0 -DENABLE_EXAMPLES=0 -DENABLE_TESTDATA=0 -DENABLE_TESTS=0 -DENABLE_TOOLS=0 .. + + cmake --build . --config Release + + - name: Configure CMake + working-directory: ${{ steps.buildoutput.outputs.build-output-dir }} + run: | + cmake --preset=release-noplugins .. -DAOM_INCLUDE_DIR="${{ github.workspace }}\third-party\aom" -DAOM_LIBRARY="${{ github.workspace }}\third-party\aom\buildx\Release\aom.lib" + + - name: Build libheif + working-directory: ${{ steps.buildoutput.outputs.build-output-dir }} + run: cmake --build . --config Release + + - name: Archive and put a pretty bow on it + uses: actions/upload-artifact@v4 + with: + name: libheif-windows + path: ${{ steps.buildoutput.outputs.build-output-dir }}/libheif/Release