{"id":22796479,"url":"https://github.com/macmade/xcode-coveralls","last_synced_at":"2025-04-19T13:13:21.571Z","repository":{"id":26005219,"uuid":"29447763","full_name":"macmade/xcode-coveralls","owner":"macmade","description":"coveralls.io support for Xcode","archived":false,"fork":false,"pushed_at":"2021-08-02T22:49:42.000Z","size":3871,"stargazers_count":22,"open_issues_count":4,"forks_count":3,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-03-29T08:11:20.827Z","etag":null,"topics":["code-coverage","coverage-data","coverage-report","coverage-testing","coveralls","gcov","xcode"],"latest_commit_sha":null,"homepage":"http://macmade.github.io/xcode-coveralls","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/macmade.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-01-19T01:17:52.000Z","updated_at":"2021-08-02T22:49:46.000Z","dependencies_parsed_at":"2022-09-09T09:30:31.541Z","dependency_job_id":null,"html_url":"https://github.com/macmade/xcode-coveralls","commit_stats":null,"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/macmade%2Fxcode-coveralls","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/macmade%2Fxcode-coveralls/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/macmade%2Fxcode-coveralls/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/macmade%2Fxcode-coveralls/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/macmade","download_url":"https://codeload.github.com/macmade/xcode-coveralls/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249701663,"owners_count":21312757,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["code-coverage","coverage-data","coverage-report","coverage-testing","coveralls","gcov","xcode"],"created_at":"2024-12-12T05:13:07.240Z","updated_at":"2025-04-19T13:13:21.546Z","avatar_url":"https://github.com/macmade.png","language":"C","funding_links":["https://patreon.com/macmade","https://paypal.me/xslabs"],"categories":[],"sub_categories":[],"readme":"xcode-coveralls\n===============\n\n[![Build Status](https://img.shields.io/travis/macmade/xcode-coveralls.svg?branch=master\u0026style=flat)](https://travis-ci.org/macmade/xcode-coveralls)\n[![Coverage Status](https://img.shields.io/coveralls/macmade/xcode-coveralls.svg?branch=master\u0026style=flat)](https://coveralls.io/r/macmade/xcode-coveralls)\n[![Issues](http://img.shields.io/github/issues/macmade/xcode-coveralls.svg?style=flat)](https://github.com/macmade/xcode-coveralls/issues)\n![Status](https://img.shields.io/badge/status-active-brightgreen.svg?style=flat)\n![License](https://img.shields.io/badge/license-mit-brightgreen.svg?style=flat)\n[![Contact](https://img.shields.io/badge/contact-@macmade-blue.svg?style=flat)](https://twitter.com/macmade)  \n[![Donate-Patreon](https://img.shields.io/badge/donate-patreon-yellow.svg?style=flat)](https://patreon.com/macmade)\n[![Donate-Gratipay](https://img.shields.io/badge/donate-gratipay-yellow.svg?style=flat)](https://www.gratipay.com/macmade)\n[![Donate-Paypal](https://img.shields.io/badge/donate-paypal-yellow.svg?style=flat)](https://paypal.me/xslabs)\n\nAbout\n-----\n\n`xcode-coveralls` is a command line helper tool to upload code coverage data from Xcode projects to [coveralls.io](https://coveralls.io).\n\nTable of Contents\n-----------------\n\n  1. [Usage](#1)\n  2. [Project Configuration](#2)\n  3. [Command Options](#3)\n  4. [Installing](#4)\n  8. [License](#5)\n  9. [Repository Infos](#6)\n\n\u003ca name=\"1\"\u003e\u003c/a\u003e\nUsage\n-----\n\nThe `xcode-coveralls` command needs to be invoked from your **repository/project root directory**.  \nNote that if your Xcode project file is in a sub directory, you'll need to specify its path with the `--project` option.\n\nIf you don't use [Travis CI](http://travis-ci.org), you may also specify a service name and job ID with the `--service` and `--id` options. \nBuilds on [Travis CI](http://travis-ci.org) will automatically detect those values.   \nYou may also use the `--token` option, if you're not using a service compatible with [coveralls.io](https://coveralls.io).\n\nYou may also include/exclude specific paths from your sources with the `--include` and `--exclude` options.  \nThose paths may be full paths or paths relative to the repository/project root directory.\n\nThe only mandatory argument is the Xcode build directory, containing the `.gcda` and `.gcno` files to process.  \nPlease read the following section to learn how to generate those files with Xcode.\n\n\u003ca name=\"2\"\u003e\u003c/a\u003e\nProject Configuration\n---------------------\n\nIn order to use `xcode-coveralls`, your Xcode targets needs to be configured to produce code coverage data files.\n\nThis can be done from a target's build settings.  \nTwo options needs to be activated:\n\n - **Generate Test Coverage Files** (`GCC_GENERATE_TEST_COVERAGE_FILES`)\n - **Instrument Program Flow** (`GCC_INSTRUMENT_PROGRAM_FLOW_ARCS`)\n\nAlthough the options are prefixed with `GCC`, they are completely compatible with Clang/LLVM.\n\nNote that turning those options on will reduce the compilation time, so you might create a specific build configuration for this, and enable it for your unit tests only.\n\n### Build Directory\n\nThe `xcode-coveralls` command needs to be invoked with the Xcode build directory, usually in `~/Library/Developer/Xcode/DerivedData/`.\n\nThe best way to get this directory is to add a **Run Script** phase in the target for which you want coverage reports:\n\n    export | egrep '(BUILT_PRODUCTS_DIR)|(CURRENT_ARCH)|(OBJECT_FILE_DIR_normal)|(SRCROOT)|(OBJROOT)' \u003e xcenv.sh\n\nThis will create an `xcenv.sh` file with the necessary environment variables to find the Xcode build directory.  \nIf using an version control system, you may ignore this specific file.\n\nYou may then use this variables in a shell script, in order to invoke `xcode-coveralls`:\n\n    #!/bin/bash\n    \n    source xcenv.sh\n    declare -r DIR_BUILD=\"${OBJECT_FILE_DIR_normal}/${CURRENT_ARCH}/\"\n    xcode-coveralls \"${DIR_BUILD}\"\n\n\u003ca name=\"3\"\u003e\u003c/a\u003e\nCommand Options\n---------------\n\n    Usage: xcode-coveralls [OPTIONS] BUILD_DIRECTORY [BUILD_DIRECTORY ...]\n    \n    Options:\n        \n        --help       Shows this help dialog\n        --version    Prints the version number\n        --verbose    Turns on extra logging\n        --gcov       Path or command for invoking the gcov utility\n                     (defaults to /usr/bin/gcov)\n        --include    Paths to include from the sources\n        --exclude    Paths to exclude from the sources\n        --project    Path to the Xcode project file, if not at the directory root\n        --service    The service name to use\n                     (defaults to 'travis-ci')\n        --id         The service job ID\n                     (if not specified, defaults to the 'TRAVIS_JOB_ID' environment variable, or zero)\n        --token      The repository token (optional)\n        --dry-run    Do not actually send data to coveralls.io\n\n\u003ca name=\"4\"\u003e\u003c/a\u003e\nInstalling\n----------\n\n### Installing with Homebrew\n\n`xcode-coveralls` may be installed with [Homebrew](http://brew.sh):\n\n    brew install macmade/tap/xcode-coveralls\n\n### Manual installation\n\n`xcode-coveralls` may be installed manually by cloning its [GitHub repository](https://github.com/macmade/xcode-coveralls) and running `xcodebuild` or `xctool`.\n\nThe default location is `/usr/local/bin`.\n\nHere's an example with `xcodebuild`:\n    \n    git clone https://github.com/macmade/xcode-coveralls.git /tmp/xcode-coveralls\n    xcodebuild -project /tmp/xcode-coveralls/xcode-coveralls.xcodeproj -scheme xcode-coveralls DSTROOT=/ SYMROOT=build install\n\nAnd here's an example with `xctool`:\n\n    git clone https://github.com/macmade/xcode-coveralls.git /tmp/xcode-coveralls\n    sudo xctool --project /tmp/xcode-coveralls/xcode-coveralls.xcodeproj --scheme xcode-coveralls DSTROOT=/ install\n    \nNote that you can use this on Travis builds (for instance in `before_install`) in order to get coverage reports for your project.\n\n\u003ca name=\"5\"\u003e\u003c/a\u003e\nLicense\n-------\n\nxcode-coveralls is released under the terms of the MIT License.\n\n\u003ca name=\"6\"\u003e\u003c/a\u003e\nRepository Infos\n----------------\n\n    Owner:\t\t\tJean-David Gadina - XS-Labs\n    Web:\t\t\twww.xs-labs.com\n    Blog:\t\t\twww.noxeos.com\n    Twitter:\t\t@macmade\n    GitHub:\t\t\tgithub.com/macmade\n    LinkedIn:\t\tch.linkedin.com/in/macmade/\n    StackOverflow:\tstackoverflow.com/users/182676/macmade\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmacmade%2Fxcode-coveralls","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmacmade%2Fxcode-coveralls","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmacmade%2Fxcode-coveralls/lists"}