Skip to content

Commit f0ad2a4

Browse files
bfirshandreasjansson
authored andcommitted
Run CI on macOS
This is bound to catch some edge cases. Signed-off-by: Ben Firshman <[email protected]>
1 parent 6cabde3 commit f0ad2a4

File tree

2 files changed

+29
-7
lines changed

2 files changed

+29
-7
lines changed

.github/workflows/ci.yaml

Lines changed: 17 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,12 @@ env:
1414
jobs:
1515
test-go:
1616
name: "Test (Go)"
17-
runs-on: ubuntu-latest
17+
strategy:
18+
fail-fast: false
19+
matrix:
20+
# https://docs.github.com/en/free-pro-team@latest/actions/reference/specifications-for-github-hosted-runners#supported-runners-and-hardware-resources
21+
platform: [ubuntu-20.04, macos-10.15]
22+
runs-on: ${{ matrix.platform }}
1823
defaults:
1924
run:
2025
shell: bash
@@ -58,7 +63,6 @@ jobs:
5863

5964
test-python:
6065
name: "Test (Python)"
61-
runs-on: ubuntu-latest
6266
defaults:
6367
run:
6468
shell: bash
@@ -67,6 +71,9 @@ jobs:
6771
fail-fast: false
6872
matrix:
6973
python: [3.6, 3.7, 3.8]
74+
# https://docs.github.com/en/free-pro-team@latest/actions/reference/specifications-for-github-hosted-runners#supported-runners-and-hardware-resources
75+
platform: [ubuntu-20.04, macos-10.15]
76+
runs-on: ${{ matrix.platform }}
7077
steps:
7178
- uses: actions/checkout@master
7279
- name: Setup Python
@@ -103,8 +110,7 @@ jobs:
103110
- name: Install
104111
run: |
105112
(cd ../ && make install-test-dependencies)
106-
(cd ../ && make build)
107-
pip install $(echo dist/replicate-*-py3-none-manylinux1_x86_64.whl)
113+
(cd ../ && make install)
108114
- name: Test
109115
if: ${{ !env.SECRETS_ARE_AVAILABLE }}
110116
run: make test
@@ -114,7 +120,12 @@ jobs:
114120

115121
test-end-to-end:
116122
name: "Test (end to end)"
117-
runs-on: ubuntu-latest
123+
strategy:
124+
fail-fast: false
125+
matrix:
126+
# https://docs.github.com/en/free-pro-team@latest/actions/reference/specifications-for-github-hosted-runners#supported-runners-and-hardware-resources
127+
platform: [ubuntu-20.04, macos-10.15]
128+
runs-on: ${{ matrix.platform }}
118129
defaults:
119130
run:
120131
shell: bash
@@ -163,8 +174,7 @@ jobs:
163174
- name: Install
164175
run: |
165176
(cd ../ && make install-test-dependencies)
166-
(cd ../ && make build)
167-
pip install $(echo ../python/dist/replicate-*-py3-none-manylinux1_x86_64.whl)
177+
(cd ../ && make install)
168178
- name: Test
169179
if: ${{ !env.SECRETS_ARE_AVAILABLE }}
170180
run: make test

Makefile

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,22 @@
11
ENVIRONMENT := development
22

3+
OS := $(shell uname -s)
4+
35
.PHONY: build
46
build: verify-dev-env
57
cd go && $(MAKE) build-all ENVIRONMENT=$(ENVIRONMENT)
68
cd python && $(MAKE) build
79

10+
.PHONY: install
11+
install: build
12+
ifeq ($(OS),Linux)
13+
pip install python/dist/replicate-*-py3-none-manylinux1_x86_64.whl
14+
else ifeq ($(OS),Darwin)
15+
pip install python/dist/replicate-*-py3-none-macosx_*.whl
16+
else
17+
@echo Unknown OS: $(OS)
18+
endif
19+
820
.PHONY: develop
921
develop: verify-dev-env
1022
cd go && $(MAKE) build

0 commit comments

Comments
 (0)