Skip to content
Snippets Groups Projects
Commit 781a112a authored by Millian Poquet's avatar Millian Poquet
Browse files

ci: nix job

parent cd476291
No related branches found
No related tags found
No related merge requests found
#image: oarteam/batsim_ci:latest
variables:
GIT_SUBMODULE_STRATEGY: none
stages:
- unique_stage
###############################################################################
# Build and test
###############################################################################
debian:
stage: unique_stage
image: debian:unstable-slim
# we could cache dependencies installation in our own Dockerfile
# dependencies installation could be cached in a container we maintain somewhere (e.g., dockerhub)
script:
# Get various dependencies
- apt update -y
- apt install -y g++ libsimgrid-dev libzmq3-dev libprotobuf-dev protobuf-compiler libgtest-dev meson ninja-build pkg-config python3 python3-pip
# Build protocol (c++)
- (cd protocol && meson setup build --prefix=/usr && ninja -C build && meson install -C build)
......@@ -37,3 +33,17 @@ debian:
- test/simulator-cpp-client.sh
# Run integration tests (simgrid simulator VS python client)
- test/simulator-py-client.sh
nix:
stage: unique_stage
image: oarteam/batsim_ci:latest
# this is just a NixOS with the needed tools to be run by a GitLab CI runner
# defined there: https://framagit.org/batsim/batsim/-/blob/90bbff66007469255d2c082511b72f1e1efca3b8/env/docker/default.nix
script:
# Packages can be built explicitly if desired
- nix-build . -A protocol-cpp
# Any dependency will also be built, for example the following command also builds protocol-python
- nix-build . -A client-py
# Therefore one can just run its desired leaf of the build tree, such as:
- nix-shell . -A integration_shell_cpp --command './test/simulator-cpp-client.sh'
- nix-shell . -A integration_shell_py --command './test/simulator-py-client.sh'
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment