Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Gprbuild 24 #73

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 26 additions & 2 deletions .github/workflows/linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,8 @@ jobs:



gprbuild_gnatcov:
name: GPRbuild and GNATcov
gprbuild:
name: GPRbuild
runs-on: ubuntu-20.04
steps:
- name: Checkout Project
Expand All @@ -77,6 +77,30 @@ jobs:
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


gnatcov:
name: 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 GNATcov
run: ./anod build gnatcov -v --loglevel DEBUG --enable-cleanup

Expand Down
28 changes: 25 additions & 3 deletions .github/workflows/macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,8 @@ jobs:
retention-days: 5


gprbuild_gnatcov:
name: GPRbuild and GNATcov
gprbuild:
name: GPRbuild
runs-on: macos-12
steps:
- name: Checkout Project
Expand All @@ -73,6 +73,29 @@ jobs:
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


gnatcov:
name: 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 GNATcov
run: ./anod build gnatcov -v --loglevel DEBUG --enable-cleanup
Expand All @@ -89,7 +112,6 @@ jobs:
retention-days: 5



gnat_cross:
strategy:
matrix:
Expand Down
34 changes: 34 additions & 0 deletions .github/workflows/macos_arm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,40 @@ jobs:
path: /tmp/alt-ergo-install


gprbuild:
name: GPRbuild
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

- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: 3.10.11

- 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

- uses: actions/upload-artifact@v2
with:
name: release-packages
path: sbx/*/release_package*/install/*
retention-days: 5


spark:
name: SPARK
Expand Down
47 changes: 41 additions & 6 deletions .github/workflows/windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,8 @@ jobs:



gprbuild_gnatcov:
name: GPRbuild and GNATcov
gprbuild:
name: GPRbuild
runs-on: windows-2019
env:
CONFIG_SHELL: /bin/bash
Expand Down Expand Up @@ -104,6 +104,45 @@ jobs:
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



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 GNATcov
run: mount C:/aaa /aaa && cd /aaa/GNAT-FSF-builds && python3 ./anod build gnatcov -v --loglevel DEBUG --enable-cleanup
Expand All @@ -120,10 +159,6 @@ jobs:
retention-days: 5






gnat_cross:
strategy:
matrix:
Expand Down
71 changes: 53 additions & 18 deletions specs/binutils.anod
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,17 @@ from e3.anod.loader import spec


class Binutils(spec("common")):

@property
def for_gnatcov (self):
return "gnatcov" in self.parsed_qualifier

@property
def version(self):
return "2.42"
if self.for_gnatcov:
return "2.40"
else:
return "2.42"

@property
def tarball(self):
Expand Down Expand Up @@ -41,43 +49,70 @@ class Binutils(spec("common")):

return deps

@property
def build_space_name(self):
if self.for_gnatcov:
return "%s-gnatcov" % self.name
else:
return self.name

def merge(self, prefix):
sync_tree(self["INSTALL_DIR"], prefix, delete=False)

@Anod.primitive()
def build(self):

for m in self.deps:
self.deps[m].setenv()

configure = Configure(self)
configure.add("--prefix=%s" % unixpath(self["INSTALL_DIR"]))
configure.add(
"--disable-nls",
"--disable-shared",
"--disable-werror",
"--with-zlib",
"--without-zstd",
"--disable-compressed-debug-sections",
"--disable-separate-code",
"--disable-gdb",
"--disable-sim",
"--disable-libquadmath",
"--disable-readline",
)

# For embedded only?
configure.add("--enable-multilib")

if self.for_gnatcov:
configure.add("--disable-ld",
"--disable-gdb",
"--disable-gdbserver",
"--disable-libquadmath",
"--disable-nls",
"--disable-readline",
"--disable-sim",
"--disable-werror",
"--enable-gprofng=no",
"--with-static-standard-libraries",
"--enable-targets=all")
# For embedded only?
configure.add("--enable-multilib")

else:
configure.add(
"--disable-nls",
"--disable-shared",
"--disable-werror",
"--with-zlib",
"--without-zstd",
"--disable-compressed-debug-sections",
"--disable-separate-code",
"--disable-gdb",
"--disable-sim",
"--disable-libquadmath",
"--disable-readline",
)

for m in ("mpfr", "gmp", "mpc", "isl"):
configure.add("--with-%s=%s" % (m, unixpath(self.deps[m]["INSTALL_DIR"])))

configure()

make = Make(self)

if self.for_gnatcov:
make.set_var("CFLAGS", " -fcommon")
make.set_var("CXXFLAGS", " -fcommon")
make.set_var("LDFLAGS", " -fcommon")

make()
make("install")


# https://github.com/msys2/MINGW-packages/issues/7890
if self.env.build.os.name == "windows":
# for some reason 'rm' doesn't seem to work, so we are moving the file to the build dir
Expand Down
Loading
Loading