From 09b658558a96ffff381a5c91df8845e4efc88742 Mon Sep 17 00:00:00 2001 From: Allan Blanchard <allan.blanchard@cea.fr> Date: Wed, 4 May 2022 14:22:29 +0200 Subject: [PATCH] [ci] renaming of scripts --- .gitlab-ci.yml | 158 ++++------------------------- ci.sh => nix/external-plugin-ci.sh | 4 +- nix/frama-ci.sh | 12 --- 3 files changed, 22 insertions(+), 152 deletions(-) rename ci.sh => nix/external-plugin-ci.sh (96%) delete mode 100755 nix/frama-ci.sh diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 4e4f2628c8a..08f940d375c 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -45,34 +45,41 @@ lint: tags: - nix +# build-distrib-tarball: +# stage: build +# script: +# - +# tags: +# - nix + ################################################################################ ### TESTS acsl-importer: stage: tests script: - - ./ci.sh ACSL-importer + - ./nix/external-plugin-ci.sh ACSL-importer tags: - nix caveat-importer: stage: tests script: - - ./ci.sh Caveat-importer + - ./nix/external-plugin-ci.sh Caveat-importer tags: - nix cfp: stage: tests script: - - ./ci.sh context-from-precondition + - ./nix/external-plugin-ci.sh context-from-precondition tags: - nix genassigns: stage: tests script: - - ./ci.sh genassigns + - ./nix/external-plugin-ci.sh genassigns tags: - nix @@ -100,14 +107,14 @@ kernel-tests: metacsl: stage: tests script: - - ./ci.sh meta + - ./nix/external-plugin-ci.sh meta tags: - nix mthread: stage: tests script: - - ./ci.sh mthread + - ./nix/external-plugin-ci.sh mthread tags: - nix @@ -121,14 +128,14 @@ plugins-tests: security: stage: tests script: - - ./ci.sh security + - ./nix/external-plugin-ci.sh security tags: - nix volatile: stage: tests script: - - ./ci.sh Volatile + - ./nix/external-plugin-ci.sh Volatile tags: - nix @@ -139,7 +146,6 @@ wp-tests: tags: - nix - ################################################################################ ### DISTRIB @@ -186,104 +192,18 @@ manuals: # TODO: restore doc companions ################################################################################ ### PUBLIC -# wp-qualif: -# stage: tests -# script: -# - nix/frama-ci.sh build -A frama-c.wp-qualif -# tags: -# - nix -# allow_failure: true - -# aorai-prove: -# stage: tests -# script: -# - nix/frama-ci.sh build -A frama-c.aorai-prove -# tags: -# - nix -# allow_failure: true - -# genassigns: -# stage: tests -# script: -# - nix/frama-ci.sh build -A genassigns.tests -# tags: -# - nix - -# frama-clang: -# stage: tests -# script: -# - nix/frama-ci.sh build -A frama-clang.tests -# tags: -# - nix - -# counter-examples: -# stage: tests -# script: -# - nix/frama-ci.sh build -A counter-examples.tests -# tags: -# - nix - -# acsl-importer: -# stage: tests -# script: -# - nix/frama-ci.sh build -A acsl-importer.tests -# tags: -# - nix - -# volatile: -# stage: tests -# script: -# - nix/frama-ci.sh build -A volatile.tests -# tags: -# - nix - -# metacsl: -# stage: tests -# script: -# - nix/frama-ci.sh build -A meta.tests -# tags: -# - nix - -# Security: -# stage: tests -# script: -# - nix/frama-ci.sh build -A security.tests -# tags: -# - nix - -# CFP: -# stage: tests -# script: -# - nix/frama-ci.sh build -A context-from-precondition.tests -# tags: -# - nix - -# eva-tests: -# stage: tests -# script: -# - nix/frama-ci.sh build -A frama-c.eva-tests -# tags: -# - nix -# allow_failure: true - -# build-distrib-tarball: -# stage: build -# script: -# - nix/frama-ci.sh build -A frama-c.build-distrib-tarball -# tags: -# - nix # build-from-distrib-tarball: # stage: tests # script: -# - nix/frama-ci.sh build -A frama-c.build-from-distrib-tarball +# - # tags: # - nix # doc: # stage: tests # script: -# - nix/frama-ci.sh build -A frama-c.doc +# - # tags: # - nix # allow_failure: true @@ -296,56 +216,16 @@ manuals: # TODO: restore doc companions # internal: # <<: *internal_template # script: -# - nix/frama-ci.sh build -A frama-c.internal +# - # when: manual # internal_nightly: # <<: *internal_template # script: -# - nix/frama-ci.sh build -A frama-c.internal +# - # only: # - schedules -# .build_template: &frama-c-ocaml -# stage: distrib_and_compatibility -# script: -# - nix/frama-ci.sh build -A frama-c.tests -# tags: -# - nix - -# frama-c-ocaml-4.13: -# variables: -# OCAML: "4_13" -# <<: *frama-c-ocaml - -# caveat-importer: -# stage: tests -# script: -# - nix/frama-ci.sh build -A caveat-importer.tests -# tags: -# - nix - -# mthread: -# stage: tests -# script: -# - nix/frama-ci.sh build -A mthread.tests -# tags: -# - nix - -# pathcrawler: -# stage: tests -# script: -# - nix/frama-ci.sh build -A pathcrawler.tests -# tags: -# - nix - -# e-acsl-tests-dev: -# stage: tests -# script: -# - nix/frama-ci.sh build -A frama-c.e-acsl-tests-dev -# tags: -# - nix - # ivette: # stage: build # image: node:lts-gallium diff --git a/ci.sh b/nix/external-plugin-ci.sh similarity index 96% rename from ci.sh rename to nix/external-plugin-ci.sh index a04cb88386b..9e3a81902c1 100755 --- a/ci.sh +++ b/nix/external-plugin-ci.sh @@ -34,7 +34,9 @@ get_matching_branch () { fi } -curdir="$(dirname "$(readlink -f "$0")")" +# fc-dir nix-dir +curdir="$(dirname "$(dirname "$(readlink -f "$0")")")" + git_current_branch="$(git branch --show-current)" : "${git_current_branch:=${CI_COMMIT_BRANCH:-}}" echo "currently on branch $git_current_branch" diff --git a/nix/frama-ci.sh b/nix/frama-ci.sh deleted file mode 100755 index b4deee0abc1..00000000000 --- a/nix/frama-ci.sh +++ /dev/null @@ -1,12 +0,0 @@ -#!/bin/sh -eu - -DIR=$(dirname $0) - -export FRAMA_CI_NIX=$DIR/frama-ci.nix -export FRAMA_CI=$(nix-instantiate --eval -E "((import <nixos-20.03> {}).callPackage $FRAMA_CI_NIX { password = \"$TOKEN_FOR_API\";}).src.outPath") - -FRAMA_CI=${FRAMA_CI#\"} -FRAMA_CI=${FRAMA_CI%\"} - -export NIX_PATH="nixpkgs=$(eval echo $(nix-instantiate --eval -E "with import $FRAMA_CI/pkgs-ref.nix; url"))" -$FRAMA_CI/compile.sh $@ -- GitLab