Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Add new entry in Release_Notes.
[simgrid.git] / .gitlab-ci.yml
index d725437..bbf969b 100644 (file)
@@ -2,69 +2,103 @@ image: simgrid/build-deps
 
 stages:
  - build
- - test
+ - deploy
 
-pages:
-  stage: test
+ctest-debug:
+  stage: build
+  except:
+  - stable
   script:
-  - cmake -Denable_model-checking=OFF -Denable_documentation=ON -Denable_compile_optimizations=OFF -Denable_smpi=OFF -Dpython=ON .
-  - make -j4
-  - pip3 install --requirement docs/requirements.txt
-  - cd docs
-  - LC_ALL=C.UTF-8 ./Build.sh
-  - mv build/html ../public
-  # - The CSS contains a reference to a font or something, not something we gonna fix on our side
-  # - The javasphinx output does not exist in the git, so the "open on GitLab" link is broken.
-  #   I'd like to report this as a bug, but javasphinx seems abandonned upstream.
-  # - public/search.html and public/genindex.html are also generated.
-  - linkchecker --ignore-url='.*\.css$' --ignore-url=public/java/org ../public
-  # From time to time, we should check external links with the
-  # following, but it has a lot of false positive
-  # - linkchecker --ignore-url='.*\.css$' --ignore-url=public/java/org --check-extern ../public
+  - apt-get --allow-releaseinfo-change update
+  - apt install -y binutils xsltproc
+  - cmake -Denable_model-checking=OFF -Denable_documentation=OFF -Denable_coverage=OFF -Denable_compile_optimizations=ON -Denable_smpi=ON -Denable_testsuite_smpi_MPICH3=ON -Denable_testsuite_McMini=ON -Denable_compile_warnings=ON -DLTO_EXTRA_FLAG="auto" .
+  - make -j$(nproc) VERBOSE=1 all tests
+  - ctest -T Test -j$(nproc) --output-on-failure
+  - xsltproc ./tools/jenkins/ctest2junit.xsl Testing/"$( head -n 1 < Testing/TAG )"/Test.xml > CTestResults.xml
   artifacts:
     paths:
-    - public
-  only:
-  - master
+    - lib/
+    reports:
+      junit:
+      - CTestResults.xml
+    expire_in: 1 week
+    when: always
 
-ctest:
+ctest-modelchecking:
   stage: build
   except:
   - stable
   script:
-  - cmake -Denable_model-checking=OFF -Denable_documentation=OFF -Denable_coverage=ON -Denable_java=ON -Denable_lua=OFF -Denable_compile_optimizations=ON -Denable_smpi=ON -Denable_smpi_MPICH3_testsuite=ON -Denable_compile_warnings=ON .
-  - make VERBOSE=1 all tests && ctest --output-on-failure
+  - apt-get --allow-releaseinfo-change update
+  - apt install -y binutils xsltproc clang
+  - cmake -Denable_model-checking=ON -Denable_documentation=OFF -Denable_coverage=OFF -Denable_compile_optimizations=ON -Denable_smpi=ON -Denable_testsuite_smpi_MPICH3=OFF -Denable_testsuite_McMini=OFF -Denable_compile_warnings=ON -DLTO_EXTRA_FLAG="auto" -DCMAKE_C_COMPILER=/usr/bin/clang  -DCMAKE_CXX_COMPILER=/usr/bin/clang++ .
+  - make -j$(nproc) VERBOSE=1 all tests
+  - ctest -T Test -j$(nproc) --output-on-failure
+  - xsltproc ./tools/jenkins/ctest2junit.xsl Testing/"$( head -n 1 < Testing/TAG )"/Test.xml > CTestResults.xml
+  artifacts:
+    paths:
+    - lib/
+    reports:
+      junit:
+      - CTestResults.xml
+    expire_in: 1 week
+    when: always
 
-pip:
-  image: debian:testing
+ctest-distcheck:
   stage: build
-  except:
-  - stable
+  only:
+  - merge_requests
   script:
-  - apt update && apt install -y python3-pip cmake
-  - python3 setup.py sdist
-  - cd dist && tar xfz simgrid*.tar.gz && cd simgrid-*/ && python3 setup.py build
+  - apt-get --allow-releaseinfo-change update
+  - apt install -y binutils
+  - cmake .
+  - make distcheck-configure
 
 release:
   stage: build
   only:
   - stable
   script:
-  - apt update && apt install -y binutils-x86-64-linux-gnu wget unzip zip
-  # Build the linux version of the jarfile without the boost dependency
-  - cmake -Denable_documentation=OFF -Denable_java=ON -Denable_lib_in_jar=ON -Dminimal-bindings=ON -Denable_compile_optimizations=ON -Denable_smpi=OFF .
-  - make VERBOSE=1 dist simgrid simgrid-java_jar
-  # Get the foreign architectures
-  - wget https://ci.appveyor.com/api/projects/mquinson/simgrid/artifacts/simgrid.jar -O simgrid-windows.jar
-  - export SGVER=`printf '#include "simgrid/config.h"\n#if SIMGRID_VERSION_PATCH\nSIMGRID_VERSION_MAJOR.SIMGRID_VERSION_MINOR.SIMGRID_VERSION_PATCH\n#else\nSIMGRID_VERSION_MAJOR.SIMGRID_VERSION_MINOR\n#endif'|gcc -E - -Iinclude|tail -1|sed 's/ //g'`
-  - wget https://ci.inria.fr/simgrid/job/SimGrid/build_mode=Debug,node=osx/lastSuccessfulBuild/artifact/build/SimGrid-${SGVER}/build/simgrid.jar -O simgrid-mac.jar
-  # Open all jar files, and strip them
-  - mkdir content ; cd content
-  - for j in  ../simgrid.jar ../simgrid-windows.jar ../simgrid-mac.jar ; do unzip -n $j ; done
-  - strip NATIVE/*/*/*.so
-  - x86_64-linux-gnu-strip NATIVE/*/*/lib*dll
-  - zip -r ../SimGrid-${SGVER}.jar *
+  - apt-get --allow-releaseinfo-change update
+  - apt install -y binutils wget unzip zip
+  - cmake -Denable_documentation=OFF -Dminimal-bindings=ON -Denable_compile_optimizations=ON -Denable_smpi=OFF -DLTO_EXTRA_FLAG="auto" .
+  - make VERBOSE=1 -j$(nproc) dist
   artifacts:
     paths:
-    - SimGrid-*.jar
-    - SimGrid-*.tar.gz
+    - simgrid-*.tar.gz
+
+pip:
+  image:
+    name: python:3-bullseye
+    entrypoint: ['/bin/bash', '-c', 'ln -snf /bin/bash /bin/sh && /bin/bash -c $0' ]
+  stage: build
+  except:
+  - stable
+  script:
+  - apt-get --allow-releaseinfo-change update
+  - apt install -y python3-pip cmake libboost-dev g++ gcc pybind11-dev
+  - python3 setup.py sdist
+  - cd dist
+  - tar xfz simgrid*.tar.gz
+  - cd simgrid-*/
+  - python3 setup.py build
+
+pages:
+  stage: deploy
+  script:
+  - apt install -y python3-breathe python3-sphinx python3-sphinx-rtd-theme python3-sphinx-copybutton python3-sphinx-tabs
+ # - pip3 install --requirement docs/requirements.txt # Forbidden in Debian:12
+  - cd docs
+  - LC_ALL=C.UTF-8 ./Build.sh
+  - mv build/html ../public
+  # - The CSS contains a reference to a font or something, not something we gonna fix on our side
+# not installed   - linkchecker --ignore-url='.*\.css$' ../public
+  # From time to time, we should check external links with the
+  # following, but it has a lot of false positive
+  # - linkchecker --ignore-url='.*\.css$' --check-extern ../public
+  artifacts:
+    paths:
+    - public
+  only:
+  - master
+  needs: ["ctest-debug"]