File: ci-windows-artifacts.yml

package info (click to toggle)
libavif 1.3.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 20,956 kB
  • sloc: ansic: 29,303; cpp: 13,260; sh: 1,145; xml: 1,040; java: 307; makefile: 51
file content (93 lines) | stat: -rw-r--r-- 3,413 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
# This workflow generates artifacts such as avifenc.exe and avifdec.exe for convenience.

name: CI Windows Release Artifacts
on:
  release:
    types: [created]

permissions:
  contents: write

jobs:
  build-windows-artifacts:
    runs-on: ${{ matrix.os }}
    strategy:
      fail-fast: false
      matrix:
        os: [windows-latest]

    steps:
      - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
      - uses: ./.github/actions/setup-windows
        id: setup
        with:
          codec-aom: "LOCAL"
          codec-dav1d: "LOCAL"

      - name: Build aom
        if: steps.setup.outputs.ext-cache-hit != 'true'
        working-directory: ./ext
        run: ./aom.cmd
      - name: Build dav1d
        if: steps.setup.outputs.ext-cache-hit != 'true'
        working-directory: ./ext
        run: ./dav1d.cmd
      - name: Build libyuv
        if: steps.setup.outputs.ext-cache-hit != 'true'
        working-directory: ./ext
        run: ./libyuv.cmd
        # Use clang-cl to build libyuv. The assembly code in libyuv is written in the
        # GCC inline assembly format. Visual C++ doesn't support GCC inline assembly.
        env:
          CC: clang-cl
          CXX: clang-cl
      - name: Build libsharpyuv
        if: steps.setup.outputs.ext-cache-hit != 'true'
        working-directory: ./ext
        run: ./libsharpyuv.cmd
      - name: Build libjpeg
        if: steps.setup.outputs.ext-cache-hit != 'true'
        working-directory: ./ext
        run: ./libjpeg.cmd
      - name: Build zlib and libpng
        if: steps.setup.outputs.ext-cache-hit != 'true'
        working-directory: ./ext
        run: ./zlibpng.cmd

      - name: Prepare libavif (cmake)
        run: >
          cmake -G "Visual Studio 17 2022" -A x64 -S . -B build
          -DCMAKE_BUILD_TYPE=Release -DBUILD_SHARED_LIBS=OFF
          -DAVIF_CODEC_AOM=LOCAL -DAVIF_CODEC_AOM_ENCODE=ON
          -DAVIF_CODEC_AOM_DECODE=OFF -DAVIF_CODEC_DAV1D=LOCAL
          -DAVIF_LIBYUV=LOCAL -DAVIF_LIBSHARPYUV=LOCAL
          -DAVIF_JPEG=LOCAL -DAVIF_ZLIBPNG=LOCAL
          -DAVIF_BUILD_EXAMPLES=OFF -DAVIF_BUILD_APPS=ON
          -DAVIF_BUILD_TESTS=OFF -DAVIF_ENABLE_WERROR=ON
          -DCMAKE_VS_WINDOWS_TARGET_PLATFORM_VERSION=10
      - name: Build libavif
        run: cmake --build build --config Release --parallel 4
      - name: Archive artifacts
        uses: thedoctor0/zip-release@b57d897cb5d60cb78b51a507f63fa184cfe35554 # 0.7.6
        with:
          type: "zip"
          filename: "windows-artifacts.zip"
          directory: "build/Release"
          path: "*.exe"
      - name: Upload artifacts
        uses: actions/upload-release-asset@e8f9f06c4b078e705bd2ea027f0926603fc9b4d5 # v1.0.2
        env:
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
        with:
          # See https://docs.github.com/en/webhooks/webhook-events-and-payloads#release.
          upload_url: ${{ github.event.release.upload_url }}
          asset_path: build/Release/windows-artifacts.zip
          asset_name: windows-artifacts.zip
          asset_content_type: application/zip

    # Use the following instead of the above to test this workflow outside of a release event.
    # - name: Upload artifacts
    #   uses: actions/upload-artifact@50769540e7f4bd5e21e526ee35c689e35e0d6874 # v4.4.0
    #   with:
    #     name: windows-artifacts.zip
    #     path: build/Release/windows-artifacts.zip