Github action for swift build and test

This commit is contained in:
Adam Fowler 2019-11-27 19:28:31 +00:00 committed by GitHub
parent d47c6c71ee
commit 85daf29646
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 41 additions and 0 deletions

41
.github/workflows/main.yml vendored Normal file
View File

@ -0,0 +1,41 @@
name: Swift
on: [push, pull_request, release]
jobs:
macOS:
runs-on: macOS-latest
steps:
- name: Checkout
uses: actions/checkout@v1
with:
fetch-depth: 1
- name: Build
run: swift build
- name: Test
run: swift test
linux:
runs-on: ubuntu-latest
strategy:
matrix:
tag: ['5.0', '5.1']
container:
image: swift:${{ matrix.tag }}
volumes:
- $GITHUB_WORKSPACE:/src
options: --workdir /src
steps:
- name: Checkout
uses: actions/checkout@v1
with:
fetch-depth: 1
- name: Install dependencies
run: |
apt-get update -qq
apt-get install -q -y tzdata libssl-dev zlib1g-dev
- name: Build
run: swift build
- name: Test
run: swift test