All Projects → michaelcontento → Circleci Matrix

michaelcontento / Circleci Matrix

Licence: mit
Small utility to mirror TravisCI's build matrix on CircleCI.

Programming Languages

shell
77523 projects

Projects that are alternatives of or similar to Circleci Matrix

dump-env
A utility tool to create .env files
Stars: ✭ 81 (+1.25%)
Mutual labels:  travis-ci, continuous-integration
LocalSupport
A directory of local support services and volunteer opportunities
Stars: ✭ 60 (-25%)
Mutual labels:  travis-ci, continuous-integration
travis
⛔ ARCHIVED ⛔ Set Up 'Travis' for Testing and Deployment
Stars: ✭ 61 (-23.75%)
Mutual labels:  travis-ci, continuous-integration
noise-php
A starter-kit for your PHP project.
Stars: ✭ 52 (-35%)
Mutual labels:  travis-ci, continuous-integration
Builds Tab
Web extension that adds builds tab to Github
Stars: ✭ 24 (-70%)
Mutual labels:  continuous-integration, travis-ci
koshry
Run on CI, Apply Rules on the Build and Get the Result back to the Pull Request.
Stars: ✭ 59 (-26.25%)
Mutual labels:  travis-ci, continuous-integration
firebase-ci
Simplified Firebase interaction for continuous integration
Stars: ✭ 71 (-11.25%)
Mutual labels:  travis-ci, continuous-integration
plugin.video.sendtokodi
📺 plays various stream sites on kodi using youtube-dl
Stars: ✭ 86 (+7.5%)
Mutual labels:  travis-ci, continuous-integration
Cranium
🤖 A portable, header-only, artificial neural network library written in C99
Stars: ✭ 501 (+526.25%)
Mutual labels:  continuous-integration, travis-ci
drupal9ci
One-line installers for implementing Continuous Integration in Drupal 9
Stars: ✭ 137 (+71.25%)
Mutual labels:  travis-ci, continuous-integration
developer-ci-benefits
Talk docs—includes CI (Continuous Integration) benefits, description, and setup tips 💡💪
Stars: ✭ 29 (-63.75%)
Mutual labels:  travis-ci, continuous-integration
Split tests
Utility to split test files into parallel CI containers
Stars: ✭ 21 (-73.75%)
Mutual labels:  continuous-integration, travis-ci
docker-fastpath
Only Build Your Docker Images Once
Stars: ✭ 52 (-35%)
Mutual labels:  travis-ci, continuous-integration
cpp14-project-template
A simple, cross-platform, and continuously integrated C++14 project template
Stars: ✭ 64 (-20%)
Mutual labels:  travis-ci, continuous-integration
nightly-docker-rebuild
Use nightli.es 🌔 to rebuild N docker 🐋 images 📦 on hub.docker.com
Stars: ✭ 13 (-83.75%)
Mutual labels:  travis-ci, continuous-integration
Clean Marvel Kotlin
This repository contains a detailed sample app that implements Clean architecture and MVP in Kotlin using RxJava2, Retrofit
Stars: ✭ 27 (-66.25%)
Mutual labels:  travis-ci, continuous-integration
travis-ci-tutorial-java
Just to learn how to use travis-ci in a java project!
Stars: ✭ 38 (-52.5%)
Mutual labels:  travis-ci, continuous-integration
continuous-integration-with-python
How to test your python code. How to automatically run your tests for your Python code. How to get reports of the tests coverage
Stars: ✭ 25 (-68.75%)
Mutual labels:  travis-ci, continuous-integration
travis-minikube
Run minikube on Travis CI
Stars: ✭ 89 (+11.25%)
Mutual labels:  travis-ci, continuous-integration
Bors Ng
👁 A merge bot for GitHub Pull Requests
Stars: ✭ 878 (+997.5%)
Mutual labels:  continuous-integration, travis-ci

circleci-matrix

  • TravisCI: Linux Build (Linux & OSX)
  • CircleCI: OSX Build (OSX)

Small utility to mirror TravisCI's build matrix on CircleCI.

Features

  • Simple one file distribution
    • Really! src/circleci-matrix.sh contains everything you need.
  • No special requirements on OSX or Linux
  • Supports parallelism out of the box
  • Using different config files is as simple as --config anotherConfig.yml
  • A rich set of tests ensures that everything will work as expected

Installation

Simply download src/circleci-matrix.sh and make it executable:

curl -fsSL https://git.io/v2Ifs \
    -o /usr/local/bin/circleci-matrix \
    && chmod +x /usr/local/bin/circleci-matrix

NOTE: The ubuntu user used by CircleCI machines has no permissions to write to /use/local/bin! A good alternative is ~/.local/bin!

As a alternative you could paste this into your circle.yml:

dependencies:
    pre:
    # Install circleci-matrix
    - mkdir -p ~/.local/bin
    - curl -fsSL https://git.io/v2Ifs -o ~/.local/bin/circleci-matrix
    - chmod +x ~/.local/bin/circleci-matrix

Or, if you like to have a cleaner circle.yml, use the installer:

dependencies:
    pre:
    - curl -fsSL https://git.io/v2Ifn | bash

Usage

Then add your build matrix to a new file .circleci-matrix.yml, which is the default name. If you wish to use another name you can set it via the command line option --config/-c ($ circleci-matrix --config my-config.yml).

env:
    - VERSION=5.0
    - VERSION=4.2
    - VERSION=4.1
    - VERSION=4.0

command:
    - echo 'hi!'
    - echo "Version is $VERSION"

Now you're ready to execute it with:

$ circleci-matrix
-----------------------------------------------------------------
-- circleci-matrix version: 1.0.0
-- circleci node total: 1
-- circleci node index: 0
-----------------------------------------------------------------

-----------------------------------------------------------------
-- Env: VERSION=5.0
-----------------------------------------------------------------
$ echo 'hi!'
hi!
$ echo "Version is $VERSION"
Version is 5.0

-----------------------------------------------------------------
-- Env: VERSION=4.2
-----------------------------------------------------------------
$ echo 'hi!'
hi!
$ echo "Version is $VERSION"
Version is 4.2

-----------------------------------------------------------------
-- Env: VERSION=4.1
-----------------------------------------------------------------
$ echo 'hi!'
hi!
$ echo "Version is $VERSION"
Version is 4.1

-----------------------------------------------------------------
-- Env: VERSION=4.0
-----------------------------------------------------------------
$ echo 'hi!'
hi!
$ echo "Version is $VERSION"
Version is 4.0

All commands have been executed with the right value in $VERSION.

Parallelism

CircleCI's parallelism is supported out of the box! Have a look at the following example where I set CIRCLE_NODE_TOTAL and CIRCLE_NODE_INDEX manually first to 2 and 0, then to 2 and 1 to simulate two containers:

Container 0:

$ CIRCLE_NODE_TOTAL=2 CIRCLE_NODE_INDEX=0 circle-matrix
-----------------------------------------------------------------
-- circleci-matrix version: 1.0.0
-- circleci node total: 2
-- circleci node index: 0
-----------------------------------------------------------------

-----------------------------------------------------------------
-- Env: VERSION=5.0
-----------------------------------------------------------------
$ echo 'hi!'
hi!
$ echo "Version is $VERSION"
Version is 5.0

-----------------------------------------------------------------
-- Env: VERSION=4.1
-----------------------------------------------------------------
$ echo 'hi!'
hi!
$ echo "Version is $VERSION"
Version is 4.1

Container 1:

$ CIRCLE_NODE_TOTAL=2 CIRCLE_NODE_INDEX=1 circle-matrix
-----------------------------------------------------------------
-- circleci-matrix version: 1.0.0
-- circleci node total: 2
-- circleci node index: 1
-----------------------------------------------------------------

-----------------------------------------------------------------
-- Env: VERSION=4.2
-----------------------------------------------------------------
$ echo 'hi!'
hi!
$ echo "Version is $VERSION"
Version is 4.2

-----------------------------------------------------------------
-- Env: VERSION=4.0
-----------------------------------------------------------------
$ echo 'hi!'
hi!
$ echo "Version is $VERSION"
Version is 4.0

And here is the output when circleci runs our circle.yml file with 3 containers

Container 0 we see VERSION=5.0 and Version=4.0:

-----------------------------------------------------------------
-- circleci-matrix version: 1.0.0
-- circleci node total: 3
-- circleci node index: 0
-----------------------------------------------------------------

-----------------------------------------------------------------
-- Env: VERSION=5.0
-----------------------------------------------------------------
$ echo 'hi!'
hi!
$ echo "Version is $VERSION"
Version is 5.0

-----------------------------------------------------------------
-- Env: VERSION=4.0
-----------------------------------------------------------------
$ echo 'hi!'
hi!
$ echo "Version is $VERSION"
Version is 4.0

Container 1 we see VERSION=4.2:

-----------------------------------------------------------------
-- circleci-matrix version: 1.0.0
-- circleci node total: 3
-- circleci node index: 1
-----------------------------------------------------------------

-----------------------------------------------------------------
-- Env: VERSION=4.2
-----------------------------------------------------------------
$ echo 'hi!'
hi!
$ echo "Version is $VERSION"
Version is 4.2

Container 2 we see VERSION=4.1:

-----------------------------------------------------------------
-- circleci-matrix version: 1.0.0
-- circleci node total: 3
-- circleci node index: 2
-----------------------------------------------------------------

-----------------------------------------------------------------
-- Env: VERSION=4.1
-----------------------------------------------------------------
$ echo 'hi!'
hi!
$ echo "Version is $VERSION"
Version is 4.1

License

The MIT License (MIT)

Copyright (c) 2015 Michael Contento

Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
the Software without restriction, including without limitation the rights to
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
the Software, and to permit persons to whom the Software is furnished to do so,
subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].