Skip to content

update for swift 4.1 #135

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Apr 16, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 28 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,41 @@ matrix:
include:
- os: osx
language: objective-c
osx_image: xcode9.2
osx_image: xcode9.3
before_install:
- export PATH=/usr/local/opt/llvm/bin:"${PATH}"
- brew update
- brew install llvm
- sudo swift utils/make-pkgconfig.swift
script:
- swift test
- os: linux
language: generic
sudo: required
dist: trusty
env:
- LLVM_API_VERSION=6.0
before_install:
- export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig:"${PKG_CONFIG_PATH}"
- wget -O - http://apt.llvm.org/llvm-snapshot.gpg.key | sudo apt-key add -
- sudo apt-add-repository "deb http://apt.llvm.org/trusty/ llvm-toolchain-trusty-${LLVM_API_VERSION} main"
- sudo apt-add-repository -y "ppa:ubuntu-toolchain-r/test"
- sudo apt-get update
- sudo apt-get install -y llvm-${LLVM_API_VERSION} libc++1
- sudo cp /usr/lib/x86_64-linux-gnu/libc++.so.1.0 /usr/lib/
- sudo ln -sf /usr/lib/libc++.so.1.0 /usr/lib/libc++.so
- sudo rm -rf /usr/local/clang-*/bin/llvm-config
- ls -l /usr/bin/llvm-config*
- sudo rm -f /usr/bin/llvm-config
- sudo ln -s /usr/bin/llvm-config-${LLVM_API_VERSION} /usr/bin/llvm-config
- wget -q -O - https://swift.org/keys/all-keys.asc | gpg --import -
- wget https://swift.org/builds/swift-4.1-release/ubuntu1404/swift-4.1-RELEASE/swift-4.1-RELEASE-ubuntu14.04.tar.gz
- tar xzf swift-4.1-RELEASE-ubuntu14.04.tar.gz
- export PATH=${PWD}/swift-4.1-RELEASE-ubuntu14.04/usr/bin:"${PATH}"
- sudo ./swift-4.1-RELEASE-ubuntu14.04/usr/bin/swift utils/make-pkgconfig.swift
script:
- git checkout tags/0.2.3
- swift test
notifications:
slack:
secure: ek/+U+e44bqP8+QCHojy2LhrN9iwY3N/TNNqNG5FZrp09Vidrd5KXWJOXFxlGrpeWdgTpi089YbEdTfxpcDIudUqDqLwPzS7wePiG2cEC1OT6l3yrhI4AvOe7EsNSOX8gzkuEnmrZVHwLLGe7JeR7JIQKoHMZsBcPYDnO8kRP0Ei3zOh47YUn75SE87egAgZOVBDbZYO3GWRa4WX64s8gaQYQ9a7EoUY0oX9rQ48FJs3rmEIhvIXdcOj9bGX7+o0j7l+IFial/Qh+B6bp4XkZU/tUVP6cuNVI1vxE1weVGCBhgt5wLhXTMewzoE5D1IgMZHVuzIBcDbBthSzQRttLSlYar6xTjXtRtOnb8tqZMWfUj3HBYCFYqtz7PGnZ3IflEVsPJW6tgSsoeB6egjzb8APP9mvhm8+zb1jQG1dqXLWErMjWqhlyPVPmHrxU2w/OLWLAJPY94GVmLnSuOw2pSz41spuEY80JcVVzoRbAOQWrwAujq2S3k93yvKpGq4eaT72Mt8g1CyZesByvzcLk99LEJSpqOIxUqXBd4RwHhay/sq8LllyyqY8ORsxEgwQluOAjEhATO/t/HUsu2ndn1k38U1c4HqXW7FDs1hffYEzZ/PGxciCS6Vt1bfST+iq34pzqpanENQCnX6mSR+D+M7mHlCWdsUihmxEcs5knuM=
2 changes: 1 addition & 1 deletion utils/make-pkgconfig.swift
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ func makeFile() throws {
.replacing(charactersIn: .newlines, with: "")
.replacingOccurrences(of: "svn", with: "")
let components = versionStr.components(separatedBy: ".")
.flatMap { Int($0) }
.compactMap { Int($0) }

guard components.count == 3 else {
throw "Invalid version number \(versionStr)"
Expand Down