Skip to content

Commit

Permalink
Add carthage 0.30.1 static framework support (#132)
Browse files Browse the repository at this point in the history
* Fix #131 & Impl. Carthage 0.30.1 Static Support
* Add integration tests to Travis (#133)
* Split CI in Jobs and run tests (#134)
  • Loading branch information
tmspzz authored Jul 30, 2018
1 parent be9d182 commit faed9ce
Show file tree
Hide file tree
Showing 16 changed files with 702 additions and 221 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,9 @@ cabal.sandbox.config
*.hp
*.eventlog
.stack-work/
.vscode/
cabal.project.local
codex.tags
_Dangerfile.tmp
hscope.out
TAGS
TAGS
130 changes: 85 additions & 45 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,50 +1,90 @@
os: osx
language: objective-c
osx_image: xcode9.4

git:
depth: 1

# Use new container infrastructure to enable caching
sudo: false

# Choose a lightweight base image; we provide our own build tools.
language: c

# GHC depends on GMP. You can add other dependencies here as well.
addons:
apt:
packages:
- libgmp-dev

# The different configurations we want to test. You could also do things like
# change flags or use --stack-yaml to point to a different file.
env:
- ARGS="--resolver=lts-11.13"

before_install:
# Update ruby
- rvm use 2.1 --install --binary --fuzzy

# Download and unpack the stack executable
- mkdir -p ~/.local/bin
- export PATH=$HOME/.local/bin:$PATH
- travis_retry curl -L https://www.stackage.org/stack/linux-x86_64 | tar xz --wildcards --strip-components=1 -C ~/.local/bin '*/stack'

# Download and instal hlint
- rake hlint:install[2.0.9]

install:
# Run bundler and install the dependencies in vendor/bundle
# so that it can be cached.
- bundle install --deployment

# This line does all of the work: installs GHC if necessary, build the library,
# executables, and test suites, and runs the test suites. --no-terminal works
# around some quirks in Travis's terminal implementation.
script:
- bundle exec danger
- stack $ARGS setup
- stack $ARGS test --no-terminal --haddock --no-haddock-deps
- stack $ARGS build
- stack $ARGS sdist
- bundle exec pod lib lint

# Caching so the next build will be fast too.
rvm: 2.1

jobs:
include:
- stage: "Build"
name: "Build Rome & Test Dymanic Frameworks"
env:
- ARGS="--resolver=lts-11.13"
before_install:
# Update Homebrew
- brew update
# Run bundler and install the dependencies in vendor/bundle
# so that it can be cached.
- bundle install --deployment
install:
# Install stack
- mkdir -p ~/.local/bin
- export PATH=$HOME/.local/bin:$PATH
- brew install stack

# Download and instal hlint
- rake hlint:install[2.1.8]

# Download and install minio
- test ! -e $HOME/.local/bin/minio && travis_retry wget -O $HOME/.local/bin/minio https://dl.minio.io/server/minio/release/darwin-amd64/minio || echo "Minio already in cache"
- chmod +x $HOME/.local/bin/minio

# Install Carthage
- brew outdated carthage || brew upgrade carthage

# Install bats-core
- brew install bats-core
script:
- bundle exec danger
- stack $ARGS setup
- stack $ARGS test --no-terminal --haddock --no-haddock-deps
- stack $ARGS build
- stack $ARGS sdist
- stack $ARGS install
- travis_wait 30 bats integration-tests/dynamic-frameworks.bats
- stage: "Build"
name: "Build Rome & Test Static Frameworks"
env:
- ARGS="--resolver=lts-11.13"
before_install:
# Update Homebrew
- brew update
# Run bundler and install the dependencies in vendor/bundle
# so that it can be cached.
- bundle install --deployment
install:
# Install stack
- mkdir -p ~/.local/bin
- export PATH=$HOME/.local/bin:$PATH
- brew install stack

# Download and instal hlint
- rake hlint:install[2.1.8]

# Download and install minio
- test ! -e $HOME/.local/bin/minio && travis_retry wget -O $HOME/.local/bin/minio https://dl.minio.io/server/minio/release/darwin-amd64/minio || echo "Minio already in cache"
- chmod +x $HOME/.local/bin/minio

# Install Carthage
- brew outdated carthage || brew upgrade carthage

# Install bats-core
- brew install bats-core
script:
- bundle exec danger
- stack $ARGS setup
- stack $ARGS test --no-terminal --haddock --no-haddock-deps
- stack $ARGS build
- stack $ARGS sdist
- stack $ARGS install
- travis_wait 30 bats integration-tests/static-frameworks.bats

cache:
directories:
- $HOME/.local/bin
- $HOME/.stack
- vendor/bundle
38 changes: 19 additions & 19 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ GEM
minitest (~> 5.1)
thread_safe (~> 0.3, >= 0.3.4)
tzinfo (~> 1.1)
addressable (2.5.1)
public_suffix (~> 2.0, >= 2.0.2)
addressable (2.5.2)
public_suffix (>= 2.0.2, < 4.0)
atomos (0.1.2)
claide (1.0.2)
claide-plugins (0.9.2)
Expand Down Expand Up @@ -48,12 +48,12 @@ GEM
nap (>= 0.8, < 2.0)
netrc (~> 0.11)
cocoapods-try (1.1.0)
coderay (1.1.1)
coderay (1.1.2)
colored2 (3.1.2)
concurrent-ruby (1.0.5)
cork (0.3.0)
colored2 (~> 3.1)
danger (5.3.3)
danger (5.6.2)
claide (~> 1.0)
claide-plugins (>= 0.9.2)
colored2 (~> 3.1)
Expand All @@ -62,50 +62,50 @@ GEM
faraday-http-cache (~> 1.0)
git (~> 1)
kramdown (~> 1.5)
no_proxy_fix
octokit (~> 4.7)
terminal-table (~> 1)
danger-hlint (0.0.3)
danger-hlint (0.0.5)
danger-plugin-api (~> 1.0)
danger-plugin-api (1.0.0)
danger (> 2.0)
escape (0.0.4)
faraday (0.12.1)
faraday (0.15.2)
multipart-post (>= 1.2, < 3)
faraday-http-cache (1.3.1)
faraday (~> 0.8)
fourflusher (2.0.1)
fuzzy_match (2.0.4)
gh_inspector (1.1.3)
git (1.3.0)
git (1.4.0)
i18n (0.9.5)
concurrent-ruby (~> 1.0)
kramdown (1.14.0)
method_source (0.8.2)
kramdown (1.17.0)
method_source (0.9.0)
minitest (5.11.3)
molinillo (0.6.5)
multipart-post (2.0.0)
nanaimo (0.2.5)
nanaimo (0.2.6)
nap (1.1.0)
netrc (0.11.0)
octokit (4.7.0)
no_proxy_fix (0.1.2)
octokit (4.9.0)
sawyer (~> 0.8.0, >= 0.5.3)
open4 (1.3.4)
pry (0.10.4)
pry (0.11.3)
coderay (~> 1.1.0)
method_source (~> 0.8.1)
slop (~> 3.4)
public_suffix (2.0.5)
ruby-macho (1.1.0)
method_source (~> 0.9.0)
public_suffix (3.0.2)
ruby-macho (1.2.0)
sawyer (0.8.1)
addressable (>= 2.3.5, < 2.6)
faraday (~> 0.8, < 1.0)
slop (3.6.0)
terminal-table (1.8.0)
unicode-display_width (~> 1.1, >= 1.1.1)
thread_safe (0.3.6)
tzinfo (1.2.5)
thread_safe (~> 0.1)
unicode-display_width (1.3.0)
unicode-display_width (1.4.0)
xcodeproj (1.5.9)
CFPropertyList (>= 2.3.3, < 4.0)
atomos (~> 0.1.2)
Expand All @@ -123,4 +123,4 @@ DEPENDENCIES
pry

BUNDLED WITH
1.16.1
1.16.2
20 changes: 17 additions & 3 deletions app/Main.hs
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,26 @@ romeVersion = (0, 16, 0, 45)
-- Main
main :: IO ()
main = do
let opts = info (Opts.helper <*> Opts.flag' Nothing (Opts.long "version" <> Opts.help "Prints the version information" <> Opts.hidden ) <|> Just <$> parseRomeOptions) (header "S3 cache tool for Carthage" )
let opts = info
( Opts.helper
<*> Opts.flag'
Nothing
( Opts.long "version"
<> Opts.help "Prints the version information"
<> Opts.hidden
)
<|> Just
<$> parseRomeOptions
)
(header "S3 cache tool for Carthage")
cmd <- execParser opts
case cmd of
Nothing -> putStrLn $ romeVersionToString romeVersion ++ " - Romam uno die non fuisse conditam."
Nothing ->
putStrLn
$ romeVersionToString romeVersion
++ " - Romam uno die non fuisse conditam."
Just romeOptions -> do
p <- runExceptT $ runRomeWithOptions romeOptions romeVersion
case p of
Right _ -> return ()
Left e -> die e
Left e -> die e
Loading

0 comments on commit faed9ce

Please sign in to comment.