Adds support for the Content-Encoding header #262
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: Build and test (OS matrix) | |
# trigger the workflow on push or pull requests | |
on: [push, pull_request, workflow_dispatch] | |
jobs: | |
linux: # (this is the job name) | |
strategy: | |
fail-fast: false # don't cancel other jobs in the matrix if one fails | |
matrix: | |
include: | |
- runner: ubuntu-20.04 | |
container: ubuntu:20.04 | |
os_name: ubuntu-20.04 | |
- runner: ubuntu-20.04 | |
container: ubuntu:22.04 | |
os_name: ubuntu-22.04 | |
- runner: ubuntu-20.04 | |
container: ubuntu:24.04 | |
os_name: ubuntu-24.04 | |
- runner: ubuntu-20.04 | |
container: redhat/ubi8:8.8 | |
os_name: redhat-8.8 | |
- runner: ubuntu-20.04 | |
container: redhat/ubi9:9.2 | |
os_name: redhat-9.2 | |
runs-on: ${{ matrix.runner }} | |
services: | |
redis: | |
image: redis:7.0.12-alpine # Docker Hub image used as a sidecar | |
# run each job in the container specified (ignored for macOS runners that don't use containers) | |
container: | |
image: ${{ matrix.container }} | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Fetch package lists and install dependencies (Ubuntu) | |
if: contains(matrix.os_name, 'ubuntu-') | |
run: | | |
apt-get -y update | |
DEBIAN_FRONTEND=noninteractive apt-get -y --allow-unauthenticated --allow-downgrades --allow-remove-essential --allow-change-held-packages \ | |
install make gcc libevent-dev libmsgpack-dev curl uuid python3 python3-pip | |
# (using `rm` + `ln` since using `alternatives` doesn't work on both UBI 8 and UBI 9) | |
- name: Install dependencies (Red Hat) | |
if: contains(matrix.os_name, 'redhat-') | |
run: | | |
yum install -y --allowerasing make cmake gcc gcc-c++ libevent-devel git curl uuid python3.11 python3.11-pip | |
rm -f /usr/bin/python3 /usr/bin/pip3 | |
ln -s $(which python3.11) /usr/bin/python3 | |
ln -s $(which pip3.11) /usr/bin/pip3 | |
- name: Install msgpack-c (Red Hat) | |
if: contains(matrix.os_name, 'redhat-') | |
run: | | |
cd /tmp | |
curl -sLO https://github.com/msgpack/msgpack-c/releases/download/c-6.0.0/msgpack-c-6.0.0.tar.gz | |
tar -xzf msgpack-c-6.0.0.tar.gz | |
cd msgpack-c-6.0.0 | |
cmake -DMSGPACK_BUILD_TESTS=OFF -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_INSTALL_LIBDIR=lib64 . | |
make | |
make install | |
- name: Fix pip3 on Ubuntu 24.04 | |
if: matrix.os_name == 'ubuntu-24.04' | |
run: rm -f /usr/lib/python$(python3 --version | cut -d ' ' -f 2 | cut -d '.' -f 1,2)/EXTERNALLY-MANAGED | |
- name: Build | |
run: make | |
- name: Run Webdis and test | |
run: | | |
./webdis .github/workflows/webdis-ci.json | |
sleep 2 | |
./tests/basic.py | |
./tests/curl-tests.sh | |
pip3 --no-cache-dir install -r tests/requirements.txt | |
./tests/ws-tests.py | |
- name: Archive logs | |
uses: actions/upload-artifact@v4 | |
with: | |
name: webdis-${{ matrix.os_name }}.log | |
path: webdis.log | |
macos: # (again, this is the job name) | |
strategy: | |
fail-fast: false | |
matrix: | |
include: | |
- runner: macos-13 | |
os_name: macos-13 | |
- runner: macos-14 | |
os_name: macos-14 | |
runs-on: ${{ matrix.runner }} | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install dependencies | |
run: | | |
rm '/usr/local/bin/2to3-3.11' | |
brew reinstall libevent curl || true | |
brew install libevent curl msgpack-c [email protected] redis || true | |
brew link --overwrite [email protected] | |
- name: Set up python venv | |
run: | | |
python3.11 -m venv venv | |
source venv/bin/activate | |
pip install --upgrade pip | |
- name: Set up redis hostname | |
run: echo "127.0.0.1 redis" | sudo tee -a /etc/hosts | |
- name: Build with explicit libevent path on macOS 14 | |
if: matrix.os_name == 'macos-14' | |
run: | | |
export CPPFLAGS="-I$(brew --prefix libevent)/include" | |
export LDFLAGS="-L$(brew --prefix libevent)/lib -levent -lpthread" | |
make | |
- name: Regular build | |
if: matrix.os_name != 'macos-14' | |
run: make | |
- name: Run Webdis and test | |
run: | | |
brew services start redis | |
./webdis .github/workflows/webdis-ci.json | |
sleep 2 | |
./tests/basic.py | |
./tests/curl-tests.sh | |
python3.11 -m venv venv && source venv/bin/activate | |
pip3 --no-cache-dir install -r tests/requirements.txt | |
./tests/ws-tests.py | |
- name: Archive logs | |
uses: actions/upload-artifact@v4 | |
with: | |
name: webdis-${{ matrix.os_name }}.log | |
path: webdis.log |