-
Notifications
You must be signed in to change notification settings - Fork 211
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add ci-windows-shared-local.yml #2309
Changes from all commits
c518c14
6e8c535
02cb68c
1ae0307
12a030a
4343faf
a757ce4
a941372
4ba66e4
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
# Do a shared library build with local dependencies. | ||
|
||
name: CI Windows Shared Local | ||
on: | ||
push: | ||
pull_request: | ||
paths: | ||
- '.github/workflows/ci-windows-shared-local.yml' | ||
- '**CMakeLists.txt' | ||
- 'cmake/**' | ||
- 'ext/**' | ||
|
||
permissions: | ||
contents: read | ||
|
||
# Cancel the workflow if a new one is triggered from the same PR, branch, or tag, except on main. | ||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.ref }} | ||
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }} | ||
|
||
jobs: | ||
build-windows-shared-local: | ||
runs-on: windows-latest | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
compiler: [msvc, clang-cl] | ||
|
||
steps: | ||
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 | ||
- uses: ./.github/actions/setup-windows | ||
with: | ||
codec-aom: 'LOCAL' | ||
codec-dav1d: 'LOCAL' | ||
extra-cache-key: ${{ matrix.compiler }} | ||
- name: Leave compiler as default | ||
if: matrix.compiler == 'msvc' | ||
run: | | ||
echo "AVIF_CMAKE_C_COMPILER=" >> $env:GITHUB_ENV | ||
echo "AVIF_CMAKE_CXX_COMPILER=" >> $env:GITHUB_ENV | ||
- name: Set clang-cl as compiler | ||
if: matrix.compiler == 'clang-cl' | ||
run: | | ||
echo "AVIF_CMAKE_C_COMPILER=-DCMAKE_C_COMPILER=clang-cl" >> $env:GITHUB_ENV | ||
echo "AVIF_CMAKE_CXX_COMPILER=-DCMAKE_CXX_COMPILER=clang-cl" >> $env:GITHUB_ENV | ||
|
||
- name: Prepare libavif (cmake) | ||
run: > | ||
cmake -G Ninja -S . -B build | ||
wantehchang marked this conversation as resolved.
Show resolved
Hide resolved
|
||
-DCMAKE_BUILD_TYPE=Release -DBUILD_SHARED_LIBS=ON | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Should There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We can looking into adding There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yannis: While working on related build issues on Windows, I remembered the linking issue you were referring to. In We may be able to set the |
||
-DAVIF_CODEC_AOM=LOCAL -DAVIF_CODEC_DAV1D=LOCAL | ||
-DAVIF_JPEG=LOCAL -DAVIF_LIBSHARPYUV=LOCAL | ||
-DAVIF_LIBYUV=LOCAL -DAVIF_ZLIBPNG=LOCAL | ||
-DAVIF_BUILD_EXAMPLES=ON -DAVIF_BUILD_APPS=ON | ||
-DAVIF_BUILD_TESTS=ON -DAVIF_ENABLE_GTEST=ON -DAVIF_GTEST=LOCAL | ||
-DAVIF_ENABLE_EXPERIMENTAL_YCGCO_R=ON | ||
-DAVIF_ENABLE_EXPERIMENTAL_METAV1=ON | ||
-DAVIF_ENABLE_EXPERIMENTAL_SAMPLE_TRANSFORM=ON | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Just a thought: we could have a CI with a matrix testing all combinations of these experimental flags There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. That's a lot of combinations (16) to test. I think we just need to test three combinations:
|
||
-DAVIF_ENABLE_WERROR=ON $env:AVIF_CMAKE_C_COMPILER $env:AVIF_CMAKE_CXX_COMPILER | ||
- name: Build libavif (ninja) | ||
working-directory: ./build | ||
run: ninja | ||
- name: Run AVIF Tests | ||
working-directory: ./build | ||
run: ctest -j $Env:NUMBER_OF_PROCESSORS --output-on-failure |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Setting those variables should probably be put in .github/actions/setup-windows