Skip to content

Commit

Permalink
Merge pull request #28 from YOCKOW/development
Browse files Browse the repository at this point in the history
Confirm compatibility with Swift 5.3
  • Loading branch information
YOCKOW committed Sep 21, 2020
2 parents 7ed1f1c + bc46393 commit a8ac561
Showing 1 changed file with 25 additions and 19 deletions.
44 changes: 25 additions & 19 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,15 @@ on:
push:
branches:
- '**'
tags:
- '!**'
pull_request:
branches:
tags-ignore:
- '**'
paths:
- '**/*.swift'
- '.github/workflows/*.yml'
pull_request:
paths:
- '**/*.swift'
- '.github/workflows/*.yml'
jobs:
test:
strategy:
Expand All @@ -26,32 +30,34 @@ jobs:
uses: actions/cache@v1
with:
path: .build
key: build-${{ github.workspace }}-${{ runner.os }}-${{ matrix.swift-compat-ver }}-${{ hashFiles('Package.*') }}-${{ hashFiles('Sources/**/*.swift') }}
key: build-${{ github.workspace }}-${{ runner.os }}-${{ matrix.swift-compat-ver }}-${{ hashFiles('**/*.swift') }}
restore-keys: |
build-${{ github.workspace }}-${{ runner.os }}-${{ matrix.swift-compat-ver }}-${{ hashFiles('Package.*') }}-
build-${{ github.workspace }}-${{ runner.os }}-${{ matrix.swift-compat-ver }}-
build-${{ github.workspace }}-${{ runner.os }}-
build-${{ github.workspace }}-
- uses: YOCKOW/Action-setup-swift@master
with:
swift-version: '5.2'
swift-version: '5.3'

- name: Try to build products with debug mode.
run: |
swift build --configuration debug -Xswiftc -swift-version -Xswiftc ${{ matrix.swift-compat-ver }}
if [ $? != 0 ]; then
echo "Failed to build products with debug mode."
rm -rf $(cd .build/debug && pwd -P)
fi
run: swift build --configuration debug -Xswiftc -swift-version -Xswiftc ${{ matrix.swift-compat-ver }}
continue-on-error: true
- name: Clean debug build directory if necessary
if: failure()
run: rm -rf $(cd .build/debug && pwd -P)
- name: Check XCTestManifests.swift
if: runner.os == 'macOS'
run: |
swift test --generate-linuxmain -Xswiftc -swift-version -Xswiftc ${{ matrix.swift-compat-ver }}
git diff --exit-code
- name: Test with debug mode.
run: swift test --configuration debug -Xswiftc -swift-version -Xswiftc ${{ matrix.swift-compat-ver }}

- name: Try to build products with release mode.
run: |
swift build --configuration release -Xswiftc -enable-testing -Xswiftc -swift-version -Xswiftc ${{ matrix.swift-compat-ver }}
if [ $? != 0 ]; then
echo "Failed to build products with release mode."
rm -rf $(cd .build/release && pwd -P)
fi
run: swift build --configuration release -Xswiftc -enable-testing -Xswiftc -swift-version -Xswiftc ${{ matrix.swift-compat-ver }}
continue-on-error: true
- name: Clean release build directory if necessary
if: failure()
run: rm -rf $(cd .build/release && pwd -P)
- name: Test with release mode.
run: swift test --configuration release -Xswiftc -enable-testing -Xswiftc -swift-version -Xswiftc ${{ matrix.swift-compat-ver }}

0 comments on commit a8ac561

Please sign in to comment.