Added ci workflows

This commit is contained in:
2023-03-15 14:05:24 -04:00
parent 0c8f8ff61f
commit bca44ff133
6 changed files with 86 additions and 119 deletions

34
.github/workflows/ci.yml vendored Normal file
View File

@@ -0,0 +1,34 @@
name: CI
on:
push:
pull_request:
workflow_dispatch:
jobs:
mac:
name: macOS
runs-on: macos-12
strategy:
matrix:
xcode: ['13.3', '14.2']
config: ['debug', 'release']
steps:
- uses: actions/checkout@v3
- name: Select Xcode ${{ matrix.xcode }}
run: sudo xcode-select -s /Applications/Xcode_${{ matrix.xcode }}.app
- name: Swift Version
run: swift --version
- name: Run ${{ matrix.xcode }} Tests
run: make CONFIG=${{ matrix.config }} test-library
ubuntu:
name: Ubuntu
runs-on: ubuntu-20.04
steps:
- uses: swift-actions/setup-swift@v1
with:
swift-version: 5.7
- uses: actions/checkout@v3
- name: Run Tests
run: make DOCKER_PLATFORM=linux/amd64 test-linux

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

@@ -0,0 +1,41 @@
# Build and deploy DocC to GitHub pages. Based off of @karwa's work here:
# https://github.com/karwa/swift-urlblob/main/.github/workflows/docs.yml
name: Documentation
on:
release:
types:
- published
push:
branches:
- main
workflow_dispatch:
concurrency:
group: docs-${{ github.ref }}
cancel-in-progress: true
# Sets permissions to allow deployment to Github Pages
permissions:
contents: read
pages: write
id-token: write
jobs:
deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: macos-12
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Build DocC
run: make build-documentation
- name: Upload artifact
uses: actions/upload-pages-artifact@v1
with:
path: 'docs'
- name: Deploy to Github Pages
id: deployment
uses: actions/deploy-pages@v1