Skip to content

Commit

Permalink
workflow: Enable macOS in CI (#287)
Browse files Browse the repository at this point in the history
Signed-off-by: Yuchen Cheng <rudeigerc@gmail.com>
  • Loading branch information
rudeigerc committed Jun 12, 2022
1 parent 2bc13df commit 35e6e1b
Showing 1 changed file with 26 additions and 3 deletions.
29 changes: 26 additions & 3 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,9 +59,29 @@ jobs:
uses: golangci/golangci-lint-action@v3
with:
version: v1.46.2
setup:
name: setup
runs-on: ubuntu-latest
outputs:
os: ${{ steps.setup.outputs.os }}
steps:
- name: setup
id: setup
run: |
if ${{ github.event_name == 'push' && startsWith(github.ref, 'refs/tags/') }}; then
os='["ubuntu-latest","macos-latest"]'
else
os='["ubuntu-latest"]'
fi
list=$(echo ${os} | jq -c)
echo "::set-output name=os::${list}"
test:
name: test
runs-on: ubuntu-latest
needs: setup
strategy:
matrix:
os: ${{ fromJson(needs.setup.outputs.os) }}
runs-on: ${{ matrix.os }}
env:
GOPATH: ${{ github.workspace }}/go
defaults:
Expand Down Expand Up @@ -103,13 +123,16 @@ jobs:
# parallel: true
build:
name: build
runs-on: ubuntu-latest
needs: setup
strategy:
matrix:
os: ${{ fromJson(needs.setup.outputs.os) }}
runs-on: ${{ matrix.os }}
env:
GOPATH: ${{ github.workspace }}/go
defaults:
run:
working-directory: ${{ env.GOPATH }}/src/github.com/tensorchord/envd

steps:
- name: Check out code
uses: actions/checkout@v2
Expand Down

0 comments on commit 35e6e1b

Please sign in to comment.