-
Notifications
You must be signed in to change notification settings - Fork 304
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add macOS runners, testing only those for now
- Loading branch information
Showing
1 changed file
with
31 additions
and
13 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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 | ||
|
@@ -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 |