Bump msys2/setup-msys2 from 2.23.0 to 2.24.0 #940
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CI | |
on: [push, pull_request] | |
permissions: | |
contents: read | |
jobs: | |
checkers: | |
name: Run static checkers | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 | |
- name: Run clang-format style check (.c and .h) | |
uses: jidicula/clang-format-action@c74383674bf5f7c69f60ce562019c1c94bc1421a # v4.13.0 | |
ubuntu: | |
name: ${{ matrix.cmake-build-type }}-build [${{ matrix.compiler }}, cmake-${{ matrix.cmake-version }} sanitizer="${{ matrix.sanitizer }}"] | |
runs-on: ubuntu-20.04 | |
strategy: | |
fail-fast: false | |
matrix: | |
compiler: [gcc-13, clang-18] | |
cmake-version: [3.29.3] | |
cmake-build-type: [Release, RelWithDebInfo] | |
sanitizer: ["", thread, undefined, leak, address] | |
include: | |
- compiler: gcc-7 | |
cmake-version: 3.14.5 | |
cmake-build-type: Release | |
sanitizer: "" | |
- compiler: gcc-8 | |
cmake-version: 3.15.4 | |
cmake-build-type: Release | |
sanitizer: "" | |
- compiler: clang-7 | |
cmake-version: 3.17.3 | |
cmake-build-type: Release | |
sanitizer: "" | |
- compiler: clang-9 | |
cmake-version: 3.18.6 | |
cmake-build-type: Release | |
sanitizer: "" | |
steps: | |
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 | |
- name: Prepare build tools | |
uses: aminya/setup-cpp@290824452986e378826155f3379d31bce8753d76 # v0.37.0 | |
with: | |
compiler: ${{ matrix.compiler }} | |
cmake: ${{ matrix.cmake-version }} | |
- name: Install cached APT packages | |
uses: awalsh128/cache-apt-pkgs-action@a6c3917cc929dd0345bfb2d3feaf9101823370ad # v1.4.2 | |
with: | |
packages: libevent-dev libuv1-dev libev-dev libglib2.0-dev | |
version: 1.0 | |
- name: Install hiredis | |
env: | |
VERSION: 1.2.0 | |
run: | | |
curl -L https://github.com/redis/hiredis/archive/v${VERSION}.tar.gz | tar -xz | |
cmake -S hiredis-${VERSION} -B hiredis-build -DENABLE_SSL=ON | |
sudo make -C hiredis-build install | |
- name: Create build folder | |
run: cmake -E make_directory build | |
- name: Generate makefiles | |
shell: bash | |
working-directory: build | |
run: cmake $GITHUB_WORKSPACE -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DENABLE_SSL=ON -DENABLE_IPV6_TESTS=ON -DDOWNLOAD_HIREDIS=OFF -DUSE_SANITIZER=${{ matrix.sanitizer }} .. | |
- name: Build | |
shell: bash | |
working-directory: build | |
run: VERBOSE=1 make | |
- name: Setup clusters | |
shell: bash | |
working-directory: build | |
run: make start | |
- name: Wait for clusters to start.. | |
uses: kibertoad/wait-action@99f6f101c5be7b88bb9b41c0d3b810722491b8e5 # 1.0.1 | |
with: | |
time: '20s' | |
- name: Run tests | |
shell: bash | |
working-directory: build | |
run: make CTEST_OUTPUT_ON_FAILURE=1 test | |
- name: Teardown clusters | |
working-directory: build | |
shell: bash | |
run: make stop | |
- name: Build examples | |
shell: bash | |
env: | |
CC: ${{ matrix.compiler }} | |
run: | | |
# Unset env. variables set by action 'aminya/setup-cpp' | |
# since they affects library installation and linkage. | |
unset LDFLAGS LIBRARY_PATH | |
examples/using_cmake_externalproject/build.sh | |
examples/using_cmake_separate/build.sh | |
examples/using_cmake_and_make_mixed/build.sh | |
examples/using_make/build.sh | |
macos: | |
name: macOS | |
runs-on: macos-latest | |
steps: | |
- name: Prepare | |
run: | | |
brew install cmake ninja openssl | |
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 | |
- name: Build | |
run: | | |
mkdir build && cd build | |
cmake .. -G Ninja -DCMAKE_BUILD_TYPE=Release -DENABLE_SSL=ON | |
ninja -v | |
windows: | |
name: Windows | |
runs-on: windows-latest | |
steps: | |
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 | |
- uses: ilammy/msvc-dev-cmd@0b201ec74fa43914dc39ae48a89fd1d8cb592756 # v1.13.0 | |
- name: Prepare | |
run: | | |
choco install -y ninja | |
vcpkg install --triplet x64-windows pkgconf libevent | |
- name: Build | |
run: | | |
mkdir build && cd build | |
cmake .. -G Ninja -DCMAKE_BUILD_TYPE=Release -DCMAKE_TOOLCHAIN_FILE=C:\vcpkg\scripts\buildsystems\vcpkg.cmake | |
ninja -v | |
windows-mingw64: | |
name: Windows (MinGW64) | |
runs-on: windows-latest | |
steps: | |
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 | |
- name: Set up MinGW | |
uses: msys2/setup-msys2@5df0ca6cbf14efcd08f8d5bd5e049a3cc8e07fd2 # v2.24.0 | |
with: | |
msystem: mingw64 | |
install: | | |
mingw-w64-x86_64-gcc | |
mingw-w64-x86_64-cmake | |
mingw-w64-x86_64-ninja | |
mingw-w64-x86_64-libevent | |
- name: Build | |
shell: msys2 {0} | |
run: | | |
mkdir build && cd build | |
cmake .. -G Ninja | |
cmake --build . |