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
9640c1ab
Commit
9640c1ab
authored
8 months ago
by
Andre Maroneze
Browse files
Options
Downloads
Patches
Plain Diff
[dev] add script to quickly produce Docker images from current dev
parent
ff3926bd
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
dev/docker/Makefile
+4
-0
4 additions, 0 deletions
dev/docker/Makefile
dev/insta-docker-image.sh
+43
-0
43 additions, 0 deletions
dev/insta-docker-image.sh
dev/make-distrib.sh
+13
-3
13 additions, 3 deletions
dev/make-distrib.sh
with
60 additions
and
3 deletions
dev/docker/Makefile
+
4
−
0
View file @
9640c1ab
...
@@ -88,6 +88,10 @@ custom.% custom-gui.% custom-stripped.%:
...
@@ -88,6 +88,10 @@ custom.% custom-gui.% custom-stripped.%:
exit
1
exit
1
else
else
BUILD_ARGS
+=
--build-arg
=
from_archive
=
$(
FRAMAC_ARCHIVE
)
BUILD_ARGS
+=
--build-arg
=
from_archive
=
$(
FRAMAC_ARCHIVE
)
custom-fast.%
:
$(DEPS)
cp
../../reference-configuration.md .
$(
DOCKER
)
build
.
-t
frama-c-
$@
$(
BUILD_ARGS
)
--target
frama-c
custom.%
:
$(DEPS)
custom.%
:
$(DEPS)
cp
../../reference-configuration.md .
cp
../../reference-configuration.md .
$(
DOCKER
)
build
.
-t
frama-c-
$@
$(
BUILD_ARGS
)
--target
frama-c-slim
$(
DOCKER
)
build
.
-t
frama-c-
$@
$(
BUILD_ARGS
)
--target
frama-c-slim
...
...
This diff is collapsed.
Click to expand it.
dev/insta-docker-image.sh
0 → 100755
+
43
−
0
View file @
9640c1ab
#!/usr/bin/bash -eu
##########################################################################
# #
# This file is part of Frama-C. #
# #
# Copyright (C) 2007-2024 #
# CEA (Commissariat à l'énergie atomique et aux énergies #
# alternatives) #
# #
# you can redistribute it and/or modify it under the terms of the GNU #
# Lesser General Public License as published by the Free Software #
# Foundation, version 2.1. #
# #
# It is distributed in the hope that it will be useful, #
# but WITHOUT ANY WARRANTY; without even the implied warranty of #
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the #
# GNU Lesser General Public License for more details. #
# #
# See the GNU Lesser General Public License version 2.1 #
# for more details (enclosed in the file licenses/LGPLv2.1). #
# #
##########################################################################
# Script used to quickly generate a Frama-C Docker image based on the
# current state of the repository
SCRIPT_DIR
=
"
$(
cd
"
$(
dirname
"
${
BASH_SOURCE
[0]
}
"
)
"
>
/dev/null 2>&1
&&
pwd
)
"
cd
"
$SCRIPT_DIR
/../"
USE_STASH
=
yes
dev/make-distrib.sh
mv
"frama-c-current.tar.gz"
"
$SCRIPT_DIR
/docker/frama-c-current.tar.gz"
cd
"
$SCRIPT_DIR
/docker"
FRAMAC_ARCHIVE
=
"frama-c-current.tar.gz"
make custom-fast.debian
if
command
-v
podman 2>&1
;
then
DOCKER
=
podman
else
DOCKER
=
docker
fi
"
$DOCKER
"
tag frama-c-custom-fast.debian frama-c-current
echo
"Created Docker image: frama-c-current"
This diff is collapsed.
Click to expand it.
dev/make-distrib.sh
+
13
−
3
View file @
9640c1ab
...
@@ -82,6 +82,7 @@ do
...
@@ -82,6 +82,7 @@ do
echo
" VERSION_CODENAME=<name> (overriden by --codename)"
echo
" VERSION_CODENAME=<name> (overriden by --codename)"
echo
" OPEN_SOURCE=yes|no (overriden by --open-source and --closed-source)"
echo
" OPEN_SOURCE=yes|no (overriden by --open-source and --closed-source)"
echo
" CI_LINK=yes|no (also set by --ci-link)"
echo
" CI_LINK=yes|no (also set by --ci-link)"
echo
" USE_STASH=yes|no (default: no)"
echo
""
echo
""
exit
0
exit
0
;;
;;
...
@@ -117,7 +118,11 @@ VERSION=$(cat VERSION)
...
@@ -117,7 +118,11 @@ VERSION=$(cat VERSION)
VERSION_SAFE
=
${
VERSION
/~/-
}
VERSION_SAFE
=
${
VERSION
/~/-
}
FRAMAC
=
"frama-c-
$VERSION_SAFE
-
$VERSION_CODENAME
"
FRAMAC
=
"frama-c-
$VERSION_SAFE
-
$VERSION_CODENAME
"
FRAMAC_TAR
=
"
$FRAMAC
.tar"
if
[
"
$USE_STASH
"
==
"yes"
]
;
then
FRAMAC_TAR
=
"frama-c-current.tar"
else
FRAMAC_TAR
=
"
$FRAMAC
.tar"
fi
################################################################################
################################################################################
# Check Opam file
# Check Opam file
...
@@ -164,7 +169,7 @@ echo "----------------------------------------------------------------"
...
@@ -164,7 +169,7 @@ echo "----------------------------------------------------------------"
# Warn if there are uncommitted changes (will not be taken into account)
# Warn if there are uncommitted changes (will not be taken into account)
GIT_STATUS
=
"
$(
git status
--porcelain
--
$(
sed
's/^./:!&/'
<<<
$EXTERNAL_PLUGINS
))
"
GIT_STATUS
=
"
$(
git status
--porcelain
--
$(
sed
's/^./:!&/'
<<<
$EXTERNAL_PLUGINS
))
"
if
[
""
!=
"
$GIT_STATUS
"
]
;
then
if
[
""
!=
"
$GIT_STATUS
"
-a
"
$USE_STASH
"
!=
"yes"
]
;
then
echo
"WARNING: uncommitted changes will be IGNORED when making archive:"
echo
"WARNING: uncommitted changes will be IGNORED when making archive:"
echo
"
$GIT_STATUS
"
|
sed
's/^/ /'
echo
"
$GIT_STATUS
"
|
sed
's/^/ /'
echo
"----------------------------------------------------------------"
echo
"----------------------------------------------------------------"
...
@@ -173,7 +178,12 @@ fi
...
@@ -173,7 +178,12 @@ fi
################################################################################
################################################################################
# Prepare Archive
# Prepare Archive
git archive HEAD
-o
$FRAMAC_TAR
--prefix
"
$FRAMAC
/"
# For the "instant Docker image" script: allow inclusion of uncommitted changes
if
[
"
$USE_STASH
"
==
"yes"
]
;
then
ARCHIVE_COMMIT
=
$(
git stash create
)
fi
git archive
${
ARCHIVE_COMMIT
:-
HEAD
}
-o
$FRAMAC_TAR
--prefix
"
$FRAMAC
/"
################################################################################
################################################################################
# Add external plugin to archive
# Add external plugin to archive
...
...
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