Skip to content
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

CI: add .circleci/config.yml #7239

Merged
merged 2 commits into from Jun 11, 2021
Merged

CI: add .circleci/config.yml #7239

merged 2 commits into from Jun 11, 2021

Conversation

bagder
Copy link
Member

@bagder bagder commented Jun 11, 2021

First take

@bagder bagder added the CI Continuous Integration label Jun 11, 2021
@bagder

This comment has been minimized.

@zmarkan
Copy link

zmarkan commented Jun 11, 2021

We got the basic build working here - https://app.circleci.com/pipelines/github/zmarkan/curl/5/workflows/19000ec0-2f9e-4122-bc5a-b4143420213e/jobs/5

Still tweaking and optimising some things but in a nutshell this is a start ;)

@gmemstr
Copy link

gmemstr commented Jun 11, 2021

Snagging the config from the POC for better visibility - as Zan said, still some tweaks and optimisations to apply.

# Use the latest 2.1 version of CircleCI pipeline process engine. See: https://circleci.com/docs/2.0/configuration-reference
version: 2.1

commands:
  configure:
    steps:
      - run: 
          command: |
            ./buildconf
            ./configure --enable-warnings --enable-werror --with-openssl

  build:
    steps:
      - run: make

  test:
    steps:
      - run: make test-nonflaky

executors:
  ubuntu:
    machine:
      image: ubuntu-2004:202010-01

jobs:
  basic:
    executor: ubuntu
    steps:
      - checkout
      - configure
      - build
      - test

workflows:
  all:
    jobs:
      - basic

@bagder
Copy link
Member Author

bagder commented Jun 11, 2021

Nice, thanks! This is great start.

And if we want to limit these to only run for PRs and for the master branch?

bagder added a commit that referenced this pull request Jun 11, 2021
Assisted-by: Gabriel Simmer

Closes #7239
@bagder

This comment has been minimized.

bagder added a commit that referenced this pull request Jun 11, 2021
Assisted-by: Gabriel Simmer

Closes #7239
@zmarkan
Copy link

zmarkan commented Jun 11, 2021

@bagder these checks indicators should show up for every single job and workflow combination - more jobs being run -> more checks

@bagder
Copy link
Member Author

bagder commented Jun 11, 2021

thanks, I figured it out just after I asked. Sorry for the noise.

@zmarkan
Copy link

zmarkan commented Jun 11, 2021

We also did some more hackery and managed to split the tests for a bit of a performance improvement - https://app.circleci.com/pipelines/github/zmarkan/curl/13/workflows/1d972043-a268-4101-9ed3-c30bb1c04b6d/jobs/19/steps

Relevant config:

# Use the latest 2.1 version of CircleCI pipeline process engine. See: https://circleci.com/docs/2.0/configuration-reference
version: 2.1

commands:
  configure:
    steps:
      - run: 
          command: |
            ./buildconf
            ./configure --enable-warnings --enable-werror --with-openssl

  build:
    steps:
      - run: make

  test:
    steps:
      - run: 
          command: TFLAGS="-l" make test-nonflaky  | pcregrep -o1 "test (\d+)\.\.\." | circleci tests split > tests.txt
          name: split tests
      - run:
          command: TFLAGS="$(cat tests.txt | tr '\n' ' ')" make test-nonflaky
    
executors:
  ubuntu:
    machine:
      image: ubuntu-2004:202010-01
  docker:
    docker:
      - image: cimg/base:2021.05

jobs:
  basic:
    executor: ubuntu
    steps:
      - checkout
      - configure
      - build
      - test
    parallelism: 5

  basic-docker:
    executor: docker
    steps:
      - checkout
      - run: 
          command: | 
            sudo apt-get update
            sudo apt-get install libtool autoconf automake pkg-config libssl-dev pcregrep
          name: install prereqs
      - configure
      - build
      - test
    parallelism: 5



workflows:
  all:
    jobs:
      - basic
      - basic-docker

(note that basic job doesn't run atm because of missing pcregrep but the basic-docker does.

Assisted-by: Gabriel Simmer

Closes #7239
We do it on circle CI instead
@bagder bagder force-pushed the circleci-project-setup branch 2 times, most recently from 0a86f2f to 53c26de Compare June 11, 2021 14:50
@bagder bagder marked this pull request as ready for review June 11, 2021 14:50
@bagder
Copy link
Member Author

bagder commented Jun 11, 2021

Let's merge this simple two-job config as a start. It only removes a single job from travis, but we should be able to add more. Assistance in doing this will be appreciated!

@jerdog
Copy link

jerdog commented Jun 11, 2021

Sounds good @bagder - feel free to join our Discord at https://discord.gg/eppPRyBn which is a good place to interact directly with some of our engineers and DevRel team.

@bagder bagder closed this in 45c5d9d Jun 11, 2021
@bagder bagder merged commit 53c26de into master Jun 11, 2021
@bagder bagder deleted the circleci-project-setup branch June 11, 2021 21:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CI Continuous Integration
Development

Successfully merging this pull request may close these issues.

None yet

4 participants