Giter Club home page Giter Club logo

multicoretests-ci's Introduction

Multicoretests-CI

This is an OCurrent pipeline that provides CI for the ocaml-multicore/multicoretests repository, which itself intensively tests the consistency of the OCaml multicore compiler runtime. Multicoretests-CI runs the tests on a variety of platforms to ensure coverage of operating systems, architectures, and versions of OCaml.

If you have a fork of ocaml-multicore/multicoretests, you can test it by installing the multicoretests GitHub App on the organisation that owns the fork, and then adding the fork to the list of checked repositories. You must choose the fork explicitly rather than allowing all repositories on the organisation to be checked. You must also request @benmandrew or @mtelvers to add you to the list of alpha-testers.

You can observe the results of the tests on GitHub on the corresponding commit, via Check Runs (shown as an orange circle, a red cross, or a green tick next to the commit).

Platforms

The current platforms are:

  • MacOS, ARM64, OCaml 5.0.0
  • MacOS, ARM64, OCaml 5.1.0~beta1
  • MacOS, ARM64, OCaml 5.2.0+trunk
  • Linux*, ARM64, OCaml 5.0.0
  • Linux*, ARM64, OCaml 5.1.0+trunk
  • Linux*, ARM64, OCaml 5.2.0+trunk
  • Linux*, S390x, OCaml 5.1.0+trunk
  • Linux*, S390x, OCaml 5.2.0+trunk
  • Linux*, PPC64LE, OCaml 5.2.0+trunk

*Specifically Debian 11.

This list can be expanded to other platforms very easily, as specified in conf.ml.

Pipeline

Multicoretests-CI is able to test multiple repositories by the structure of the OCurrent pipeline, which is defined in main.ml. It:

  1. Gets the list of installations of its GitHub app
  2. For each installation, gets the list of repositories to check
  3. For each repository, gets the branches and PRs to check
  4. For each target, it fetches the head commit, generates a Dockerfile and builds it

The generated Dockerfile opam installs the dependencies according to Multicoretests' *.opam files, and then adds the rest of the source files. It then executes dune build && dune runtest -j1 to first completely build the project, and then run the tests sequentially. As the tests are timing- and load-sensitive, these choices serve to avoid disruption.

Installation

Get the code with:

git clone --recursive https://github.com/ocurrent/multicoretests-ci.git
cd multicoretests-ci

Then you need an opam 2.1 switch using OCaml 5.0. Recommend using this command to setup a local switch just for multicoretests-ci.

# Create a local switch with packages and test dependencies installed
opam switch create . 5.0.0 --deps-only --with-test -y
# Run the build
dune build
# Run the tests
dune build @runtest

Deployment

multicoretests-ci is deployed with ocurrent-deployer. It is deployed as a Docker image built from Dockerfile, with the live service following the live branch. An ocurrent-deployer pipeline watches this branch, performing a Docker build and deploy whenever it sees a new commit. The live branch should typically contain commits from main plus potentially short lived commits for testing changes that are later merged into main.

The infrastructure for multicoretests-ci is managed via Ansible. Contact @tmcgilchrist or @mtelvers if you need access or have questions.

Local Development

This document sets you up to use a locally running instance of multicoretests-ci to build a multicoretests fork owned by your GitHub user.

GitHub App

Since multicoretests-ci is a GitHub App, create a GitHub App (settings/apps) under your own user and point it to localhost via a webhook payload delivery service like smee.io.

To do this, follow the instructions in Setting up your development environment to create a GitHub App but when it comes to setting permissions for your app, set the following as the "Repository permissions":

Checks: Read and write
Commit statuses: Read and write
Contents: Read-only
Metadata: Read-only
Pull requests: Read-only

Also, subscribe to the following events:

Create
Pull request
Push

Running the pipeline locally

You will need the following:

  1. The GitHub App ID of the app you created
  2. The pem file containing the private key associated to the app
  3. A comma separated list of GitHub accounts to allow - this could start out as just your GitHub account
  4. A capability file for submitting jobs to a cluster, in this case the main cluster as documented in https://github.com/ocurrent/ocluster#admin
  5. The app webhook secret that is used to authenticate to the app
dune exec -- multicoretests-ci \
  --github-app-id <your-github-app-id> \
  --github-private-key-file <path-to/private-key.pem> \
  --github-account-allowlist <your-github-username> \
  --github-webhook-secret-file <path-to-the-app-secret> \
  --submission-service <path-to-the-submission-capability-file> \
  --capnp-listen-address tcp:127.0.0.1:9001

You should see the site on localhost:8080. You can then install the GitHub App onto your account and add the desired repository, the builds for which should then show up on the website.

multicoretests-ci's People

Contributors

benmandrew avatar mtelvers avatar rikusilvola avatar tmcgilchrist avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.