Skip to content

Commit

Permalink
[CI] Run tests on Swift 5.5 (#49)
Browse files Browse the repository at this point in the history
Add Windows CI

Fix \r\n from Windows
  • Loading branch information
dduan authored May 10, 2022
1 parent 3806360 commit dc5183e
Show file tree
Hide file tree
Showing 11 changed files with 305 additions and 306 deletions.
11 changes: 2 additions & 9 deletions .github/workflows/amazon-linux-2.yml
Original file line number Diff line number Diff line change
@@ -1,19 +1,12 @@
name: Amazon Linux 2

on: [push, pull_request]
on: [push]

jobs:
linux:
name: Amazon Linux 2
runs-on: ubuntu-latest
strategy:
matrix:
swift:
- 5.3
- 5.3.1
distro:
- amazonlinux2
steps:
- uses: actions/checkout@v2
- name: Test
run: Scripts/docker.sh TOMLDecoder 'swift test -Xswiftc -warnings-as-errors --enable-test-discovery' ${{ matrix.swift }} ${{ matrix.distro }}
run: Scripts/docker.sh TOMLDecoder 'swift test -Xswiftc -warnings-as-errors --enable-test-discovery' 5.5.3 amazonlinux2
19 changes: 0 additions & 19 deletions .github/workflows/centos-8.yml

This file was deleted.

21 changes: 0 additions & 21 deletions .github/workflows/macos-11.15.yml

This file was deleted.

14 changes: 14 additions & 0 deletions .github/workflows/macos.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
name: macOS

on: [push]

jobs:
macos:
name: macOS
runs-on: macos-latest
steps:
- uses: actions/checkout@v2
- name: Xcode version
run: sudo xcode-select -s /Applications/Xcode_13.2.app
- name: Test
run: make test-SwiftPM
11 changes: 2 additions & 9 deletions .github/workflows/ubuntu-bionic.yml
Original file line number Diff line number Diff line change
@@ -1,19 +1,12 @@
name: Ubuntu Bionic

on: [push, pull_request]
on: [push]

jobs:
linux:
name: Ubuntu Bionic
runs-on: ubuntu-latest
strategy:
matrix:
swift:
- 5.3
- 5.3.1
distro:
- bionic
steps:
- uses: actions/checkout@v2
- name: Test
run: Scripts/docker.sh TOMLDecoder 'swift test -Xswiftc -warnings-as-errors --enable-test-discovery' ${{ matrix.swift }} ${{ matrix.distro }}
run: Scripts/docker.sh TOMLDecoder 'swift test -Xswiftc -warnings-as-errors --enable-test-discovery' 5.5.3 bionic
11 changes: 2 additions & 9 deletions .github/workflows/ubuntu-focal.yml
Original file line number Diff line number Diff line change
@@ -1,19 +1,12 @@
name: Ubuntu Focal

on: [push, pull_request]
on: [push]

jobs:
linux:
name: Ubuntu Focal
runs-on: ubuntu-latest
strategy:
matrix:
swift:
- 5.3
- 5.3.1
distro:
- focal
steps:
- uses: actions/checkout@v2
- name: Test
run: Scripts/docker.sh TOMLDecoder 'swift test -Xswiftc -warnings-as-errors --enable-test-discovery' ${{ matrix.swift }} ${{ matrix.distro }}
run: Scripts/docker.sh TOMLDecoder 'swift test -Xswiftc -warnings-as-errors --enable-test-discovery' 5.5.3 focal
21 changes: 21 additions & 0 deletions .github/workflows/windows.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: Windows 2019

on: [push]

jobs:
Windows:
name: Windows
runs-on: windows-2019
steps:
- name: Check out
uses: actions/checkout@v2
- name: Install Swift
uses: compnerd/gha-setup-swift@cf2a61060c146203ea6fe10cce367979ae4ec0b1
with:
branch: swift-5.5.3-release
tag: 5.5.3-RELEASE
- name: Test
shell: cmd
run: |
echo on
swift test -Xswiftc -warnings-as-errors
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@ build:
@swift build -c release -Xswiftc -warnings-as-errors > /dev/null

test-SwiftPM:
@swift test -Xswiftc -warnings-as-errors --enable-test-discovery
@swift test -Xswiftc -warnings-as-errors

test-docker:
@Scripts/docker.sh TOMLDecoder 'swift test -Xswiftc -warnings-as-errors --enable-test-discovery' 5.3.1 focal
@Scripts/docker.sh TOMLDecoder 'swift test -Xswiftc -warnings-as-errors --enable-test-discovery' 5.5.3 focal

benchmark:
@cd Benchmarks; swift run -c release
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
# TOMLDecoder

| Swift 5.3 & 5.3.1 |
|-|
|[![Amazon Linux 2](https://github.com/dduan/TOMLDecoder/workflows/Amazon%20Linux%202/badge.svg)](https://github.com/dduan/TOMLDecoder/actions?query=workflow%3A%22Amazon+Linux+2%22)|
|[![CentOS 8](https://github.com/dduan/TOMLDecoder/workflows/CentOS%208/badge.svg)](https://github.com/dduan/TOMLDecoder/actions?query=workflow%3A%22CentOS+8%22)|
|[![macOS 11.15](https://github.com/dduan/TOMLDecoder/workflows/macOS%2011.15/badge.svg)](https://github.com/dduan/TOMLDecoder/actions?query=workflow%3A%22macOS+11.15%22)|
|[![CentOS 7](https://github.com/dduan/TOMLDecoder/workflows/CentOS%207/badge.svg)](https://github.com/dduan/TOMLDecoder/actions?query=workflow%3A%22CentOS+7%22)|
|[![macOS](https://github.com/dduan/TOMLDecoder/workflows/macOS/badge.svg)](https://github.com/dduan/TOMLDecoder/actions?query=workflow%3A%22macOS%22)|
|[![Ubuntu Bionic](https://github.com/dduan/TOMLDecoder/workflows/Ubuntu%20Bionic/badge.svg)](https://github.com/dduan/TOMLDecoder/actions?query=workflow%3A%22Ubuntu+Bionic%22)|
|[![Ubuntu Focal](https://github.com/dduan/TOMLDecoder/workflows/Ubuntu%20Focal/badge.svg)](https://github.com/dduan/TOMLDecoder/actions?query=workflow%3A%22Ubuntu+Focal%22)|
|[![Windows](https://github.com/dduan/TOMLDecoder/workflows/Windows/badge.svg)](https://github.com/dduan/TOMLDecoder/actions?query=workflow%3A%22Windows%22)|


TOML parser for your Swift `Codable`s.
Expand Down
Loading

0 comments on commit dc5183e

Please sign in to comment.