From: Mark Wielaard <mark@klomp.org>
To: buildbot@sourceware.org
Cc: Mark Wielaard <mark@klomp.org>
Subject: [PATCH] Add mingw container and gcc builder
Date: Mon, 24 Apr 2023 00:46:24 +0200 [thread overview]
Message-ID: <20230423224624.1208235-1-mark@klomp.org> (raw)
---
builder/containers/Containerfile-fedora-mingw | 35 +++++++++++++++
builder/master.cfg | 45 +++++++++++++++++++
2 files changed, 80 insertions(+)
create mode 100644 builder/containers/Containerfile-fedora-mingw
diff --git a/builder/containers/Containerfile-fedora-mingw b/builder/containers/Containerfile-fedora-mingw
new file mode 100644
index 0000000..1bb8657
--- /dev/null
+++ b/builder/containers/Containerfile-fedora-mingw
@@ -0,0 +1,35 @@
+# Setup the (minimal) image, upgrade and install all devel packages
+FROM registry.fedoraproject.org/fedora:latest
+RUN dnf upgrade -y && \
+ dnf install -y \
+ ccache gcc gcc-c++ gcc-gfortran make texinfo autogen \
+ automake autoconf libtool git dejagnu file tar \
+ isl-devel libmpc-devel mpfr-devel gmp-devel \
+ patch util-linux diffutils sharutils coreutils findutils \
+ gettext-devel bison flex expat-devel \
+ bzip2 bzip2-devel xz xz-devel gzip zlib-devel zstd libzstd-devel \
+ mingw64-filesystem mingw64-crt mingw64-winpthreads mingw64-libgcc \
+ mingw64-bzip2 mingw64-headers mingw64-zlib mingw64-cpp \
+ mingw64-binutils mingw64-gcc mingw64-gcc-c++ mingw64-libzip \
+ mingw64-termcap mingw64-libstdc++ mingw64-gmp mingw64-mpfr \
+ mingw64-readline mingw64-zstd mingw64-xz-libs mingw64-libgomp \
+ mingw64-libffi mingw64-gcc-gfortran mingw64-expat mingw64-win-iconv \
+ wget buildbot-worker && \
+ dnf clean all
+
+# Setup user with same id as host user id.
+RUN adduser -u 1001 -U -d /home/builder -m builder
+
+# Set image specific environment variables used by bb-start.sh
+ENV IMAGE_NAME=fedora-mingw64
+ENV CCACHE_LIBDIR=/usr/lib64/ccache
+
+# Put bb-start.sh script in homedir and make it executable
+RUN wget -O /home/builder/bb-start.sh \
+ 'https://sourceware.org/git/?p=builder.git;a=blob_plain;f=builder/containers/bb-start.sh' \
+ && chmod 755 /home/builder/bb-start.sh
+
+# And now run the script
+USER builder
+WORKDIR /home/builder
+ENTRYPOINT /home/builder/bb-start.sh
diff --git a/builder/master.cfg b/builder/master.cfg
index 278dc98..cb2ee6c 100644
--- a/builder/master.cfg
+++ b/builder/master.cfg
@@ -954,6 +954,7 @@ gcc_build_scheduler = schedulers.SingleBranchScheduler(
branch="master"),
reason="gcc project master branch update",
builderNames=["gcc-fedora-x86_64",
+ "gcc-fedora-mingw",
"gcc-fedora-arm64",
"gcc-gentoo-sparc",
"gcc-rawhide-x86_64",
@@ -3258,6 +3259,28 @@ gcc_build_configure_step = steps.Configure(
haltOnFailure=True,
logfiles={"config.log": "config.log"})
+gcc_mingw_configure_step = steps.Configure(
+ workdir='gcc-build',
+ command=['../gcc/configure',
+ '--with-gnu-as',
+ '--with-gnu-ld',
+ '--without-newlib',
+ '--disable-multilib',
+ '--disable-plugin',
+ '--with-system-zlib',
+ '--disable-nls',
+ '--without-included-gettext',
+ '--disable-win32-registry',
+ '--enable-languages=c,c++,fortran,rust',
+ '--enable-threads=posix',
+ '--with-sysroot=/usr/x86_64-w64-mingw32/sys-root',
+ '--enable-libstdcxx-backtrace',
+ '--disable-libstdcxx-pch',
+ '--target=x86_64-w64-mingw32'],
+ name='configure',
+ haltOnFailure=True,
+ logfiles={"config.log": "config.log"})
+
gcc_build_make_clean_step = steps.ShellCommand(
workdir='gcc-build',
command=["make", "clean"],
@@ -3308,6 +3331,28 @@ gcc_build_factory.addStep(steps.Compile(
haltOnFailure=True))
gcc_build_factory.addStep(gcc_rm_build_step)
+gcc_mingw_factory = util.BuildFactory()
+gcc_mingw_factory.addStep(gcc_build_git_step)
+gcc_mingw_factory.addStep(gcc_rm_build_step)
+gcc_mingw_factory.addStep(gcc_mingw_configure_step)
+gcc_mingw_factory.addStep(steps.Compile(
+ workdir='gcc-build',
+ command=addOutputSync.withArgs(['make',
+ util.Interpolate('-j%(prop:ncpus)s')]),
+ name='make',
+ haltOnFailure=True))
+gcc_mingw_factory.addStep(gcc_rm_build_step)
+
+gcc_fedora_mingw_builder = util.BuilderConfig(
+ name="gcc-fedora-mingw",
+ collapseRequests=True,
+ properties={'container-file':
+ readContainerFile('fedora-mingw')},
+ workernames=vm_workers,
+ tags=["gcc", "fedora", "mingw"],
+ factory=gcc_mingw_factory)
+c['builders'].append(gcc_fedora_mingw_builder)
+
gcc_fedora_x86_64_builder = util.BuilderConfig(
name="gcc-fedora-x86_64",
collapseRequests=True,
--
2.31.1
reply other threads:[~2023-04-23 22:46 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20230423224624.1208235-1-mark@klomp.org \
--to=mark@klomp.org \
--cc=buildbot@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).