From 195ae494a7797e356060863f677ad33466077798 Mon Sep 17 00:00:00 2001 From: Fabien Chouteau Date: Thu, 30 May 2024 10:39:28 +0200 Subject: [PATCH 01/20] GNATprove 14.1 --- .github/workflows/linux.yml | 36 +++++------ .github/workflows/macos.yml | 38 +++++------- .github/workflows/windows.yml | 35 +++++------ specs/adasat.anod | 71 ++++++++++++++++++++++ specs/base_gcc.anod | 2 +- specs/binutils.anod | 10 ---- specs/gnatcov.anod | 2 +- specs/gnatutil.anod | 2 +- specs/gprconfig_kb.anod | 2 +- specs/langkit.anod | 2 +- specs/langkit_support.anod | 76 ++++++++++++++++++++++++ specs/libadalang.anod | 2 +- specs/libgpr2.anod | 109 ++++++++++++++++++++++++++++++++++ specs/libiconv.anod | 2 +- specs/spark2014.anod | 54 +++++++++-------- utils/gen_gnat_manifests.py | 7 ++- 16 files changed, 344 insertions(+), 106 deletions(-) create mode 100644 specs/adasat.anod create mode 100644 specs/langkit_support.anod create mode 100644 specs/libgpr2.anod diff --git a/.github/workflows/linux.yml b/.github/workflows/linux.yml index 338b6bf..64855ab 100644 --- a/.github/workflows/linux.yml +++ b/.github/workflows/linux.yml @@ -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 @@ -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 @@ -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: @@ -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 @@ -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 @@ -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 @@ -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 diff --git a/.github/workflows/macos.yml b/.github/workflows/macos.yml index bc14613..259a4c4 100644 --- a/.github/workflows/macos.yml +++ b/.github/workflows/macos.yml @@ -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 @@ -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 @@ -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: @@ -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 @@ -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 @@ -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 @@ -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 diff --git a/.github/workflows/windows.yml b/.github/workflows/windows.yml index 92de1fb..da0c97b 100644 --- a/.github/workflows/windows.yml +++ b/.github/workflows/windows.yml @@ -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 @@ -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 @@ -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 @@ -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 @@ -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 @@ -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 @@ -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 diff --git a/specs/adasat.anod b/specs/adasat.anod new file mode 100644 index 0000000..4bdecfc --- /dev/null +++ b/specs/adasat.anod @@ -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() diff --git a/specs/base_gcc.anod b/specs/base_gcc.anod index 27b5938..dde81d5 100644 --- a/specs/base_gcc.anod +++ b/specs/base_gcc.anod @@ -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): diff --git a/specs/binutils.anod b/specs/binutils.anod index 5f649ff..c74f986 100644 --- a/specs/binutils.anod +++ b/specs/binutils.anod @@ -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): diff --git a/specs/gnatcov.anod b/specs/gnatcov.anod index ae95d7b..aaeb7c0 100644 --- a/specs/gnatcov.anod +++ b/specs/gnatcov.anod @@ -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), diff --git a/specs/gnatutil.anod b/specs/gnatutil.anod index dc2ae35..e24f552 100644 --- a/specs/gnatutil.anod +++ b/specs/gnatutil.anod @@ -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), ] diff --git a/specs/gprconfig_kb.anod b/specs/gprconfig_kb.anod index 9380520..16d9a14 100644 --- a/specs/gprconfig_kb.anod +++ b/specs/gprconfig_kb.anod @@ -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): diff --git a/specs/langkit.anod b/specs/langkit.anod index ba70859..9b7a657 100644 --- a/specs/langkit.anod +++ b/specs/langkit.anod @@ -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), diff --git a/specs/langkit_support.anod b/specs/langkit_support.anod new file mode 100644 index 0000000..c37b7e0 --- /dev/null +++ b/specs/langkit_support.anod @@ -0,0 +1,76 @@ +from e3.anod.spec import Anod +from e3.anod.loader import spec + +import os + + +class LangkikSupport(spec("common")): + @property + def version(self): + return "24.0.0" + + @property + def tarball(self): + return "langkit_support-%s.tar.gz" % self.version + + @property + def source_pkg_build(self): + return [ + self.HTTPSSourceBuilder( + name=self.tarball, + url="https://github.com/AdaCore/langkit/releases/download/v%s/langkit_support-%s.tar.gz" + % (self.version, 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.Dependency("libgpr", track=True), + Anod.Dependency("gnatcoll", track=True), + Anod.Dependency("gnatcoll-bindings", track=True), + Anod.Dependency("xmlada", track=True), + Anod.Dependency("adasat", track=True), + ] + + @Anod.primitive() + def build(self): + for m in self.deps: + self.deps[m].setenv() + + gpr_file = os.path.join(self["SRC_DIR"], "langkit_support.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, + "-XBUILD_MODE=" + build_mode, + "-XLIBRARY_TYPE=" + library_type, + ) + + self.shell( + "gprinstall", + "-f", + "-p", + "-P", + gpr_file, + "--relocate-build-tree=" + library_type, + "--prefix=" + self["INSTALL_DIR"], + "-XBUILD_MODE=" + build_mode, + "-XLIBRARY_TYPE=" + library_type, + "--build-var=LIBRARY_TYPE", + "--build-name=" + library_type, + ) + + self.clean() diff --git a/specs/libadalang.anod b/specs/libadalang.anod index cd1e5fd..6ba5d67 100644 --- a/specs/libadalang.anod +++ b/specs/libadalang.anod @@ -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), diff --git a/specs/libgpr2.anod b/specs/libgpr2.anod new file mode 100644 index 0000000..f50a061 --- /dev/null +++ b/specs/libgpr2.anod @@ -0,0 +1,109 @@ +from e3.os.fs import touch +from e3.anod.helper import Make +from e3.anod.spec import Anod +from e3.anod.loader import spec +from e3.fs import cp, sync_tree +from e3.diff import patch +import os + +class LibGPR2(spec("common")): + + @property + def is_next(self): + return 'next' in self.parsed_qualifier + + @property + def version(self): + if self.is_next: + return "24.2.0-next" + else: + return "24.0.0" + + @property + def lk_version(self): + return "24.0.0" + + @property + def tarball(self): + return "gpr-%s.tar.gz" % self.version + + @property + def lk_tarball(self): + return "langkit-py-%s.tar.gz" % self.lk_version + + @property + def build_space_name(self): + if self.is_next: + return "%s-next" % (self.name) + else: + return self.name + + @property + def source_pkg_build(self): + return [ + self.HTTPSSourceBuilder( + name=self.tarball, + url="https://github.com/AdaCore/gpr/archive/v%s.tar.gz" + % ( self.version), + ), + self.HTTPSSourceBuilder( + name=self.lk_tarball, + url="https://github.com/AdaCore/langkit/archive/v%s.tar.gz" + % self.lk_version, + ) + ] + + @property + def build_source_list(self): + return [ + Anod.Source(name=self.tarball, publish=True, dest=""), + Anod.Source(name=self.lk_tarball, publish=True, dest="langkit_src"), + Anod.Source( + name=self.deps["gprconfig_kb"].tarball, + publish=True, + dest="gprconfig_kb", + ), + ] + + @property + def build_deps(self): + return [ + Anod.Dependency("base_gcc", track=True), + Anod.Dependency("gprbuild", track=True), + Anod.Dependency("libgpr", track=True), + Anod.Dependency("xmlada", track=True), + Anod.Dependency("gnatcoll", track=True), + Anod.Dependency("gnatcoll-bindings", track=True), + Anod.Dependency("langkit_support", track=True), + Anod.Dependency("libadalang", track=True), + Anod.Dependency("gprconfig_kb", require="source_pkg", track=True), + ] + + @Anod.primitive() + def build(self): + for m in self.deps: + if m != "gprconfig_kb": + self.deps[m].setenv() + + self.env.add_search_path("PYTHONPATH", os.path.join(self["SRC_DIR"], "langkit_src")) + + make = Make(self, + makefile=os.path.join(self["SRC_DIR"], "Makefile"), + exec_dir=self["BUILD_DIR"], + jobs=1) + + make.set_var("prefix", self["INSTALL_DIR"]) + make.set_var("GPR2_BUILD", "release") + make.set_var("FORCE_PARSER_GEN", "force") + make.set_var("GPR2KBDIR", os.path.join(self["SRC_DIR"], "gprconfig_kb", "db")) + + for build_kind in ["static"]: + make("build-lib-%s" % build_kind) + make("install-lib-%s" % build_kind) + sync_tree( + os.path.join(self["SRC_DIR"], "examples"), + os.path.join(self["INSTALL_DIR"], "share", "examples", "gpr2"), + delete=True, + ) + + self.clean() diff --git a/specs/libiconv.anod b/specs/libiconv.anod index b43cfa7..39e4d74 100644 --- a/specs/libiconv.anod +++ b/specs/libiconv.anod @@ -30,7 +30,7 @@ class LibIconv(spec("common")): @property def build_deps(self): - return [Anod.Dependency("gcc")] + return [Anod.Dependency("base_gcc")] def setenv(self): self.env.add_search_path( diff --git a/specs/spark2014.anod b/specs/spark2014.anod index f12392b..8900f54 100644 --- a/specs/spark2014.anod +++ b/specs/spark2014.anod @@ -10,7 +10,7 @@ import os class SPARK2014(spec("common")): @property def version(self): - return "13.2.0" + return "14.1.0" @property def tarball(self): @@ -28,29 +28,33 @@ class SPARK2014(spec("common")): return "gcc-%s.tar.gz" % self.version @property - def cvc5_binary(self): + def sparklib_tarball(self): + return "sparkib-%s.tar.gz" % self.version + + @property + def cvc5_zip(self): if self.env.host.os.name == "windows": - fn = "cvc5-Win64.exe" + fn = "cvc5-Win64-static.zip" elif self.env.host.os.name == "darwin" and \ self.env.target.cpu.name == "x86_64": - fn = "cvc5-macOS" + fn = "cvc5-macOS-static.zip" elif self.env.host.os.name == "darwin": - fn = "cvc5-macOS-arm64" + fn = "cvc5-macOS-arm64-static.zip" else: - fn = "cvc5-linux" + fn = "cvc5-linux-static.zip" return fn @property def z3_zip(self): if self.env.host.os.name == "windows": - fn = "z3-4.12.2-x64-win.zip" + fn = "z3-4.13.0-x64-win.zip" elif self.env.host.os.name == "darwin" and \ self.env.target.cpu.name == "x86_64": - fn = "z3-4.12.2-x64-osx-10.16.zip" + fn = "z3-4.13.0-x64-osx-11.7.10.zip" elif self.env.host.os.name == "darwin": - fn = "z3-4.12.2-arm64-osx-11.0.zip" + fn = "z3-4.13.0-arm64-osx-11.0.zip" else: - fn = "z3-4.12.2-x64-glibc-2.31.zip" + fn = "z3-4.13.0-x64-glibc-2.35.zip" return fn @property @@ -63,16 +67,20 @@ class SPARK2014(spec("common")): ), self.HTTPSSourceBuilder( name=self.tarball, - url="https://github.com/adacore/spark2014/tarball/fsf-13", + url="https://github.com/adacore/spark2014/tarball/fsf-14", + ), + self.HTTPSSourceBuilder( + name=self.sparklib_tarball, + url="https://github.com/adacore/sparklib/tarball/master", ), self.HTTPSSourceBuilder( - name=self.cvc5_binary, - url="https://github.com/cvc5/cvc5/releases/download/cvc5-1.0.5/%s" - % self.cvc5_binary, + name=self.cvc5_zip, + url="https://github.com/cvc5/cvc5/releases/download/cvc5-1.1.2/%s" + % self.cvc5_zip, ), self.HTTPSSourceBuilder( name=self.z3_zip, - url="https://github.com/Z3Prover/z3/releases/download/z3-4.12.2/%s" + url="https://github.com/Z3Prover/z3/releases/download/z3-4.13.0/%s" % self.z3_zip, ), ] @@ -82,9 +90,8 @@ class SPARK2014(spec("common")): return [ Anod.Source(name=self.tarball, publish=True, dest=""), Anod.Source(name=self.gcc_tarball, publish=True, dest="gcc"), - Anod.Source( - name=self.cvc5_binary, publish=True, unpack_cmd=cp, dest="cvc5" - ), + Anod.Source(name=self.sparklib_tarball, publish=True, dest="include"), + Anod.Source(name=self.cvc5_zip, publish=True, dest="cvc5"), Anod.Source(name=self.z3_zip, publish=True, dest="z3"), ] @@ -99,8 +106,12 @@ class SPARK2014(spec("common")): Anod.Dependency("gmp", qualifier="shared_lib"), Anod.Dependency("gprbuild"), Anod.Dependency("gnatcoll"), + Anod.Dependency("gnatcoll-bindings"), Anod.Dependency("xmlada"), + Anod.Dependency("libgpr2", qualifier="next"), Anod.Dependency("libgpr"), + Anod.Dependency("langkit_support"), + Anod.Dependency("libadalang"), ] return deps @@ -156,12 +167,7 @@ class SPARK2014(spec("common")): sync_tree(self.deps["gmp"]["INSTALL_DIR"], libexec_spark, delete=False) sync_tree(os.path.join(self["SRC_DIR"], "z3"), libexec_spark, delete=False) - cvc5_binary_name = "cvc5.exe" if self.env.host.os.name == "windows" else "cvc5" - cvc5_binary_name = os.path.join(libexec_spark_bin, cvc5_binary_name) - cp( - os.path.join(self["SRC_DIR"], "cvc5", self.cvc5_binary), - cvc5_binary_name - ) + sync_tree(os.path.join(self["SRC_DIR"], "cvc5"), libexec_spark, delete=False) for fn in [ "gnat2why", diff --git a/utils/gen_gnat_manifests.py b/utils/gen_gnat_manifests.py index f67fa91..0ea5df7 100755 --- a/utils/gen_gnat_manifests.py +++ b/utils/gen_gnat_manifests.py @@ -7,8 +7,8 @@ import os import shutil -PKG_VERSION = "13.2.0-1" -CRATE_VERSION = "13.2.1" +PKG_VERSION = "14.1.0-2" +CRATE_VERSION = "14.1.2" targets = { "x86_64": {"crate": "gnat_native", "description": "Native"}, @@ -87,14 +87,17 @@ def check_sha256(package): PATH.prepend = "${{CRATE_ROOT}}/bin" [origin."case(os)".linux."case(host-arch)".x86-64] +binary = true url = "https://github.com/alire-project/GNAT-FSF-builds/releases/download/gnat-{PKG_VERSION}/{linux_package}" hashes = ["sha256:{linux_sha256}"] [origin."case(os)".windows."case(host-arch)".x86-64] +binary = true url = "https://github.com/alire-project/GNAT-FSF-builds/releases/download/gnat-{PKG_VERSION}/{windows_package}" hashes = ["sha256:{windows_sha256}"] [origin."case(os)".macos."case(host-arch)".x86-64] +binary = true url = "https://github.com/alire-project/GNAT-FSF-builds/releases/download/gnat-{PKG_VERSION}/{macos_package}" hashes = ["sha256:{macos_sha256}"] """ From 24b3fb96c919cd76356e6526a9ff3f318e3f1bb9 Mon Sep 17 00:00:00 2001 From: Fabien Chouteau Date: Thu, 30 May 2024 18:44:51 +0200 Subject: [PATCH 02/20] TBM --- specs/spark2014.anod | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/specs/spark2014.anod b/specs/spark2014.anod index 8900f54..9e02602 100644 --- a/specs/spark2014.anod +++ b/specs/spark2014.anod @@ -156,7 +156,6 @@ class SPARK2014(spec("common")): if ( not os.path.basename(f).startswith("gnatbind") and not os.path.basename(f).startswith("gnatls") - and not os.path.basename(f).startswith("gnat_server") and not os.path.basename(f).startswith("gnatwhy3") ): rm(f) @@ -188,7 +187,7 @@ class SPARK2014(spec("common")): for dir in ["alt-ergo", "alt-ergo-lib", "alt-ergo-parsers"]: rm(os.path.join(libexec_spark, "lib", dir), True) - for exe in ["cvc5", "gnat_server", "gnatwhy3", "alt-ergo"]: + for exe in ["cvc5", "gnatwhy3", "alt-ergo"]: chmod("a+x", os.path.join(libexec_spark_bin, (exe + (".exe" if self.env.host.os.name == "windows" From bbf5e6cdb55d18d17a05716bac33b444034d7536 Mon Sep 17 00:00:00 2001 From: Fabien Chouteau Date: Fri, 31 May 2024 11:14:46 +0200 Subject: [PATCH 03/20] GNATprove: add libiconv dependency on Windows --- specs/spark2014.anod | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/specs/spark2014.anod b/specs/spark2014.anod index 9e02602..921631f 100644 --- a/specs/spark2014.anod +++ b/specs/spark2014.anod @@ -113,6 +113,10 @@ class SPARK2014(spec("common")): Anod.Dependency("langkit_support"), Anod.Dependency("libadalang"), ] + + if self.env.target.os.name == "windows": + deps.append(Anod.Dependency("libiconv")) + return deps @Anod.primitive() From 306ca4720b81f09dc50f3f99b3e84302bb65587f Mon Sep 17 00:00:00 2001 From: Fabien Chouteau Date: Fri, 31 May 2024 17:47:20 +0200 Subject: [PATCH 04/20] spark2014: set sparklib commit id --- specs/spark2014.anod | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/specs/spark2014.anod b/specs/spark2014.anod index 921631f..1fd438f 100644 --- a/specs/spark2014.anod +++ b/specs/spark2014.anod @@ -71,7 +71,7 @@ class SPARK2014(spec("common")): ), self.HTTPSSourceBuilder( name=self.sparklib_tarball, - url="https://github.com/adacore/sparklib/tarball/master", + url="https://github.com/adacore/sparklib/tarball/d4f3dc1c6c8ce441472b1bd5df00777eec799eb2", ), self.HTTPSSourceBuilder( name=self.cvc5_zip, From 39805b7f2cde52db8b834497c7fe6c33547cb6a0 Mon Sep 17 00:00:00 2001 From: Fabien Chouteau Date: Fri, 31 May 2024 17:47:54 +0200 Subject: [PATCH 05/20] libgpr2: fix SOURCE_DIR for macOS --- specs/libgpr2.anod | 39 +++++++++++++++++++++++++++++++++++---- 1 file changed, 35 insertions(+), 4 deletions(-) diff --git a/specs/libgpr2.anod b/specs/libgpr2.anod index f50a061..3542243 100644 --- a/specs/libgpr2.anod +++ b/specs/libgpr2.anod @@ -1,10 +1,11 @@ from e3.os.fs import touch -from e3.anod.helper import Make +from e3.anod.helper import Make, text_replace from e3.anod.spec import Anod from e3.anod.loader import spec from e3.fs import cp, sync_tree from e3.diff import patch import os +from datetime import date class LibGPR2(spec("common")): @@ -58,9 +59,7 @@ class LibGPR2(spec("common")): return [ Anod.Source(name=self.tarball, publish=True, dest=""), Anod.Source(name=self.lk_tarball, publish=True, dest="langkit_src"), - Anod.Source( - name=self.deps["gprconfig_kb"].tarball, - publish=True, + Anod.Source(name=self.deps["gprconfig_kb"].tarball, publish=True, dest="gprconfig_kb", ), ] @@ -79,12 +78,44 @@ class LibGPR2(spec("common")): Anod.Dependency("gprconfig_kb", require="source_pkg", track=True), ] + def update_version(self): + text_replace( + os.path.join(self["SRC_DIR"], "src", "lib", "gpr2-version.ads"), + [ + ( + "Build_Type : constant GNAT_Build_Type.*", + "Build_Type : constant GNAT_Build_Type := FSF;", + ), + ( + "Short_Value : constant String.*", + 'Short_Value : constant String := "%s";' % self.version, + ), + ( + "Date : constant String.*", + 'Date : constant String := "%s-gpr2";' % str(date.today()), + ), + ( + "Current_Year : constant String.*", + 'Current_Year : constant String := "%s";' % str(date.today().year), + ), + ], + ) + @Anod.primitive() def build(self): for m in self.deps: if m != "gprconfig_kb": self.deps[m].setenv() + self.update_version() + + # The SOURCE_DIR detection doesn't work on macOS, so we replace it with + # an absolute path. + print(os.path.join(self["SRC_DIR"], "Makefile")) + text_replace(os.path.join(self["SRC_DIR"], "Makefile"), + [("SOURCE_DIR := .*", + "SOURCE_DIR := " + self["SRC_DIR"])]) + self.env.add_search_path("PYTHONPATH", os.path.join(self["SRC_DIR"], "langkit_src")) make = Make(self, From 90a24ab6ea332818aa0736b58d506a60de47e119 Mon Sep 17 00:00:00 2001 From: Fabien Chouteau Date: Mon, 3 Jun 2024 10:49:16 +0200 Subject: [PATCH 06/20] spark2014: use glibc 2.31 version of Z3 --- specs/spark2014.anod | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/specs/spark2014.anod b/specs/spark2014.anod index 1fd438f..0f38520 100644 --- a/specs/spark2014.anod +++ b/specs/spark2014.anod @@ -54,7 +54,7 @@ class SPARK2014(spec("common")): elif self.env.host.os.name == "darwin": fn = "z3-4.13.0-arm64-osx-11.0.zip" else: - fn = "z3-4.13.0-x64-glibc-2.35.zip" + fn = "z3-4.13.0-x64-glibc-2.31.zip" return fn @property From 623e0f98ebb128f220b4b51299f9191005dcaf7f Mon Sep 17 00:00:00 2001 From: Fabien Chouteau Date: Mon, 3 Jun 2024 16:49:49 +0200 Subject: [PATCH 07/20] GDB: disable python support on all GDB The dependency on Python/libpython is difficult to manage on Linux because of the different versions in different distribs. On Windows we never enabled it. And compile GDB with "base_gcc". --- specs/gdb.anod | 3 ++- specs/release_package.anod | 8 ++++---- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/specs/gdb.anod b/specs/gdb.anod index 8d15431..5794db1 100644 --- a/specs/gdb.anod +++ b/specs/gdb.anod @@ -38,7 +38,7 @@ class GDB(spec("common")): @property def build_deps(self): deps = [ - Anod.Dependency("gcc", target="host"), + Anod.Dependency("base_gcc", target="host"), Anod.Dependency("mpfr", target="host"), Anod.Dependency("mpc", target="host"), Anod.Dependency("gmp", target="host"), @@ -91,6 +91,7 @@ class GDB(spec("common")): "--with-gmp=%s" % unixpath(self.deps["gmp"]["INSTALL_DIR"]), "--with-libgmp=%s" % unixpath(self.deps["gmp"]["INSTALL_DIR"]), "--with-mpc=%s" % unixpath(self.deps["mpc"]["INSTALL_DIR"]), + "--with-python=no" ) if self.env.host.os.name == "windows": diff --git a/specs/release_package.anod b/specs/release_package.anod index fc46f1c..0e2925c 100644 --- a/specs/release_package.anod +++ b/specs/release_package.anod @@ -54,13 +54,13 @@ class ReleasePackage(spec("common")): return "1" elif package == "gnat": if self.env.target.triplet == "arm-eabi": - return "2" + return "3" elif self.env.target.triplet == "riscv64-elf": - return "2" + return "3" elif self.env.target.triplet == "avr-elf": - return "2" + return "3" else: - return "2" + return "3" @property def release_name(self): From 8bc3d7c0029bb271177e72a5f705508867fccc33 Mon Sep 17 00:00:00 2001 From: Fabien Chouteau Date: Tue, 4 Jun 2024 15:55:55 +0200 Subject: [PATCH 08/20] spark2014: use static builds for libgmp and libiconv --- specs/libiconv.anod | 3 ++- specs/spark2014.anod | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/specs/libiconv.anod b/specs/libiconv.anod index 39e4d74..8ca7e3a 100644 --- a/specs/libiconv.anod +++ b/specs/libiconv.anod @@ -47,7 +47,8 @@ class LibIconv(spec("common")): configure = Configure(self) configure.add("--prefix=%s" % unixpath(self["INSTALL_DIR"])) - configure.add("--enable-static") + configure.add("--enable-static=yes") + configure.add("--enable-shared=no") configure.add("--enable-extra-encodings") configure.add("--disable-rpath") configure.add("--enable-silent-rules") diff --git a/specs/spark2014.anod b/specs/spark2014.anod index 0f38520..9cbaf65 100644 --- a/specs/spark2014.anod +++ b/specs/spark2014.anod @@ -103,7 +103,7 @@ class SPARK2014(spec("common")): Anod.Dependency("base_gcc"), Anod.Dependency("why3"), Anod.Dependency("alt-ergo"), - Anod.Dependency("gmp", qualifier="shared_lib"), + Anod.Dependency("gmp"), Anod.Dependency("gprbuild"), Anod.Dependency("gnatcoll"), Anod.Dependency("gnatcoll-bindings"), From 48821a251b1a87ecbdfca23fd634a06155ea40e8 Mon Sep 17 00:00:00 2001 From: Fabien Chouteau Date: Wed, 5 Jun 2024 18:17:31 +0200 Subject: [PATCH 09/20] embedded-runtimes: bump branch commit to include new fix --- specs/embedded-runtimes.anod | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/specs/embedded-runtimes.anod b/specs/embedded-runtimes.anod index a90c88a..aa5ca9d 100644 --- a/specs/embedded-runtimes.anod +++ b/specs/embedded-runtimes.anod @@ -12,7 +12,7 @@ class EmbeddedRuntimes(spec("common")): @property def commit_id(self): - return "4386b1dcd0e995ac9b9e1b221cf386238d3c1537" + return "e59080e0c4b49d12e00538595052dea2dceb5a6e" @property def tarball(self): From 557643c9e19fe5fdf950269cd883e4e79f463e42 Mon Sep 17 00:00:00 2001 From: Fabien Chouteau Date: Fri, 7 Jun 2024 18:15:26 +0200 Subject: [PATCH 10/20] utils/gen_gnat_manifests.py: set library paths for native compilers --- utils/gen_gnat_manifests.py | 34 ++++++++++++++++++++++++++++------ 1 file changed, 28 insertions(+), 6 deletions(-) diff --git a/utils/gen_gnat_manifests.py b/utils/gen_gnat_manifests.py index 0ea5df7..84ba17f 100755 --- a/utils/gen_gnat_manifests.py +++ b/utils/gen_gnat_manifests.py @@ -7,8 +7,8 @@ import os import shutil -PKG_VERSION = "14.1.0-2" -CRATE_VERSION = "14.1.2" +PKG_VERSION = "14.1.0-3" +CRATE_VERSION = "14.1.3" targets = { "x86_64": {"crate": "gnat_native", "description": "Native"}, @@ -69,6 +69,31 @@ def check_sha256(package): windows_sha256 = check_sha256(windows_package) macos_sha256 = check_sha256(macos_package) + if target == "x86_64": + environment = """ +[environment."case(os)".linux."case(host-arch)".x86-64] +PATH.prepend = "${CRATE_ROOT}/bin" +LIBRARY_PATH.prepend = "${CRATE_ROOT}/lib64" +LD_LIBRARY_PATH.prepend = "${CRATE_ROOT}/lib64" +LD_RUN_PATH.prepend = "${CRATE_ROOT}/lib64" + +[environment."case(os)".windows."case(host-arch)".x86-64] +PATH.prepend = "${CRATE_ROOT}/bin" +LIBRARY_PATH.prepend = "${CRATE_ROOT}/lib" +LD_LIBRARY_PATH.prepend = "${CRATE_ROOT}/lib" +LD_RUN_PATH.prepend = "${CRATE_ROOT}/lib" + +[environment."case(os)".macos."case(host-arch)".x86-64] +PATH.prepend = "${CRATE_ROOT}/bin" +LIBRARY_PATH.prepend = "${CRATE_ROOT}/lib" +LD_LIBRARY_PATH.prepend = "${CRATE_ROOT}/lib" +LD_RUN_PATH.prepend = "${CRATE_ROOT}/lib" +""" + else: + environment = """ +[environment] +PATH.prepend = "${CRATE_ROOT}/bin" +""" MANIFEST_CONTENT = f""" name = "{CRATE}" version = "{CRATE_VERSION}" @@ -82,10 +107,7 @@ def check_sha256(package): [configuration] disabled = true - -[environment] -PATH.prepend = "${{CRATE_ROOT}}/bin" - +{environment} [origin."case(os)".linux."case(host-arch)".x86-64] binary = true url = "https://github.com/alire-project/GNAT-FSF-builds/releases/download/gnat-{PKG_VERSION}/{linux_package}" From 053e3989392c7f37442209a2cdfa1acbf6e31b19 Mon Sep 17 00:00:00 2001 From: Fabien Chouteau Date: Fri, 7 Jun 2024 18:31:00 +0200 Subject: [PATCH 11/20] gnatcoll-bindings: only build static libs --- specs/gnatcoll-bindings.anod | 1 + 1 file changed, 1 insertion(+) diff --git a/specs/gnatcoll-bindings.anod b/specs/gnatcoll-bindings.anod index bf428f1..8fe4422 100644 --- a/specs/gnatcoll-bindings.anod +++ b/specs/gnatcoll-bindings.anod @@ -56,6 +56,7 @@ class GNATcollBindings(spec("common")): "build", "--jobs=" + str(self.jobs), "--reconfigure", + "--library-types", "static", ) self.shell( From 0af8648a8962baad72fc8814c32cc70658bad286 Mon Sep 17 00:00:00 2001 From: Fabien Chouteau Date: Fri, 7 Jun 2024 18:32:55 +0200 Subject: [PATCH 12/20] specs/gnu.anod: on Linux create a duplicate lib64/ along the lib/ --- specs/gnu.anod | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/specs/gnu.anod b/specs/gnu.anod index 0ea82f9..06191d1 100644 --- a/specs/gnu.anod +++ b/specs/gnu.anod @@ -1,6 +1,7 @@ from e3.anod.error import ShellError from e3.anod.spec import Anod from e3.anod.loader import spec +from e3.fs import mkdir, sync_tree import os @@ -20,6 +21,9 @@ class GNU(spec("gh-artifact")): self.env.add_search_path( "LIBRARY_PATH", os.path.join(self["INSTALL_DIR"], "lib") ) + self.env.add_search_path( + "LIBRARY_PATH", os.path.join(self["INSTALL_DIR"], "lib64") + ) def artifact_build(self): # This spec inherit from gh-artifact and therefore has a different @@ -37,4 +41,19 @@ class GNU(spec("gh-artifact")): # Many projects fail when running `make install` with parallel jobs self["make"]("install", jobs=1) + lib_dir = os.path.join(self["INSTALL_DIR"], "lib") + lib64_dir = os.path.join(self["INSTALL_DIR"], "lib64") + if self.env.target.platform == "x86_64-linux": + # On some old x86_64-linux system gcc might changes drastically + # LIBRARY_PATH. For example if this var is set to /mydir/lib:/lib + # gcc might call ld with + # /mydir/lib/../lib64:/lib/../lib64:/mydir/lib:/lib + # The consequence is that sometimes we might pick the library from + # the system instead of the recently built one. So, make sure to + # provide lib64 as well as lib. + + if os.path.isdir(lib_dir) and not os.path.isdir(lib64_dir): + mkdir(lib64_dir) + sync_tree(lib_dir, lib64_dir) + self.clean() From a001205f79c82b994acdb2e49c30aa68b1a7176c Mon Sep 17 00:00:00 2001 From: Simon Wright Date: Sun, 9 Jun 2024 09:46:32 +0100 Subject: [PATCH 13/20] Build GCC 14.1 on aarch64-apple-darwin. Use Xcode 15.3, because (at this time) the macos-14 runner defaults to Xcode 15.0.1, which has the linking bug. 15.3 is the latest version available in Command Line Tools; Xcode has 15.4. Use GCC 13.3.0 as the base compiler, because (on Github) 13.2 links one of the tools generated during the compiler build in such a way that it won't run. Update GNAT's aarch64 source to the gcc-14.1-darwin-r1 release. Don't configure GCC with --without-build-config (the reason for using it was GCC PR 100340, which was fixed in 2022; using it caused failures in bootstrap stage 2/3 comparison). * .github/workflows/macos_arm.yml (GNAT macOS): use Xcode 15.3. (SPARK): likewise. * specs/base_gcc.anod (tarball): directly name the 13.3.0 build to be used. (url): directly name the location of the 13.3.0 build to be used. * specs/gcc.anod (source_pkg_build): update to the gcc-14.1-darwin-r1 release. (configure_args): don't use --without-build-config. --- .github/workflows/macos_arm.yml | 6 ++++++ specs/base_gcc.anod | 7 +++++-- specs/gcc.anod | 6 +----- 3 files changed, 12 insertions(+), 7 deletions(-) diff --git a/.github/workflows/macos_arm.yml b/.github/workflows/macos_arm.yml index 48c15a4..5a2c124 100644 --- a/.github/workflows/macos_arm.yml +++ b/.github/workflows/macos_arm.yml @@ -8,6 +8,9 @@ jobs: name: GNAT macOS runs-on: macos-14 steps: + - name: Set Xcode 15.3 + run: sudo xcode-select --switch /Applications/Xcode_15.3.app + - name: Checkout Project uses: actions/checkout@v2 @@ -134,6 +137,9 @@ jobs: - name: Checkout Project uses: actions/checkout@v2 + - name: Set Xcode 15.3 + run: sudo xcode-select --switch /Applications/Xcode_15.3.app + - uses: actions/download-artifact@v2 with: name: alt-ergo diff --git a/specs/base_gcc.anod b/specs/base_gcc.anod index dde81d5..7ca896c 100644 --- a/specs/base_gcc.anod +++ b/specs/base_gcc.anod @@ -16,8 +16,11 @@ class base_gcc(spec("common")): @property def url(self): - return "https://github.com/alire-project/GNAT-FSF-builds/releases/download/gnat-%s/%s" \ + # Use Simon's GCC 13.3 compiler on Mac OS X ARM64 for bootstrap + return ("https://github.com/alire-project/GNAT-FSF-builds/releases/download/gnat-%s/%s" \ % (self.version, self.tarball) + if self.env.target.cpu.name == "x86_64" else + "https://github.com/simonjwright/alire-index.mac/releases/download/toolchain-13.2.1/gcc-13.3.0-aarch64.tar.gz") @Anod.primitive() def build(self): @@ -25,7 +28,7 @@ class base_gcc(spec("common")): with HTTPSession() as http: http.download_file(self.url, self["BUILD_DIR"], self.tarball) - # Exctract the archive + # Extract the archive unpack_archive(self.tarball, self["INSTALL_DIR"], remove_root_dir=True) # Delete the archive diff --git a/specs/gcc.anod b/specs/gcc.anod index da4ae76..703e54f 100644 --- a/specs/gcc.anod +++ b/specs/gcc.anod @@ -30,7 +30,7 @@ class GCC(spec("gh-artifact")): if self.env.target.cpu.name == "x86_64" else "https://github.com/iains/gcc-14-branch/archive/refs/" - + "tags/gcc-14.1-darwin-r0.tar.gz" + + "tags/gcc-14.1-darwin-r1.tar.gz" ) ), self.LocalSourceBuilder(name=patch_name) @@ -140,10 +140,6 @@ class GCC(spec("gh-artifact")): args.append("--disable-libcilkrts") - # Workaround for Xcode 12.5 bug on Intel - # https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100340 - args.append("--without-build-config") - xcode = "/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk" clu = "/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk" From c3910bea70ae3b34744bd4d54c8fae0dc27ccff8 Mon Sep 17 00:00:00 2001 From: Fabien Chouteau Date: Fri, 21 Jun 2024 14:49:29 +0200 Subject: [PATCH 14/20] Enable GNAT cross builds on macos arm --- .github/workflows/macos_arm.yml | 55 +++++++++++++++++++++++++++------ specs/base_gcc.anod | 7 ++--- 2 files changed, 48 insertions(+), 14 deletions(-) diff --git a/.github/workflows/macos_arm.yml b/.github/workflows/macos_arm.yml index 5a2c124..9a16de3 100644 --- a/.github/workflows/macos_arm.yml +++ b/.github/workflows/macos_arm.yml @@ -4,7 +4,7 @@ on: workflow_dispatch: jobs: - gnat_gprbuild: + gnat: name: GNAT macOS runs-on: macos-14 steps: @@ -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 @@ -58,6 +50,51 @@ jobs: path: sbx/*/release_package*/install/* retention-days: 5 + gnat_cross: + strategy: + matrix: + target: ["arm-elf", "riscv64-elf", "avr-elf"] + name: GNAT ${{ matrix.target }}-darwin + needs: gnat + runs-on: macos-14 + steps: + - name: Set Xcode 15.3 + run: sudo xcode-select --switch /Applications/Xcode_15.3.app + + - 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: + python-version: 3.8 + + - name: Install Python dependencies + run: | + python -m pip install --upgrade pip + pip install e3-core==22.1.0 + + - name: Build GNAT ${{ matrix.target }} + run: ./anod build gcc -v --loglevel DEBUG --target=${{ matrix.target }} --enable-cleanup + + - name: Build GDB ${{ matrix.target }} + run: ./anod build gdb -v --loglevel DEBUG --target=${{ matrix.target }} --enable-cleanup + + - name: Package GNAT ${{ matrix.target }} + run: ./anod build release_package --qualifier=package=gnat,do_gh_release --target=${{ matrix.target }} -v --loglevel DEBUG + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # for GitHub CLI tool + + - uses: actions/upload-artifact@v2 + with: + name: release-packages + path: sbx/*/release_package*/install/* + retention-days: 5 why3: diff --git a/specs/base_gcc.anod b/specs/base_gcc.anod index 7ca896c..a931fe5 100644 --- a/specs/base_gcc.anod +++ b/specs/base_gcc.anod @@ -8,7 +8,7 @@ from e3.anod.spec import Anod class base_gcc(spec("common")): @property def version(self): - return "14.1.0-2" + return "14.1.0-3" @property def tarball(self): @@ -16,11 +16,8 @@ class base_gcc(spec("common")): @property def url(self): - # Use Simon's GCC 13.3 compiler on Mac OS X ARM64 for bootstrap - return ("https://github.com/alire-project/GNAT-FSF-builds/releases/download/gnat-%s/%s" \ + return "https://github.com/alire-project/GNAT-FSF-builds/releases/download/gnat-%s/%s" \ % (self.version, self.tarball) - if self.env.target.cpu.name == "x86_64" else - "https://github.com/simonjwright/alire-index.mac/releases/download/toolchain-13.2.1/gcc-13.3.0-aarch64.tar.gz") @Anod.primitive() def build(self): From d4819402109be5d08db3a4e87313559de6341bac Mon Sep 17 00:00:00 2001 From: Fabien Chouteau Date: Fri, 21 Jun 2024 17:40:29 +0200 Subject: [PATCH 15/20] why3, alt-ergo on macOS aarch64: fix branches for 14 release --- .github/workflows/macos_arm.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/macos_arm.yml b/.github/workflows/macos_arm.yml index 9a16de3..0f09772 100644 --- a/.github/workflows/macos_arm.yml +++ b/.github/workflows/macos_arm.yml @@ -101,14 +101,14 @@ jobs: strategy: matrix: ocaml-compiler: - - 4.12.1 + - 4.11.2 runs-on: macos-14 steps: - name: Checkout code 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 @@ -139,7 +139,7 @@ jobs: strategy: matrix: ocaml-compiler: - - 4.12.1 + - "4.11.2" runs-on: macos-14 steps: @@ -147,7 +147,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 From e1435892b90594bfd1224403010cdf2bd508f223 Mon Sep 17 00:00:00 2001 From: Fabien Chouteau Date: Fri, 21 Jun 2024 17:41:06 +0200 Subject: [PATCH 16/20] gcc: select macOS aarch64 fork based on host arch rather than target --- specs/common.anod | 4 ++++ specs/gcc.anod | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/specs/common.anod b/specs/common.anod index aa6eae4..8684842 100644 --- a/specs/common.anod +++ b/specs/common.anod @@ -104,3 +104,7 @@ class Common(Anod): if Env().main_options.enable_cleanup: rm(self["BUILD_DIR"], recursive=True) rm(self["SRC_DIR"], recursive=True) + + @property + def host_is_macos_arm(self): + return self.env.host.os.name == "darwin" and self.env.host.cpu.name == "aarch64" diff --git a/specs/gcc.anod b/specs/gcc.anod index 703e54f..eb8b805 100644 --- a/specs/gcc.anod +++ b/specs/gcc.anod @@ -27,7 +27,7 @@ class GCC(spec("gh-artifact")): url=( "https://ftp.gnu.org/gnu/gcc/gcc-%s/%s" % (self.version, self.tarball) - if self.env.target.cpu.name == "x86_64" + if not self.host_is_macos_arm else "https://github.com/iains/gcc-14-branch/archive/refs/" + "tags/gcc-14.1-darwin-r1.tar.gz" From efd833af7d008af166dfbf951fe429e5f593780e Mon Sep 17 00:00:00 2001 From: Fabien Chouteau Date: Thu, 4 Jul 2024 16:32:11 +0200 Subject: [PATCH 17/20] spark2014: bring back shared libgmp for alt-ergo --- specs/spark2014.anod | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/specs/spark2014.anod b/specs/spark2014.anod index 9cbaf65..5623576 100644 --- a/specs/spark2014.anod +++ b/specs/spark2014.anod @@ -104,6 +104,9 @@ class SPARK2014(spec("common")): Anod.Dependency("why3"), Anod.Dependency("alt-ergo"), Anod.Dependency("gmp"), + Anod.Dependency("gmp", + qualifier="shared_lib", + local_name="gmp_shared"), Anod.Dependency("gprbuild"), Anod.Dependency("gnatcoll"), Anod.Dependency("gnatcoll-bindings"), @@ -167,7 +170,7 @@ class SPARK2014(spec("common")): sync_tree(self.deps["why3"]["INSTALL_DIR"], libexec_spark, delete=False) sync_tree(self.deps["alt-ergo"]["INSTALL_DIR"], libexec_spark, delete=False) sync_tree(self.deps["gprbuild"]["INSTALL_DIR"], libexec_spark, delete=False) - sync_tree(self.deps["gmp"]["INSTALL_DIR"], libexec_spark, delete=False) + sync_tree(self.deps["gmp_shared"]["INSTALL_DIR"], libexec_spark, delete=False) sync_tree(os.path.join(self["SRC_DIR"], "z3"), libexec_spark, delete=False) sync_tree(os.path.join(self["SRC_DIR"], "cvc5"), libexec_spark, delete=False) From 0cb0eb4b150bf71b7c0176bcf36435cc279f8e7f Mon Sep 17 00:00:00 2001 From: Fabien Chouteau Date: Fri, 5 Jul 2024 11:59:46 +0200 Subject: [PATCH 18/20] Update libadalang to 24.0 --- specs/langkit.anod | 75 ------------------------------------------- specs/libadalang.anod | 8 +++-- specs/libgpr2.anod | 1 - 3 files changed, 5 insertions(+), 79 deletions(-) delete mode 100644 specs/langkit.anod diff --git a/specs/langkit.anod b/specs/langkit.anod deleted file mode 100644 index 9b7a657..0000000 --- a/specs/langkit.anod +++ /dev/null @@ -1,75 +0,0 @@ -from e3.anod.spec import Anod -from e3.anod.loader import spec - -import os - - -class Langkit(spec("common")): - @property - def version(self): - return "22.0.0" - - @property - def tarball(self): - return "langkit-%s.tar.gz" % self.version - - @property - def source_pkg_build(self): - return [ - self.HTTPSSourceBuilder( - name=self.tarball, - url="https://github.com/AdaCore/langkit/releases/download/v%s/langkit_support-%s.tar.gz" - % (self.version, 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.Dependency("libgpr", track=True), - Anod.Dependency("gnatcoll", track=True), - Anod.Dependency("gnatcoll-bindings", track=True), - Anod.Dependency("xmlada", track=True), - ] - - @Anod.primitive() - def build(self): - for m in self.deps: - self.deps[m].setenv() - - gpr_file = os.path.join(self["SRC_DIR"], "langkit_support.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, - "-XBUILD_MODE=" + build_mode, - "-XLIBRARY_TYPE=" + library_type, - ) - - self.shell( - "gprinstall", - "-f", - "-p", - "-P", - gpr_file, - "--relocate-build-tree=" + library_type, - "--prefix=" + self["INSTALL_DIR"], - "-XBUILD_MODE=" + build_mode, - "-XLIBRARY_TYPE=" + library_type, - "--build-var=LIBRARY_TYPE", - "--build-name=" + library_type, - ) - - self.clean() diff --git a/specs/libadalang.anod b/specs/libadalang.anod index 6ba5d67..d328e3a 100644 --- a/specs/libadalang.anod +++ b/specs/libadalang.anod @@ -4,10 +4,10 @@ from e3.anod.loader import spec import os -class Langkit(spec("common")): +class Libadalang(spec("common")): @property def version(self): - return "22.0.0" + return "24.0.0" @property def tarball(self): @@ -33,9 +33,11 @@ class Langkit(spec("common")): Anod.Dependency("base_gcc", track=True), Anod.Dependency("gprbuild", track=True), Anod.Dependency("libgpr", track=True), + Anod.Dependency("adasat", track=True), + Anod.Dependency("libgpr2"), Anod.Dependency("gnatcoll", track=True), Anod.Dependency("gnatcoll-bindings", track=True), - Anod.Dependency("langkit", track=True), + Anod.Dependency("langkit_support", track=True), Anod.Dependency("xmlada", track=True), ] diff --git a/specs/libgpr2.anod b/specs/libgpr2.anod index 3542243..830326f 100644 --- a/specs/libgpr2.anod +++ b/specs/libgpr2.anod @@ -74,7 +74,6 @@ class LibGPR2(spec("common")): Anod.Dependency("gnatcoll", track=True), Anod.Dependency("gnatcoll-bindings", track=True), Anod.Dependency("langkit_support", track=True), - Anod.Dependency("libadalang", track=True), Anod.Dependency("gprconfig_kb", require="source_pkg", track=True), ] From 1443b47d80c4b994cc00eed15cf31060dd5d8099 Mon Sep 17 00:00:00 2001 From: Fabien Chouteau Date: Fri, 5 Jul 2024 12:00:26 +0200 Subject: [PATCH 19/20] spark2014: shared gmp should not be in the environment for builds We just need to install it. --- specs/spark2014.anod | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/specs/spark2014.anod b/specs/spark2014.anod index 5623576..b2ead9d 100644 --- a/specs/spark2014.anod +++ b/specs/spark2014.anod @@ -114,6 +114,7 @@ class SPARK2014(spec("common")): Anod.Dependency("libgpr2", qualifier="next"), Anod.Dependency("libgpr"), Anod.Dependency("langkit_support"), + Anod.Dependency("adasat", track=True), Anod.Dependency("libadalang"), ] @@ -135,7 +136,8 @@ class SPARK2014(spec("common")): jobs=self.jobs ) for dep in self.deps: - self.deps[dep].setenv() + if dep not in ["gmp_shared"]: + self.deps[dep].setenv() make("all-nightly", jobs=1) self.install() From 461769a7e843c2655b385e38e525a5773e5c9b8a Mon Sep 17 00:00:00 2001 From: Fabien Chouteau Date: Tue, 9 Jul 2024 15:25:44 +0200 Subject: [PATCH 20/20] GNATprove wavefront --- .github/workflows/linux.yml | 133 +------------------------ .github/workflows/macos.yml | 130 +----------------------- .github/workflows/windows.yml | 181 +--------------------------------- specs/gnatcoll-bindings.anod | 4 +- specs/gnatcoll.anod | 4 +- specs/gprconfig_kb.anod | 5 +- specs/libgpr2.anod | 20 ++-- specs/release_package.anod | 3 +- specs/spark2014.anod | 12 +-- 9 files changed, 30 insertions(+), 462 deletions(-) diff --git a/.github/workflows/linux.yml b/.github/workflows/linux.yml index 64855ab..7111ce9 100644 --- a/.github/workflows/linux.yml +++ b/.github/workflows/linux.yml @@ -7,135 +7,6 @@ on: jobs: - gnat: - name: GNAT Linux - runs-on: ubuntu-20.04 - steps: - - name: Checkout Project - uses: actions/checkout@v2 - - - name: Set up Python - uses: actions/setup-python@v2 - with: - python-version: 3.8 - - - name: Install Python dependencies - run: | - python -m pip install --upgrade pip - pip install e3-core==22.1.0 - - - name: Install Ada dependencies - run: sudo apt-get install gnat bison - - - name: Build GNAT native - run: ./anod build gcc -v --loglevel DEBUG --enable-cleanup - - - name: Build GDB - run: ./anod build gdb -v --loglevel DEBUG --enable-cleanup - - - name: Package GNAT - run: ./anod build release_package --qualifier=package=gnat,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 - path: out_artifacts/* - retention-days: 1 - - - uses: actions/upload-artifact@v2 - with: - name: release-packages - path: sbx/*/release_package*/install/* - retention-days: 5 - - - - gprbuild_gnatcov: - name: GPRbuild and GNATcov - runs-on: ubuntu-20.04 - steps: - - name: Checkout Project - uses: actions/checkout@v2 - - - name: Set up Python - uses: actions/setup-python@v2 - with: - python-version: 3.8 - - - name: Install Python dependencies - run: | - 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 - - - name: Package GNATcov - run: ./anod build release_package --qualifier=package=gnatcov,do_gh_release -v --loglevel DEBUG - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # for GitHub CLI tool - - - uses: actions/upload-artifact@v2 - with: - name: release-packages - path: sbx/*/release_package*/install/* - retention-days: 5 - - - - gnat_cross: - strategy: - matrix: - target: ["arm-elf", "riscv64-elf", "avr-elf"] - name: GNAT ${{ matrix.target }}-linux - needs: gnat - 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: - python-version: 3.8 - - - name: Install Python dependencies - run: | - python -m pip install --upgrade pip - pip install e3-core==22.1.0 - - - name: Build GNAT ${{ matrix.target }} - run: ./anod build gcc -v --loglevel DEBUG --target=${{ matrix.target }} --enable-cleanup - - - name: Build GDB ${{ matrix.target }} - run: ./anod build gdb -v --loglevel DEBUG --target=${{ matrix.target }} --enable-cleanup - - - name: Package GNAT ${{ matrix.target }} - run: ./anod build release_package --qualifier=package=gnat,do_gh_release --target=${{ matrix.target }} -v --loglevel DEBUG - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # for GitHub CLI tool - - - uses: actions/upload-artifact@v2 - with: - name: release-packages - path: sbx/*/release_package*/install/* - retention-days: 5 - why3: strategy: @@ -149,7 +20,7 @@ jobs: uses: actions/checkout@v2 with: repository: 'adacore/why3' - ref: 'fsf-14' + ref: 'fsf' - name: Use Setup OCaml {{ matrix.ocaml-version }} uses: ocaml/setup-ocaml@v2 @@ -187,7 +58,7 @@ jobs: uses: actions/checkout@v2 with: repository: 'adacore/alt-ergo' - ref: 'fsf-14' + ref: 'fsf' - name: Use Setup OCaml {{ matrix.ocaml-version }} uses: ocaml/setup-ocaml@v2 diff --git a/.github/workflows/macos.yml b/.github/workflows/macos.yml index 259a4c4..bafb313 100644 --- a/.github/workflows/macos.yml +++ b/.github/workflows/macos.yml @@ -7,132 +7,6 @@ on: jobs: - gnat: - name: GNAT macOS - runs-on: macos-12 - steps: - - name: Checkout Project - uses: actions/checkout@v2 - - - name: Set up Python - uses: actions/setup-python@v2 - with: - python-version: 3.8 - - - name: Install Python dependencies - run: | - python -m pip install --upgrade pip - pip install e3-core==22.1.0 - - - name: Build GNAT native - run: ./anod build gcc -v --loglevel DEBUG --enable-cleanup - - - name: Build GDB - run: ./anod build gdb -v --loglevel DEBUG --enable-cleanup - - - name: Package GNAT - run: ./anod build release_package --qualifier=package=gnat,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 - path: out_artifacts/* - retention-days: 1 - - - uses: actions/upload-artifact@v2 - with: - name: release-packages - path: sbx/*/release_package*/install/* - retention-days: 5 - - - gprbuild_gnatcov: - name: GPRbuild and GNATcov - runs-on: macos-12 - steps: - - name: Checkout Project - uses: actions/checkout@v2 - - - name: Set up Python - uses: actions/setup-python@v2 - with: - python-version: 3.8 - - - name: Install Python dependencies - run: | - 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 - - - name: Package GNATcov - run: ./anod build release_package --qualifier=package=gnatcov,do_gh_release -v --loglevel DEBUG - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # for GitHub CLI tool - - - uses: actions/upload-artifact@v2 - with: - name: release-packages - path: sbx/*/release_package*/install/* - retention-days: 5 - - - - gnat_cross: - strategy: - matrix: - target: ["arm-elf", "riscv64-elf", "avr-elf"] - name: GNAT ${{ matrix.target }}-darwin - needs: gnat - 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: - python-version: 3.8 - - - name: Install Python dependencies - run: | - python -m pip install --upgrade pip - pip install e3-core==22.1.0 - - - name: Build GNAT ${{ matrix.target }} - run: ./anod build gcc -v --loglevel DEBUG --target=${{ matrix.target }} --enable-cleanup - - - name: Build GDB ${{ matrix.target }} - run: ./anod build gdb -v --loglevel DEBUG --target=${{ matrix.target }} --enable-cleanup - - - name: Package GNAT ${{ matrix.target }} - run: ./anod build release_package --qualifier=package=gnat,do_gh_release --target=${{ matrix.target }} -v --loglevel DEBUG - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # for GitHub CLI tool - - - uses: actions/upload-artifact@v2 - with: - name: release-packages - path: sbx/*/release_package*/install/* - retention-days: 5 - why3: strategy: @@ -145,7 +19,7 @@ jobs: uses: actions/checkout@v2 with: repository: 'adacore/why3' - ref: 'fsf-14' + ref: 'fsf' - name: Use Setup OCaml {{ matrix.ocaml-version }} uses: ocaml/setup-ocaml@v2 @@ -184,7 +58,7 @@ jobs: uses: actions/checkout@v2 with: repository: 'adacore/alt-ergo' - ref: 'fsf-14' + ref: 'fsf' - name: Use Setup OCaml {{ matrix.ocaml-version }} uses: ocaml/setup-ocaml@v2 diff --git a/.github/workflows/windows.yml b/.github/workflows/windows.yml index da0c97b..3ed5ee2 100644 --- a/.github/workflows/windows.yml +++ b/.github/workflows/windows.yml @@ -6,183 +6,6 @@ on: pull_request: jobs: - gnat: - name: GNAT Windows - runs-on: windows-2019 - env: - CONFIG_SHELL: /bin/bash - defaults: - run: - shell: msys2 {0} - steps: - - name: Checkout Project - uses: actions/checkout@v2 - - - name: Install msys2 - uses: msys2/setup-msys2@v2 - with: - install: >- - base-devel - git - mingw-w64-x86_64-github-cli - mingw-w64-x86_64-toolchain - mingw-w64-x86_64-python - mingw-w64-x86_64-python-pip - mingw-w64-x86_64-python-psutil - - name: Install Python dependencies - run: | - python -m pip install --upgrade pip - pip install e3-core==22.1.0 - - - name: Prepare msys2 build setup - # 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 /aaa - - - name: Build GNAT native - run: mount C:/aaa /aaa && cd /aaa/GNAT-FSF-builds && python3 ./anod build gcc -v --loglevel DEBUG --enable-cleanup - - - name: Build GDB - run: mount C:/aaa /aaa && cd /aaa/GNAT-FSF-builds && python3 ./anod build gdb -v --loglevel DEBUG --enable-cleanup - - - name: Package GNAT - run: mount C:/aaa /aaa && cd /aaa/GNAT-FSF-builds && python3 ./anod build release_package --qualifier=package=gnat,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 - path: C:/aaa/GNAT-FSF-builds/out_artifacts/* - retention-days: 1 - - - uses: actions/upload-artifact@v2 - with: - name: release-packages - path: C:/aaa/GNAT-FSF-builds/sbx/*/release_package*/install/* - retention-days: 5 - - - - gprbuild_gnatcov: - name: GPRbuild and GNATcov - runs-on: windows-2019 - env: - CONFIG_SHELL: /bin/bash - defaults: - run: - shell: msys2 {0} - steps: - - name: Checkout Project - uses: actions/checkout@v2 - - - name: Install msys2 - uses: msys2/setup-msys2@v2 - with: - install: >- - base-devel - git - mingw-w64-x86_64-toolchain - mingw-w64-x86_64-github-cli - mingw-w64-x86_64-python - mingw-w64-x86_64-python-pip - mingw-w64-x86_64-python-psutil - - name: Install Python dependencies - run: | - python -m pip install --upgrade pip - pip install e3-core==22.1.0 - - - name: Prepare msys2 build setup - # 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 - - - - 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 - run: mount C:/aaa /aaa && cd /aaa/GNAT-FSF-builds && python3 ./anod build gnatcov -v --loglevel DEBUG --enable-cleanup - - - name: Package GNATcov - run: mount C:/aaa /aaa && cd /aaa/GNAT-FSF-builds && python3 ./anod build release_package --qualifier=package=gnatcov,do_gh_release -v --loglevel DEBUG - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # for GitHub CLI tool - - - uses: actions/upload-artifact@v2 - with: - name: release-packages - path: C:/aaa/GNAT-FSF-builds/sbx/*/release_package*/install/* - retention-days: 5 - - - - - - - gnat_cross: - strategy: - matrix: - target: ["arm-elf", "riscv64-elf", "avr-elf"] - name: GNAT ${{ matrix.target }}-windows - needs: gnat - runs-on: windows-2019 - env: - CONFIG_SHELL: /bin/bash - defaults: - run: - shell: msys2 {0} - steps: - - name: Checkout Project - uses: actions/checkout@v2 - - - name: Install msys2 - uses: msys2/setup-msys2@v2 - with: - install: >- - base-devel - git - mingw-w64-x86_64-toolchain - mingw-w64-x86_64-github-cli - mingw-w64-x86_64-python - mingw-w64-x86_64-python-pip - mingw-w64-x86_64-python-psutil - - name: Install Python dependencies - run: | - python -m pip install --upgrade pip - pip install e3-core==22.1.0 - - - name: Prepare msys2 build setup - # 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 /aaa - - - uses: actions/download-artifact@v2 - with: - name: anod-artifacts - path: C:/aaa/GNAT-FSF-builds/in_artifacts/ - - - - name: Build GNAT ${{ matrix.target }} - run: mount C:/aaa /aaa && cd /aaa/GNAT-FSF-builds && python3 ./anod build gcc -v --loglevel DEBUG --target=${{ matrix.target }} --enable-cleanup - - - name: Build GDB ${{ matrix.target }} - run: mount C:/aaa /aaa && cd /aaa/GNAT-FSF-builds && python3 ./anod build gdb -v --loglevel DEBUG --target=${{ matrix.target }} --enable-cleanup - - - name: Package GNAT ${{ matrix.target }} - run: mount C:/aaa /aaa && cd /aaa/GNAT-FSF-builds && python3 ./anod build release_package --qualifier=package=gnat,do_gh_release --target=${{ matrix.target }} -v --loglevel DEBUG - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # for GitHub CLI tool - - - uses: actions/upload-artifact@v2 - with: - name: release-packages - path: C:/aaa/GNAT-FSF-builds/sbx/*/release_package*/install/* - retention-days: 5 - why3: strategy: @@ -195,7 +18,7 @@ jobs: uses: actions/checkout@v2 with: repository: 'adacore/why3' - ref: 'fsf-14' + ref: 'fsf' - name: Use Setup OCaml v1 ${{ matrix.ocaml-version }} uses: ocaml/setup-ocaml@v2 @@ -233,7 +56,7 @@ jobs: uses: actions/checkout@v2 with: repository: 'adacore/alt-ergo' - ref: 'fsf-14' + ref: 'fsf' - name: Use Setup OCaml {{ matrix.ocaml-version }} uses: ocaml/setup-ocaml@v2 diff --git a/specs/gnatcoll-bindings.anod b/specs/gnatcoll-bindings.anod index 8fe4422..fbba3c3 100644 --- a/specs/gnatcoll-bindings.anod +++ b/specs/gnatcoll-bindings.anod @@ -8,7 +8,7 @@ import os class GNATcollBindings(spec("common")): @property def version(self): - return "24.0.0" + return "master" @property def tarball(self): @@ -19,7 +19,7 @@ class GNATcollBindings(spec("common")): return [ self.HTTPSSourceBuilder( name=self.tarball, - url="https://github.com/AdaCore/gnatcoll-bindings/archive/v%s.tar.gz" + url="https://github.com/AdaCore/gnatcoll-bindings/tarball/%s" % self.version, ) ] diff --git a/specs/gnatcoll.anod b/specs/gnatcoll.anod index 88e17f4..2e4928e 100644 --- a/specs/gnatcoll.anod +++ b/specs/gnatcoll.anod @@ -9,7 +9,7 @@ import os class GNATcoll(spec("common")): @property def version(self): - return "24.0.0" + return "master" @property def tarball(self): @@ -20,7 +20,7 @@ class GNATcoll(spec("common")): return [ self.HTTPSSourceBuilder( name=self.tarball, - url="https://github.com/AdaCore/gnatcoll-core/archive/v%s.tar.gz" + url="https://github.com/AdaCore/gnatcoll-core/tarball/%s" % self.version, ) ] diff --git a/specs/gprconfig_kb.anod b/specs/gprconfig_kb.anod index 16d9a14..fdac723 100644 --- a/specs/gprconfig_kb.anod +++ b/specs/gprconfig_kb.anod @@ -5,7 +5,7 @@ from e3.anod.loader import spec class GPRconfig_KB(spec("common")): @property def version(self): - return "24.0.0" + return "master" @property def tarball(self): @@ -16,8 +16,7 @@ class GPRconfig_KB(spec("common")): return [ self.HTTPSSourceBuilder( name=self.tarball, - url="https://github.com/AdaCore/gprconfig_kb/archive/v%s/%s" - % (self.version, self.tarball), + url="https://github.com/AdaCore/gprconfig_kb/tarball/%s" % self.version, ) ] diff --git a/specs/libgpr2.anod b/specs/libgpr2.anod index 830326f..04d0fb1 100644 --- a/specs/libgpr2.anod +++ b/specs/libgpr2.anod @@ -16,21 +16,21 @@ class LibGPR2(spec("common")): @property def version(self): if self.is_next: - return "24.2.0-next" + return "next" else: - return "24.0.0" + return "master" @property def lk_version(self): - return "24.0.0" + return "master" @property def tarball(self): - return "gpr-%s.tar.gz" % self.version + return "gpr2-%s.tar.gz" % self.version @property def lk_tarball(self): - return "langkit-py-%s.tar.gz" % self.lk_version + return "langkit-%s.tar.gz" % self.lk_version @property def build_space_name(self): @@ -44,13 +44,13 @@ class LibGPR2(spec("common")): return [ self.HTTPSSourceBuilder( name=self.tarball, - url="https://github.com/AdaCore/gpr/archive/v%s.tar.gz" - % ( self.version), + url="https://github.com/AdaCore/gpr/tarball/%s" + % (self.version), ), self.HTTPSSourceBuilder( name=self.lk_tarball, - url="https://github.com/AdaCore/langkit/archive/v%s.tar.gz" - % self.lk_version, + url="https://github.com/AdaCore/langkit/tarball/%s" % + (self.lk_version), ) ] @@ -106,7 +106,7 @@ class LibGPR2(spec("common")): if m != "gprconfig_kb": self.deps[m].setenv() - self.update_version() + # self.update_version() # The SOURCE_DIR detection doesn't work on macOS, so we replace it with # an absolute path. diff --git a/specs/release_package.anod b/specs/release_package.anod index 0e2925c..f734733 100644 --- a/specs/release_package.anod +++ b/specs/release_package.anod @@ -6,6 +6,7 @@ from e3.archive import create_archive from e3.hash import sha256 from e3.os.process import Run +from datetime import datetime import os valid_packages = ["gprbuild", "gnat", "gnatcov", "gnatprove"] @@ -51,7 +52,7 @@ class ReleasePackage(spec("common")): elif package == "gnatcov": return "1" elif package == "gnatprove": - return "1" + return datetime.today().strftime('%Y-%m-%d') elif package == "gnat": if self.env.target.triplet == "arm-eabi": return "3" diff --git a/specs/spark2014.anod b/specs/spark2014.anod index b2ead9d..ca22904 100644 --- a/specs/spark2014.anod +++ b/specs/spark2014.anod @@ -10,7 +10,7 @@ import os class SPARK2014(spec("common")): @property def version(self): - return "14.1.0" + return "wavefront" @property def tarball(self): @@ -25,7 +25,7 @@ class SPARK2014(spec("common")): @property def gcc_tarball(self): - return "gcc-%s.tar.gz" % self.version + return "master.tar.gz" @property def sparklib_tarball(self): @@ -62,12 +62,12 @@ class SPARK2014(spec("common")): return [ self.HTTPSSourceBuilder( name=self.gcc_tarball, - url="https://ftp.gnu.org/gnu/gcc/gcc-%s/%s" - % (self.version, self.gcc_tarball), + url="https://github.com/gcc-mirror/gcc/archive/refs/heads/%s" + % (self.gcc_tarball), ), self.HTTPSSourceBuilder( name=self.tarball, - url="https://github.com/adacore/spark2014/tarball/fsf-14", + url="https://github.com/adacore/spark2014/tarball/fsf", ), self.HTTPSSourceBuilder( name=self.sparklib_tarball, @@ -114,7 +114,7 @@ class SPARK2014(spec("common")): Anod.Dependency("libgpr2", qualifier="next"), Anod.Dependency("libgpr"), Anod.Dependency("langkit_support"), - Anod.Dependency("adasat", track=True), + Anod.Dependency("adasat"), Anod.Dependency("libadalang"), ]