Skip to content

Commit

Permalink
Split out macOS run into its own job with a matrix too
Browse files Browse the repository at this point in the history
  • Loading branch information
nicolasff committed Nov 4, 2023
1 parent c479e31 commit 186235c
Showing 1 changed file with 56 additions and 17 deletions.
73 changes: 56 additions & 17 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,22 +39,23 @@ jobs:


build-and-test-ubuntu-matrix:
if: false # FIXME: disabled for now as I test the macOS matrix
strategy:
fail-fast: false # don't cancel other jobs in the matrix if one fails
matrix:
include:
# - runner: ubuntu-20.04
# container: ubuntu:18.04
# osname: ubuntu-18.04
# - runner: ubuntu-20.04
# container: ubuntu:20.04
# osname: ubuntu-20.04
# - runner: ubuntu-20.04
# container: ubuntu:22.04
# osname: ubuntu-22.04
# - runner: ubuntu-20.04
# container: ubuntu:23.04
# osname: ubuntu-23.04
- runner: ubuntu-20.04
container: ubuntu:18.04
osname: ubuntu-18.04
- runner: ubuntu-20.04
container: ubuntu:20.04
osname: ubuntu-20.04
- runner: ubuntu-20.04
container: ubuntu:22.04
osname: ubuntu-22.04
- runner: ubuntu-20.04
container: ubuntu:23.04
osname: ubuntu-23.04
- runner: macos-11
osname: macos-11
- runner: macos-12
Expand All @@ -74,11 +75,9 @@ jobs:
- uses: actions/checkout@v3

- name: Fetch package lists
if: contains(matrix.osname, 'ubuntu')
run: apt-get -y update

- name: Install dependencies
if: contains(matrix.osname, 'ubuntu')
run: |
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 nodejs python3 python3-pip
Expand All @@ -93,23 +92,63 @@ jobs:
DEBIAN_FRONTEND=noninteractive apt-get -y install python3.8
update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.8 1
- name: Install dependencies on macOS
if: contains(matrix.osname, 'macos')
- 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@v3
with:
name: webdis-${{ matrix.osname }}.log
path: webdis.log



build-and-test-macos-matrix:
strategy:
fail-fast: false # don't cancel other jobs in the matrix if one fails
matrix:
include:
- runner: macos-11
osname: macos-11
- runner: macos-12
osname: macos-12

runs-on: ${{ matrix.runner }}

steps:
- uses: actions/checkout@v3

- name: Install dependencies
run: |
brew install libevent msgpack-c curl node [email protected]
brew install libevent msgpack-c curl node [email protected] redis
brew link --overwrite [email protected]
pip3 install --upgrade pip
- name: Set up redis hostname
run: echo "127.0.0.1 redis" | sudo tee -a /etc/hosts

- name: Build
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
pip3 --no-cache-dir install -r tests/requirements.txt
./tests/ws-tests.py
- name: Archive logs
uses: actions/upload-artifact@v3
with:
Expand Down

0 comments on commit 186235c

Please sign in to comment.