1 # SPDX-License-Identifier: 0BSD
3 #############################################################################
7 #############################################################################
11 # Only run the Windows CI manually since it takes much longer than the others.
18 # Test different environments since the code may change between
19 # them and we want to ensure that we support all potential users.
20 # clang64 builds are currently broken when building static libraries
21 # due to a bug in ldd search path:
22 # https://github.com/llvm/llvm-project/issues/67779
23 # TODO - re-enable clang64 when this is resolved.
24 msys2_env: [mingw64, mingw32, ucrt64, msys]
25 build_system: [autotools, cmake]
27 # Set the shell to be msys2 as a default to avoid setting it for
28 # every individual run command.
33 runs-on: windows-latest
40 # Rely on the msys2 GitHub Action to set up the msys2 environment.
42 uses: msys2/setup-msys2@cc11e9188b693c2b100158c3322424c4cc1dadea #v2.22.0
44 msystem: ${{ matrix.msys2_env }}
49 # Need to explicitly set the shell here since we set the default
50 # shell as msys2 earlier. This avoids an extra msys2 dependency on
53 # Avoid Windows line endings. Otherwise test_scripts.sh will fail
54 # because the expected output is stored in the test framework as a
55 # text file and will not match the output from xzgrep.
56 run: git config --global core.autocrlf false
58 - uses: actions/checkout@v4.1.6
61 ########################
62 # Install Dependencies #
63 ########################
65 # The pacman repository has a different naming scheme for default
66 # msys packages than the others. The pacboy tool allows installing
67 # the packages possible in matrix setup without a burdensome amount
69 - name: Install Dependencies
70 if: ${{ matrix.msys2_env == 'msys' && matrix.build_system == 'autotools' }}
71 run: pacman --noconfirm -S --needed autotools base-devel doxygen gettext-devel gcc
73 - name: Install Dependencies
74 if: ${{ matrix.msys2_env != 'msys' && matrix.build_system == 'autotools' }}
75 run: pacboy --noconfirm -S --needed autotools:p toolchain:p doxygen:p
77 - name: Install Dependencies
78 if: ${{ matrix.msys2_env == 'msys' && matrix.build_system == 'cmake' }}
79 run: pacman --noconfirm -S --needed cmake base-devel gcc
81 - name: Install Dependencies
82 if: ${{ matrix.msys2_env != 'msys' && matrix.build_system == 'cmake' }}
83 run: pacboy --noconfirm -S --needed cmake:p toolchain:p
89 - name: Build with full features
90 run: ./build-aux/ci_build.bash -a "--no-po4a" -b ${{ matrix.build_system }} -p build
91 - name: Test with full features
92 run: ./build-aux/ci_build.bash -a "--no-po4a" -b ${{ matrix.build_system }} -p test -n full_features
94 - name: Build without threads
95 run: ./build-aux/ci_build.bash -a "--no-po4a" -b ${{ matrix.build_system }} -d threads,shared -p build
96 - name: Test without threads
97 run: ./build-aux/ci_build.bash -a "--no-po4a" -b ${{ matrix.build_system }} -d threads,shared -p test -n no_threads
99 - name: Build without encoders
100 run: ./build-aux/ci_build.bash -a "--no-po4a" -b ${{ matrix.build_system }} -d encoders,shared -p build
101 - name: Test without encoders
102 run: ./build-aux/ci_build.bash -a "--no-po4a" -b ${{ matrix.build_system }} -d encoders,shared -p test -n no_encoders
104 - name: Build without decoders
105 run: ./build-aux/ci_build.bash -a "--no-po4a" -b ${{ matrix.build_system }} -d decoders,shared -p build
106 - name: Test without decoders
107 run: ./build-aux/ci_build.bash -a "--no-po4a" -b ${{ matrix.build_system }} -d decoders,shared -p test -n no_decoders
109 - name: Build with only crc32 check
110 run: ./build-aux/ci_build.bash -a "--no-po4a" -b ${{ matrix.build_system }} -c crc32 -d shared,nls -p build
111 - name: Test with only crc32 check
112 run: ./build-aux/ci_build.bash -a "--no-po4a" -b ${{ matrix.build_system }} -c crc32 -d shared,nls -p test -n crc32_only
119 # Upload the test logs as artifacts if any step has failed.
120 - uses: actions/upload-artifact@v4.3.3
123 name: ${{ matrix.msys2_env }} ${{ matrix.build_system }} Test Logs
124 path: build-aux/artifacts