This adds a check-debian.yaml file which will run various tests under
Debian and Fedora for new merge requests.

       * CONTRIBUTING: Explain how to contribute through the forge.
       * .forgejo/workflows/check-debian.yaml: New Debian based workflow.
       * .forgejo/workflows/check-fedora.yaml: New Fedora based workflow.

Signed-off-by: Mark Wielaard <[email protected]>
---

This elfutils patch is also the following merge request on the forge:
https://forge.sourceware.org/elfutils/elfutils/pulls/2
Which immediately shows how the action workflows work.

I renamed the repo from elfutils-TEST to elfutils because I think
things are too confusing otherwise. There is already a elfutils-mirror
which is an automatic mirror of the "real" git repo. The other can be
synced with a button or we can instruct the bot to do it.

CONTRIBUTING now contains a little blurb on how to register on the
forge, but I still need to make it so that anybody can register. After
that someone will need a mentor/sponsor to add them as collaborator
(with just read permission) and approve the checks to run for them.

We still need to add/configure the bot so you can create a /submit
request to be send to the elfutils-devel mailinglist for real review.

 .forgejo/workflows/check-debian.yaml | 42 +++++++++++++++++++++++++
 .forgejo/workflows/check-fedora.yaml | 47 ++++++++++++++++++++++++++++
 CONTRIBUTING                         |  7 +++++
 3 files changed, 96 insertions(+)
 create mode 100644 .forgejo/workflows/check-debian.yaml
 create mode 100644 .forgejo/workflows/check-fedora.yaml

diff --git a/.forgejo/workflows/check-debian.yaml 
b/.forgejo/workflows/check-debian.yaml
new file mode 100644
index 000000000000..1dabe8076047
--- /dev/null
+++ b/.forgejo/workflows/check-debian.yaml
@@ -0,0 +1,42 @@
+name: debian-build-tests
+
+on:
+  pull_request:
+    types: [opened, synchronized, reopened]
+
+jobs:
+  check:
+    runs-on: sourceware-debian-runner
+    steps:
+      - name: setup packages
+        run: |
+          apt-get update
+          apt-get upgrade -y -q
+          apt-get -y -q=2 install binutils tar xz-utils make libc6-dev gcc g++ 
coreutils git autoconf automake autopoint lsb-release bzip2 zlib1g-dev 
zlib1g-dev:native libbz2-dev liblzma-dev libzstd-dev zstd m4 gettext gawk 
gcc-multilib flex bison pkgconf procps libarchive-tools curl cpio rpm2cpio 
iproute2 socat jq fish libarchive-dev libjson-c-dev libmicrohttpd-dev 
libcurl4-gnutls-dev libsqlite3-dev valgrind libubsan1
+
+      - name: checkout git
+        run: |
+          git clone ${FORGEJO_SERVER_URL}/${FORGEJO_REPOSITORY} .
+          git fetch origin ${FORGEJO_REF}:${FORGEJO_REF}
+          git checkout ${FORGEJO_REF}
+
+      - name: autoreconf and configure
+        run: |
+          autoreconf -f -i
+          ./configure --enable-maintainer-mode
+
+      - name: make
+        run: make -j$(nproc)
+
+      - name: make check
+        run: make check -j$(nproc) || (cat tests/test-suite.log; false)
+
+      - name: make distcheck
+        run: make distcheck -j$(nproc)
+
+      - name: valgrind and undefined sanitizer
+        run: |
+          make clean
+          ./configure --enable-maintainer-mode --enable-valgrind 
--enable-sanitize-undefined
+          make -j$(nproc)
+          make check -j$(nproc) || (cat tests/test-suite.log; false)
diff --git a/.forgejo/workflows/check-fedora.yaml 
b/.forgejo/workflows/check-fedora.yaml
new file mode 100644
index 000000000000..0a87fc21a5a2
--- /dev/null
+++ b/.forgejo/workflows/check-fedora.yaml
@@ -0,0 +1,47 @@
+name: fedora-build-tests
+
+on:
+  pull_request:
+    types: [opened, synchronized, reopened]
+
+jobs:
+  check:
+    runs-on: sourceware-fedora-runner
+    steps:
+      - name: setup packages
+        run: |
+          yum upgrade -y
+          yum install -y binutils file tar xz-devel make gcc gcc-g++ coreutils 
git autoconf automake gettext-devel lsb-release bzip2 zlib-devel bzip2-devel 
libzstd-devel zstd m4 gettext gawk flex bison pkgconf procps bsdtar curl cpio 
rpm rpm-devel ima-evm-utils-devel openssl-devel rpm-sign rpm-build iproute 
socat jq fish sysprof-capture-devel libarchive-devel json-c-devel 
libmicrohttpd-devel libcurl-devel sqlite-devel valgrind valgrind-devel libubsan 
systemd
+
+      - name: checkout git
+        run: |
+          git clone ${FORGEJO_SERVER_URL}/${FORGEJO_REPOSITORY} .
+          git fetch origin ${FORGEJO_REF}:${FORGEJO_REF}
+          git checkout ${FORGEJO_REF}
+
+      - name: autoreconf and configure
+        run: |
+          autoreconf -f -i
+          ./configure --enable-maintainer-mode
+
+      - name: make
+        run: make -j$(nproc)
+
+      - name: make check
+        run: make check -j$(nproc) || (cat tests/test-suite.log; false)
+
+      - name: rpmbuild
+        run: make rpmbuild
+
+      # Disabled for now.
+      # Inside the container helgrind gives two unexpected failures.
+      # run-native-test.sh and run-srcfiles-self.sh
+      # Failures cannot be replicated outside the container.
+      # Without helgrind there is a failure in run-eu-search-die.sh
+      # which can be replicated outside the container.
+      # - name: helgrind and thread-safety
+      #   run: |
+      #     make clean
+      #     ./configure --enable-maintainer-mode --enable-helgrind 
--enable-valgrind-annotations --enable-thread-safety
+      #     make -j$(nproc)
+      #     make check -j$(nproc) || (cat tests/test-suite.log; false)
diff --git a/CONTRIBUTING b/CONTRIBUTING
index 27907652b388..1203e25b9cc7 100644
--- a/CONTRIBUTING
+++ b/CONTRIBUTING
@@ -12,6 +12,13 @@ Or use the form at 
https://sourceware.org/mailman/listinfo/elfutils-devel
 
 Please supply patches using git format-patch or using git send-email.
 
+Or look at https://forge.sourceware.org/elfutils/
+If you create an account there please send email to elfutils-devel
+to ask for a mentor who can make you an Collaborator so you can create
+a merge request against the elfutils project there. This will run
+various checks. And your mentor can help you create an email to sent
+to the mailinglist.
+
 Sign your work
 
 To facilitate tracking of who did what, we've adopted a "sign-off"
-- 
2.52.0

Reply via email to