Skip to content

Commit

Permalink
GNATprove 14.1
Browse files Browse the repository at this point in the history
  • Loading branch information
Fabien-Chouteau committed May 30, 2024
1 parent 7da1df3 commit 195ae49
Show file tree
Hide file tree
Showing 16 changed files with 344 additions and 106 deletions.
36 changes: 15 additions & 21 deletions .github/workflows/linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ on:


jobs:
gnat_gprbuild:
name: GNAT Linux and GPRbuild
gnat:
name: GNAT Linux
runs-on: ubuntu-20.04
steps:
- name: Checkout Project
Expand Down Expand Up @@ -38,14 +38,6 @@ jobs:
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # for GitHub CLI tool

- name: Build GPRbuild
run: ./anod build gprbuild -v --loglevel DEBUG --enable-cleanup

- name: Package GPRbuild
run: ./anod build release_package --qualifier=package=gprbuild,do_gh_release -v --loglevel DEBUG
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # for GitHub CLI tool

- uses: actions/upload-artifact@v2
with:
name: anod-artifacts
Expand All @@ -60,19 +52,13 @@ jobs:



gnatcov:
name: GNATcov
needs: gnat_gprbuild
gprbuild_gnatcov:
name: GPRbuild and GNATcov
runs-on: ubuntu-20.04
steps:
- name: Checkout Project
uses: actions/checkout@v2

- uses: actions/download-artifact@v2
with:
name: anod-artifacts
path: in_artifacts/

- name: Set up Python
uses: actions/setup-python@v2
with:
Expand All @@ -83,6 +69,14 @@ jobs:
python -m pip install --upgrade pip
pip install e3-core==22.1.0
- name: Build GPRbuild
run: ./anod build gprbuild -v --loglevel DEBUG --enable-cleanup

- name: Package GPRbuild
run: ./anod build release_package --qualifier=package=gprbuild,do_gh_release -v --loglevel DEBUG
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # for GitHub CLI tool

- name: Build GNATcov
run: ./anod build gnatcov -v --loglevel DEBUG --enable-cleanup

Expand All @@ -104,7 +98,7 @@ jobs:
matrix:
target: ["arm-elf", "riscv64-elf", "avr-elf"]
name: GNAT ${{ matrix.target }}-linux
needs: gnat_gprbuild
needs: gnat
runs-on: ubuntu-20.04
steps:
- name: Checkout Project
Expand Down Expand Up @@ -155,7 +149,7 @@ jobs:
uses: actions/checkout@v2
with:
repository: 'adacore/why3'
ref: 'fsf-13'
ref: 'fsf-14'

- name: Use Setup OCaml {{ matrix.ocaml-version }}
uses: ocaml/setup-ocaml@v2
Expand Down Expand Up @@ -193,7 +187,7 @@ jobs:
uses: actions/checkout@v2
with:
repository: 'adacore/alt-ergo'
ref: 'master'
ref: 'fsf-14'

- name: Use Setup OCaml {{ matrix.ocaml-version }}
uses: ocaml/setup-ocaml@v2
Expand Down
38 changes: 16 additions & 22 deletions .github/workflows/macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ on:


jobs:
gnat_gprbuild:
name: GNAT macOS and GPRbuild
gnat:
name: GNAT macOS
runs-on: macos-12
steps:
- name: Checkout Project
Expand All @@ -35,14 +35,6 @@ jobs:
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # for GitHub CLI tool

- name: Build GPRbuild
run: ./anod build gprbuild -v --loglevel DEBUG --enable-cleanup

- name: Package GPRbuild
run: ./anod build release_package --qualifier=package=gprbuild,do_gh_release -v --loglevel DEBUG
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # for GitHub CLI tool

- uses: actions/upload-artifact@v2
with:
name: anod-artifacts
Expand All @@ -56,20 +48,13 @@ jobs:
retention-days: 5



gnatcov:
name: GNATcov
needs: gnat_gprbuild
gprbuild_gnatcov:
name: GPRbuild and GNATcov
runs-on: macos-12
steps:
- name: Checkout Project
uses: actions/checkout@v2

- uses: actions/download-artifact@v2
with:
name: anod-artifacts
path: in_artifacts/

- name: Set up Python
uses: actions/setup-python@v2
with:
Expand All @@ -80,6 +65,15 @@ jobs:
python -m pip install --upgrade pip
pip install e3-core==22.1.0
- name: Build GPRbuild
run: ./anod build gprbuild -v --loglevel DEBUG --enable-cleanup

- name: Package GPRbuild
run: ./anod build release_package --qualifier=package=gprbuild,do_gh_release -v --loglevel DEBUG
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # for GitHub CLI tool


- name: Build GNATcov
run: ./anod build gnatcov -v --loglevel DEBUG --enable-cleanup

Expand All @@ -101,7 +95,7 @@ jobs:
matrix:
target: ["arm-elf", "riscv64-elf", "avr-elf"]
name: GNAT ${{ matrix.target }}-darwin
needs: gnat_gprbuild
needs: gnat
runs-on: macos-12
steps:
- name: Checkout Project
Expand Down Expand Up @@ -151,7 +145,7 @@ jobs:
uses: actions/checkout@v2
with:
repository: 'adacore/why3'
ref: 'fsf-13'
ref: 'fsf-14'

- name: Use Setup OCaml {{ matrix.ocaml-version }}
uses: ocaml/setup-ocaml@v2
Expand Down Expand Up @@ -190,7 +184,7 @@ jobs:
uses: actions/checkout@v2
with:
repository: 'adacore/alt-ergo'
ref: 'master'
ref: 'fsf-14'

- name: Use Setup OCaml {{ matrix.ocaml-version }}
uses: ocaml/setup-ocaml@v2
Expand Down
35 changes: 15 additions & 20 deletions .github/workflows/windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ on:
pull_request:

jobs:
gnat_gprbuild:
name: GNAT Windows and gprbuild
gnat:
name: GNAT Windows
runs-on: windows-2019
env:
CONFIG_SHELL: /bin/bash
Expand Down Expand Up @@ -49,14 +49,6 @@ jobs:
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # for GitHub CLI tool

- name: Build GPRbuild
run: mount C:/aaa /aaa && cd /aaa/GNAT-FSF-builds && python3 ./anod build gprbuild -v --loglevel DEBUG --enable-cleanup

- name: Package GPRbuild
run: mount C:/aaa /aaa && cd /aaa/GNAT-FSF-builds && python3 ./anod build release_package --qualifier=package=gprbuild,do_gh_release -v --loglevel DEBUG
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # for GitHub CLI tool

- uses: actions/upload-artifact@v2
with:
name: anod-artifacts
Expand All @@ -71,9 +63,8 @@ jobs:



gnatcov:
name: GNATcov
needs: gnat_gprbuild
gprbuild_gnatcov:
name: GPRbuild and GNATcov
runs-on: windows-2019
env:
CONFIG_SHELL: /bin/bash
Expand Down Expand Up @@ -104,10 +95,14 @@ jobs:
# We need a path that is compatible between Windows and Unix world
run: df -h; mkdir /c/aaa; mount C:/aaa /aaa ; cd ..; cp -r GNAT-FSF-builds /c/aaa

- uses: actions/download-artifact@v2
with:
name: anod-artifacts
path: C:/aaa/GNAT-FSF-builds/in_artifacts/

- name: Build GPRbuild
run: mount C:/aaa /aaa && cd /aaa/GNAT-FSF-builds && python3 ./anod build gprbuild -v --loglevel DEBUG --enable-cleanup

- name: Package GPRbuild
run: mount C:/aaa /aaa && cd /aaa/GNAT-FSF-builds && python3 ./anod build release_package --qualifier=package=gprbuild,do_gh_release -v --loglevel DEBUG
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # for GitHub CLI tool


- name: Build GNATcov
Expand All @@ -134,7 +129,7 @@ jobs:
matrix:
target: ["arm-elf", "riscv64-elf", "avr-elf"]
name: GNAT ${{ matrix.target }}-windows
needs: gnat_gprbuild
needs: gnat
runs-on: windows-2019
env:
CONFIG_SHELL: /bin/bash
Expand Down Expand Up @@ -200,7 +195,7 @@ jobs:
uses: actions/checkout@v2
with:
repository: 'adacore/why3'
ref: 'fsf-13'
ref: 'fsf-14'

- name: Use Setup OCaml v1 ${{ matrix.ocaml-version }}
uses: ocaml/setup-ocaml@v2
Expand Down Expand Up @@ -238,7 +233,7 @@ jobs:
uses: actions/checkout@v2
with:
repository: 'adacore/alt-ergo'
ref: 'master'
ref: 'fsf-14'

- name: Use Setup OCaml {{ matrix.ocaml-version }}
uses: ocaml/setup-ocaml@v2
Expand Down
71 changes: 71 additions & 0 deletions specs/adasat.anod
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
from e3.anod.spec import Anod
from e3.anod.loader import spec

import os


class AdaSAT(spec("common")):
@property
def version(self):
return "24.0.0"

@property
def tarball(self):
return "adasat-%s.tar.gz" % self.version

@property
def source_pkg_build(self):
return [
self.HTTPSSourceBuilder(
name=self.tarball,
url="https://github.com/AdaCore/AdaSAT/archive/v%s.tar.gz"
% self.version,
)
]

@property
def build_source_list(self):
return [Anod.Source(name=self.tarball, publish=True, dest="")]

@property
def build_deps(self):
return [
Anod.Dependency("base_gcc", track=True),
Anod.Dependency("gprbuild", track=True),
]

@Anod.primitive()
def build(self):
for m in self.deps:
self.deps[m].setenv()

gpr_file = os.path.join(self["SRC_DIR"], "adasat.gpr")
build_mode = "prod"

for library_type in ["static"]:
self.shell(
"gprbuild",
"-p",
"-P",
gpr_file,
"-j" + str(self.jobs),
"--relocate-build-tree=" + library_type,
"-XADASAT_BUILD_MODE=" + build_mode,
"-XADASAT_LIBRARY_TYPE=" + library_type,
)

self.shell(
"gprinstall",
"-f",
"-p",
"-P",
gpr_file,
"--relocate-build-tree=" + library_type,
"--prefix=" + self["INSTALL_DIR"],
"-XADASAT_BUILD_MODE=" + build_mode,
"-XADASAT_LIBRARY_TYPE=" + library_type,
"--build-var=LIBRARY_TYPE",
"--build-name=" + library_type,
)

self.clean()
2 changes: 1 addition & 1 deletion specs/base_gcc.anod
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ from e3.anod.spec import Anod
class base_gcc(spec("common")):
@property
def version(self):
return "13.2.0-2"
return "14.1.0-2"

@property
def tarball(self):
Expand Down
10 changes: 0 additions & 10 deletions specs/binutils.anod
Original file line number Diff line number Diff line change
Expand Up @@ -39,16 +39,6 @@ class Binutils(spec("common")):
Anod.Dependency("isl", target="host"),
]

if self.env.is_canadian:
deps.append(
Anod.Dependency(
name="gcc",
host="build",
target="host",
local_name="canadian-cross-compiler",
)
)

return deps

def merge(self, prefix):
Expand Down
2 changes: 1 addition & 1 deletion specs/gnatcov.anod
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ class GNATcov(spec("common")):
@property
def build_deps(self):
deps = [
Anod.Dependency("gcc", track=True),
Anod.Dependency("base_gcc", track=True),
Anod.Dependency("gprbuild", track=True),
Anod.Dependency("libgpr", track=True),
Anod.Dependency("gnatcoll", track=True),
Expand Down
2 changes: 1 addition & 1 deletion specs/gnatutil.anod
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ class GNATUTIL(spec("common")):
@property
def build_deps(self):
return [
Anod.Dependency("gcc", track=True),
Anod.Dependency("base_gcc", track=True),
Anod.Dependency("gprbuild", track=True),
]

Expand Down
2 changes: 1 addition & 1 deletion specs/gprconfig_kb.anod
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ from e3.anod.loader import spec
class GPRconfig_KB(spec("common")):
@property
def version(self):
return "23.0.0"
return "24.0.0"

@property
def tarball(self):
Expand Down
2 changes: 1 addition & 1 deletion specs/langkit.anod
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ class Langkit(spec("common")):
@property
def build_deps(self):
return [
Anod.Dependency("gcc", track=True),
Anod.Dependency("base_gcc", track=True),
Anod.Dependency("gprbuild", track=True),
Anod.Dependency("libgpr", track=True),
Anod.Dependency("gnatcoll", track=True),
Expand Down
Loading

0 comments on commit 195ae49

Please sign in to comment.