1 #############################################################################
5 # This file has been put into the public domain.
6 # You can do whatever you want with this file.
8 #############################################################################
12 # Only run the Windows CI manually since it takes much longer than the others.
19 # Test different environments since the code may change between
20 # them and we want to ensure that we support all potential users.
21 # clang64 currently fails due to a warning, so support will be
23 msys2_env: [mingw64, mingw32, ucrt64, clang64, msys]
24 build_system: [autotools, cmake]
26 # Set the shell to be msys2 as a default to avoid setting it for
27 # every individual run command.
32 runs-on: windows-latest
39 # Rely on the msys2 GitHub Action to set up the msys2 environment.
41 uses: msys2/setup-msys2@v2
43 msystem: ${{ matrix.msys2_env }}
48 # Need to explicitly set the shell here since we set the default
49 # shell as msys2 earlier. This avoids an extra msys2 dependency on
52 # Avoid Windows line endings. Otherwise test_scripts.sh will fail
53 # because the expected output is stored in the test framework as a
54 # text file and will not match the output from xzgrep.
55 run: git config --global core.autocrlf false
57 - uses: actions/checkout@v3
60 ########################
61 # Install Dependencies #
62 ########################
64 # The pacman repository has a different naming scheme for default
65 # msys packages than the others. The pacboy tool allows installing
66 # the packages possible in matrix setup without a burdensome amount
68 - name: Install Dependencies
69 if: ${{ matrix.msys2_env == 'msys' && matrix.build_system == 'autotools' }}
70 run: pacman --noconfirm -S --needed autotools base-devel doxygen gettext-devel gcc
72 - name: Install Dependencies
73 if: ${{ matrix.msys2_env != 'msys' && matrix.build_system == 'autotools' }}
74 run: pacboy --noconfirm -S --needed autotools:p gcc:p clang:p make:p doxygen:p
76 - name: Install Dependencies
77 if: ${{ matrix.msys2_env == 'msys' && matrix.build_system == 'cmake' }}
78 run: pacman --noconfirm -S --needed cmake base-devel gcc
80 - name: Install Dependencies
81 if: ${{ matrix.msys2_env != 'msys' && matrix.build_system == 'cmake' }}
82 run: pacboy --noconfirm -S --needed cmake:p gcc:p clang:p make:p
88 - name: Build with full features
89 run: ./build-aux/ci_build.sh -a "--no-po4a" -b ${{ matrix.build_system }} -p build
90 - name: Test with full features
91 run: ./build-aux/ci_build.sh -a "--no-po4a" -b ${{ matrix.build_system }} -p test -n full_features
93 - name: Build without threads
94 run: ./build-aux/ci_build.sh -a "--no-po4a" -b ${{ matrix.build_system }} -d threads,shared -p build
95 - name: Test without threads
96 run: ./build-aux/ci_build.sh -a "--no-po4a" -b ${{ matrix.build_system }} -d threads,shared -p test -n no_threads
98 - name: Build without encoders
99 run: ./build-aux/ci_build.sh -a "--no-po4a" -b ${{ matrix.build_system }} -d encoders,shared -p build
100 - name: Test without encoders
101 run: ./build-aux/ci_build.sh -a "--no-po4a" -b ${{ matrix.build_system }} -d encoders,shared -p test -n no_encoders
103 - name: Build without decoders
104 run: ./build-aux/ci_build.sh -a "--no-po4a" -b ${{ matrix.build_system }} -d decoders,shared -p build
105 - name: Test without decoders
106 run: ./build-aux/ci_build.sh -a "--no-po4a" -b ${{ matrix.build_system }} -d decoders,shared -p test -n no_decoders
108 - name: Build with only crc32 check
109 run: ./build-aux/ci_build.sh -a "--no-po4a" -b ${{ matrix.build_system }} -c crc32 -d shared,nls -p build
110 - name: Test with only crc32 check
111 run: ./build-aux/ci_build.sh -a "--no-po4a" -b ${{ matrix.build_system }} -c crc32 -d shared,nls -p test -n crc32_only
118 # Upload the test logs as artifacts if any step has failed.
119 - uses: actions/upload-artifact@v3
122 name: ${{ matrix.msys2_env }} ${{ matrix.build_system }} Test Logs
123 path: build-aux/artifacts