Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
frama-c
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Container Registry
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
pub
frama-c
Commits
4f469d61
Commit
4f469d61
authored
3 years ago
by
Allan Blanchard
Browse files
Options
Downloads
Patches
Plain Diff
[ci] Main tests
parent
18650503
No related branches found
No related tags found
No related merge requests found
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
.gitlab-ci.yml
+37
-39
37 additions, 39 deletions
.gitlab-ci.yml
nix/frama-c.nix
+8
-0
8 additions, 0 deletions
nix/frama-c.nix
nix/main-tests.nix
+41
-0
41 additions, 0 deletions
nix/main-tests.nix
nix/pkgs.nix
+1
-0
1 addition, 0 deletions
nix/pkgs.nix
with
87 additions
and
39 deletions
.gitlab-ci.yml
+
37
−
39
View file @
4f469d61
stages
:
stages
:
-
git-update
-
git-update
-
build
-
build
-
tests
-
tests
-
distrib_and_compatibility
-
distrib_and_compatibility
-
make_public
-
make_public
################################################################################
################################################################################
### VARIABLES (todo)
### VARIABLES (todo)
...
@@ -20,18 +20,18 @@ stages:
...
@@ -20,18 +20,18 @@ stages:
check-no-old-frama-c
:
check-no-old-frama-c
:
stage
:
git-update
stage
:
git-update
script
:
script
:
-
(! git merge-base --is-ancestor a1e186c68a6418a53b3dc06237f49e8dcbf75f4a HEAD)
-
(! git merge-base --is-ancestor a1e186c68a6418a53b3dc06237f49e8dcbf75f4a HEAD)
-
git merge-base --is-ancestor a35d2118fe6999dddce9e1847eff626fae9cc37c HEAD
-
git merge-base --is-ancestor a35d2118fe6999dddce9e1847eff626fae9cc37c HEAD
tags
:
tags
:
-
nix
-
nix
#avoid a nix error https://github.com/NixOS/nix/issues/2087
#avoid a nix error https://github.com/NixOS/nix/issues/2087
git-update
:
git-update
:
stage
:
git-update
stage
:
git-update
script
:
script
:
-
nix-instantiate --eval nix/pkgs.nix -A ocamlPackages.frama-c.src.outPath
-
nix-instantiate --eval nix/pkgs.nix -A ocamlPackages.frama-c.src.outPath
tags
:
tags
:
-
nix
-
nix
################################################################################
################################################################################
### BUILD
### BUILD
...
@@ -39,7 +39,7 @@ git-update:
...
@@ -39,7 +39,7 @@ git-update:
frama-c
:
frama-c
:
stage
:
build
stage
:
build
script
:
script
:
-
nix-build nix/pkgs.nix -A ocamlPackages.frama-c
-
nix-build nix/pkgs.nix -A ocamlPackages.frama-c
artifacts
:
artifacts
:
when
:
on_failure
when
:
on_failure
paths
:
paths
:
...
@@ -47,11 +47,18 @@ frama-c:
...
@@ -47,11 +47,18 @@ frama-c:
-
results.log
-
results.log
expire_in
:
1 day
expire_in
:
1 day
tags
:
tags
:
-
nix
-
nix
################################################################################
################################################################################
### TESTS
### TESTS
main-tests
:
stage
:
tests
script
:
-
nix-build nix/pkgs.nix -A ocamlPackages.main-tests
tags
:
-
nix
################################################################################
################################################################################
### DISTRIB
### DISTRIB
...
@@ -66,13 +73,6 @@ frama-c:
...
@@ -66,13 +73,6 @@ frama-c:
# tags:
# tags:
# - nix
# - nix
# tests:
# stage: tests
# script:
# - nix/frama-ci.sh build -A frama-c.tests
# tags:
# - nix
# wp-qualif:
# wp-qualif:
# stage: tests
# stage: tests
# script:
# script:
...
@@ -186,7 +186,6 @@ frama-c:
...
@@ -186,7 +186,6 @@ frama-c:
# - nix/frama-ci.sh build -A frama-c.internal
# - nix/frama-ci.sh build -A frama-c.internal
# when: manual
# when: manual
# internal_nightly:
# internal_nightly:
# <<: *internal_template
# <<: *internal_template
# script:
# script:
...
@@ -194,7 +193,6 @@ frama-c:
...
@@ -194,7 +193,6 @@ frama-c:
# only:
# only:
# - schedules
# - schedules
# .build_template: &frama-c-ocaml
# .build_template: &frama-c-ocaml
# stage: distrib_and_compatibility
# stage: distrib_and_compatibility
# script:
# script:
...
@@ -264,35 +262,35 @@ frama-c:
...
@@ -264,35 +262,35 @@ frama-c:
make_public
:
make_public
:
stage
:
make_public
stage
:
make_public
script
:
script
:
-
(! git merge-base --is-ancestor a1e186c68a6418a53b3dc06237f49e8dcbf75f4a origin/master)
-
(! git merge-base --is-ancestor a1e186c68a6418a53b3dc06237f49e8dcbf75f4a origin/master)
-
echo "$FRAMA_C_PUBLIC_SSH_PRIVATE_KEY" | nix run -f channel:nixos-19.03 coreutils --command base64 -d > nix/frama-c-public/id_ed25519
-
echo "$FRAMA_C_PUBLIC_SSH_PRIVATE_KEY" | nix run -f channel:nixos-19.03 coreutils --command base64 -d > nix/frama-c-public/id_ed25519
-
nix run -f channel:nixos-19.03 coreutils --command chmod 400 nix/frama-c-public/id_ed25519
-
nix run -f channel:nixos-19.03 coreutils --command chmod 400 nix/frama-c-public/id_ed25519
-
GIT_SSH=nix/frama-c-public/ssh.sh nix run -f channel:nixos-19.03 openssh --command git push git@git.frama-c.com:pub/frama-c.git origin/master:refs/heads/master
-
GIT_SSH=nix/frama-c-public/ssh.sh nix run -f channel:nixos-19.03 openssh --command git push git@git.frama-c.com:pub/frama-c.git origin/master:refs/heads/master
tags
:
tags
:
-
nix
-
nix
only
:
only
:
-
schedules
-
schedules
make_public_meta
:
make_public_meta
:
stage
:
make_public
stage
:
make_public
script
:
script
:
-
echo "$FRAMA_C_PUBLIC_SSH_PRIVATE_KEY" | nix run -f channel:nixos-19.03 coreutils --command base64 -d > nix/frama-c-public/id_ed25519
-
echo "$FRAMA_C_PUBLIC_SSH_PRIVATE_KEY" | nix run -f channel:nixos-19.03 coreutils --command base64 -d > nix/frama-c-public/id_ed25519
-
nix run -f channel:nixos-19.03 coreutils --command chmod 400 nix/frama-c-public/id_ed25519
-
nix run -f channel:nixos-19.03 coreutils --command chmod 400 nix/frama-c-public/id_ed25519
-
GIT_SSH=$PWD/nix/frama-c-public/ssh.sh nix run -f channel:nixos-19.03 openssh --command git clone git@git.frama-c.com:frama-c/meta.git nix/frama-c-public/meta
-
GIT_SSH=$PWD/nix/frama-c-public/ssh.sh nix run -f channel:nixos-19.03 openssh --command git clone git@git.frama-c.com:frama-c/meta.git nix/frama-c-public/meta
-
GIT_SSH=$PWD/nix/frama-c-public/ssh.sh nix run -f channel:nixos-19.03 openssh --command git -C nix/frama-c-public/meta push git@git.frama-c.com:pub/meta origin/master:refs/heads/master
-
GIT_SSH=$PWD/nix/frama-c-public/ssh.sh nix run -f channel:nixos-19.03 openssh --command git -C nix/frama-c-public/meta push git@git.frama-c.com:pub/meta origin/master:refs/heads/master
tags
:
tags
:
-
nix
-
nix
only
:
only
:
-
schedules
-
schedules
make_public_fclang
:
make_public_fclang
:
stage
:
make_public
stage
:
make_public
script
:
script
:
-
echo "$FRAMA_C_PUBLIC_SSH_PRIVATE_KEY" | nix run -f channel:nixos-19.03 coreutils --command base64 -d > nix/frama-c-public/id_ed25519
-
echo "$FRAMA_C_PUBLIC_SSH_PRIVATE_KEY" | nix run -f channel:nixos-19.03 coreutils --command base64 -d > nix/frama-c-public/id_ed25519
-
nix run -f channel:nixos-19.03 coreutils --command chmod 400 nix/frama-c-public/id_ed25519
-
nix run -f channel:nixos-19.03 coreutils --command chmod 400 nix/frama-c-public/id_ed25519
-
GIT_SSH=$PWD/nix/frama-c-public/ssh.sh nix run -f channel:nixos-19.03 openssh --command git clone git@git.frama-c.com:frama-c/frama-clang.git nix/frama-c-public/frama-clang
-
GIT_SSH=$PWD/nix/frama-c-public/ssh.sh nix run -f channel:nixos-19.03 openssh --command git clone git@git.frama-c.com:frama-c/frama-clang.git nix/frama-c-public/frama-clang
-
GIT_SSH=$PWD/nix/frama-c-public/ssh.sh nix run -f channel:nixos-19.03 openssh --command git -C nix/frama-c-public/frama-clang push git@git.frama-c.com:pub/frama-clang origin/master:refs/heads/master
-
GIT_SSH=$PWD/nix/frama-c-public/ssh.sh nix run -f channel:nixos-19.03 openssh --command git -C nix/frama-c-public/frama-clang push git@git.frama-c.com:pub/frama-clang origin/master:refs/heads/master
tags
:
tags
:
-
nix
-
nix
only
:
only
:
-
schedules
-
schedules
This diff is collapsed.
Click to expand it.
nix/frama-c.nix
+
8
−
0
View file @
4f469d61
...
@@ -63,6 +63,8 @@ stdenv.mkDerivation rec {
...
@@ -63,6 +63,8 @@ stdenv.mkDerivation rec {
python3
python3
];
];
outputs
=
[
"out"
"build_dir"
];
preConfigure
=
''
preConfigure
=
''
autoconf
autoconf
''
;
''
;
...
@@ -71,6 +73,12 @@ stdenv.mkDerivation rec {
...
@@ -71,6 +73,12 @@ stdenv.mkDerivation rec {
"FRAMAC_INSTALLDIR=$(out)"
"FRAMAC_INSTALLDIR=$(out)"
];
];
postInstall
=
''
mkdir -p $build_dir
tar -cf $build_dir/dir.tar .
pwd > $build_dir/old_pwd
''
;
meta
=
{
meta
=
{
description
=
"An extensible and collaborative platform dedicated to source-code analysis of C software"
;
description
=
"An extensible and collaborative platform dedicated to source-code analysis of C software"
;
homepage
=
"http://frama-c.com/"
;
homepage
=
"http://frama-c.com/"
;
...
...
This diff is collapsed.
Click to expand it.
nix/main-tests.nix
0 → 100644
+
41
−
0
View file @
4f469d61
{
lib
,
stdenv
,
frama-c
,
perl
,
time
,
which
}:
stdenv
.
mkDerivation
rec
{
pname
=
"main-tests"
;
version
=
frama-c
.
version
;
slang
=
frama-c
.
slang
;
build_dir
=
frama-c
.
build_dir
;
src
=
build_dir
+
"/dir.tar"
;
sourceRoot
=
"."
;
buildInputs
=
frama-c
.
buildInputs
++
[
frama-c
perl
time
which
];
# Keep main configuration
configurePhase
=
''
true
''
;
buildPhase
=
''
make ptests/ptests.exe
make ptests/wtests.exe
dune exec --root ptests -- frama-c-ptests tests
dune build --display short @tests/ptests
''
;
# No installation required
installPhase
=
''
touch $out
''
;
}
This diff is collapsed.
Click to expand it.
nix/pkgs.nix
+
1
−
0
View file @
4f469d61
...
@@ -6,6 +6,7 @@ let
...
@@ -6,6 +6,7 @@ let
# Builds
# Builds
frama-c
=
oself
.
callPackage
./frama-c.nix
{};
frama-c
=
oself
.
callPackage
./frama-c.nix
{};
# Tests
# Tests
main-tests
=
oself
.
callPackage
./main-tests.nix
{};
};
};
overlay
=
self
:
super
:
{
overlay
=
self
:
super
:
{
niv
=
(
import
sources
.
niv
{})
.
niv
;
niv
=
(
import
sources
.
niv
{})
.
niv
;
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment