Skip to content

Commit

Permalink
CI: Add Github Actions for ppc64le and s390x
Browse files Browse the repository at this point in the history
We cannot run valgrind on these because it is incompatible with
the qemu-static virtualization, but this will allow us to at
least run all of the standard CI tests on those architectures.

Signed-off-by: Stephen Gallagher <sgallagh@redhat.com>
  • Loading branch information
sgallagher committed Dec 17, 2020
1 parent c2c6bfc commit 0ead09d
Show file tree
Hide file tree
Showing 4 changed files with 109 additions and 49 deletions.
52 changes: 3 additions & 49 deletions .ci/fedora/Dockerfile.deps.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -2,53 +2,7 @@ FROM __IMAGE__

MAINTAINER Stephen Gallagher <sgallagh@redhat.com>

RUN dnf -y --setopt=install_weak_deps=False --setopt=tsflags='' \
--nogpgcheck --skip-broken install \
python3-black \
clang \
clang-analyzer \
clang-tools-extra \
createrepo_c \
"libmodulemd >= 2.3" \
curl \
elinks \
file-devel \
gcc \
gcc-c++ \
git-core \
glib2-devel \
glib2-doc \
gobject-introspection-devel \
gtk-doc \
help2man \
jq \
libyaml-devel \
meson \
ninja-build \
openssl \
packit \
pkgconf \
popt-devel \
python2-devel \
python2-six \
python2-gobject-base \
python3-autopep8 \
python3-devel \
python3-GitPython \
python3-gobject-base \
python3-koji \
python3-pycodestyle \
python3-rpm-macros \
redhat-rpm-config \
rpm-build \
rpm-devel \
rpmdevtools \
ruby \
"rubygem(json)" \
rubygems \
sudo \
valgrind \
wget \
&& dnf -y clean all
COPY ./fedora/get_fedora_deps.sh /root

RUN /root/get_fedora_deps.sh

RUN ln -sf /builddir/bindings/python/gi/overrides/Modulemd.py $(python3 -c "import gi; print(gi._overridesdir)")/Modulemd.py
5 changes: 5 additions & 0 deletions .ci/fedora/ci-tasks.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ set -x
PROCESSORS=$(/usr/bin/getconf _NPROCESSORS_ONLN)
MESON_DIRTY_REPO_ARGS="-Dtest_dirty_git=${DIRTY_REPO_CHECK:-false}"
RETRY_CMD=/builddir/.ci/retry-command.sh
WITH_RPM_TESTS=${WITH_RPM_TESTS:-true}

override_dir=`python3 -c 'import gi; print(gi._overridesdir)'`

Expand Down Expand Up @@ -60,6 +61,10 @@ else
popd #ci_scanbuild
fi

if [ $WITH_RPM_TESTS != true ]; then
exit 0
fi


# Always install and run the installed RPM tests last so we don't pollute the
# testing environment above.
Expand Down
61 changes: 61 additions & 0 deletions .ci/fedora/get_fedora_deps.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
#!/usr/bin/env bash

set -e
set -x

SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
pushd $SCRIPT_DIR

dnf -y --setopt=install_weak_deps=False --setopt=tsflags='' \
--nogpgcheck --skip-broken --quiet install \
python3-black \
clang \
clang-analyzer \
clang-tools-extra \
createrepo_c \
"libmodulemd >= 2.3" \
curl \
elinks \
file-devel \
gcc \
gcc-c++ \
git-core \
glib2-devel \
glib2-doc \
gobject-introspection-devel \
gtk-doc \
help2man \
jq \
libyaml-devel \
meson \
ninja-build \
openssl \
packit \
pkgconf \
popt-devel \
python2-devel \
python2-six \
python2-gobject-base \
python3-autopep8 \
python3-devel \
python3-GitPython \
python3-gobject-base \
python3-koji \
python3-pycodestyle \
python3-rpm-macros \
redhat-rpm-config \
rpm-build \
rpm-devel \
rpmdevtools \
ruby \
"rubygem(json)" \
rubygems \
sudo \
valgrind \
wget

dnf -y clean all

ln -sf /builddir/bindings/python/gi/overrides/Modulemd.py $(python3 -c "import gi; print(gi._overridesdir)")/Modulemd.py

popd
40 changes: 40 additions & 0 deletions .github/workflows/multiarch.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: Other Architectures
on: [push, pull_request]

jobs:
multiarch:
runs-on: ubuntu-20.04
name: ${{ matrix.distro }} on ${{ matrix.arch }}
continue-on-error: true

# Run steps on a matrix of 3 arch/distro combinations
strategy:
matrix:
include:
- arch: ppc64le
distro: fedora_latest
- arch: s390x
distro: fedora_latest

steps:
- uses: actions/checkout@v2

- uses: uraimo/run-on-arch-action@v2.0.7
name: Perform upstream tests

with:
arch: ${{ matrix.arch }}
distro: ${{ matrix.distro }}

# Not required, but speeds up builds by storing container images in
# a GitHub package registry.
githubToken: ${{ github.token }}

# Work-around ldd bug in rawhide CIs
run: |
$GITHUB_WORKSPACE/.ci/fedora/get_fedora_deps.sh
sed -i -e 's/test -r/test -f/g' -e 's/test -x/test -f/g' /bin/ldd
meson setup --buildtype=debugoptimized -Dverbose_tests=false /tmp/ci $GITHUB_WORKSPACE
meson test --suite formatters -C /tmp/ci --print-errorlogs -t 5
meson test --suite ci -C /tmp/ci --print-errorlogs -t 5

0 comments on commit 0ead09d

Please sign in to comment.