Skip to content

Commit

Permalink
Add macOS runners, testing only those for now
Browse files Browse the repository at this point in the history
  • Loading branch information
nicolasff committed Nov 4, 2023
1 parent 7a09bb9 commit c479e31
Showing 1 changed file with 31 additions and 13 deletions.
44 changes: 31 additions & 13 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,49 +39,67 @@ jobs:


build-and-test-ubuntu-matrix:
runs-on: ubuntu-20.04
strategy:
fail-fast: false # don't cancel other jobs in the matrix if one fails
matrix:
include:
- container: ubuntu:18.04
version: "18.04"
- container: ubuntu:20.04
version: "20.04"
- container: ubuntu:22.04
version: "22.04"
- container: ubuntu:23.04
version: "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
osname: macos-12

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

services:
redis:
image: redis:7.0.12-alpine # Docker Hub image used as a sidecar

# Specifies to run each job in the container from the matrix
# run each job in the container specified (ignored for macOS runners that don't use containers)
container:
image: ${{ matrix.container }}

steps:
- 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
- name: Fix pip3 on Ubuntu 23.04
if: matrix.container == 'ubuntu:23.04'
if: matrix.osname == 'ubuntu:23.04'
run: rm -f /usr/lib/python$(python3 --version | cut -d ' ' -f 2 | cut -d '.' -f 1,2)/EXTERNALLY-MANAGED

- name: Update Python3 on Ubuntu 18.04
if: matrix.container == 'ubuntu:18.04'
if: matrix.osname == 'ubuntu:18.04'
run: |
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')
run: |
brew install libevent msgpack-c curl node [email protected]
brew link --overwrite [email protected]
pip3 install --upgrade pip
- name: Build
run: make
- name: Run Webdis and test
Expand All @@ -95,5 +113,5 @@ jobs:
- name: Archive logs
uses: actions/upload-artifact@v3
with:
name: webdis-${{ matrix.version }}.log
name: webdis-${{ matrix.osname }}.log
path: webdis.log

0 comments on commit c479e31

Please sign in to comment.