Skip to content

Commit

Permalink
Build CI with OpenSuSE containers
Browse files Browse the repository at this point in the history
These images comes with Qt and all our possible dependencies.
  • Loading branch information
plfiorini committed May 10, 2020
1 parent 2448644 commit 60b8f11
Showing 1 changed file with 19 additions and 120 deletions.
139 changes: 19 additions & 120 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,13 @@ jobs:
compiler:
- gcc
- clang
qt:
- 5.12.7
- 5.14.1
runs-on: ubuntu-18.04
container:
- suse-qt512
- suse-qt514
- suse-qt515
runs-on: ubuntu-latest
container:
image: liridev/${{ matrix.container }}
steps:
- name: Extract branch name
id: extract_branch
Expand All @@ -37,33 +40,8 @@ jobs:
id: qt_version
shell: bash
run: |
qtverid=`echo "${{ matrix.qt }}" | awk -F. '{ print $1$2 }'`
qtverid=`echo "${{ matrix.container }}" | sed -e 's,suse-qt,,g'`
echo "##[set-output name=id;]${qtverid}"
- name: Install dependencies
run: |
QTPFX=qt${{ steps.qt_version.outputs.id }}
set -x
wget -qO - 'http://archive.neon.kde.org/public.key' | sudo apt-key add -
sudo apt-add-repository http://archive.neon.kde.org/user
sudo add-apt-repository ppa:beineri/opt-qt-${{ matrix.qt }}-bionic
sudo apt-get update
sudo apt-get install -y \
libgl1-mesa-dev \
libwayland-dev \
extra-cmake-modules \
dbus-x11 \
xvfb \
${QTPFX}base \
${QTPFX}declarative \
${QTPFX}quickcontrols2 \
${QTPFX}graphicaleffects \
${QTPFX}svg \
${QTPFX}wayland \
${QTPFX}doc \
${QTPFX}tools
if [ "${{ matrix.compiler }}" == "clang" ]; then
sudo apt-get install -y clang
fi
- name: Fetch cmake-shared artifact
uses: liri-infra/fetch-artifact@master
with:
Expand All @@ -80,29 +58,20 @@ jobs:
- uses: actions/checkout@v2
- name: Build
run: |
QTPFX=qt${{ steps.qt_version.outputs.id }}
set -x
export QT_PATH=/opt/${QTPFX}
export PATH=$QT_PATH/bin:$PATH
export LD_LIBRARY_PATH=$QT_PATH/lib/x86_64-linux-gnu:$QT_PATH/lib:$LD_LIBRARY_PATH
export PKG_CONFIG_PATH=$QT_PATH/lib/pkgconfig:$PKG_CONFIG_PATH
if [ "${{ matrix.compiler }}" == "clang" ]; then
export CC=clang
export CXX=clang++
fi
mkdir -p build
cd build
cmake .. -DCMAKE_INSTALL_PREFIX=/usr
# OpenSuSE containers don't have any documentation
cmake .. -DCMAKE_INSTALL_PREFIX=/usr -DFLUID_WITH_DOCUMENTATION:BOOL=OFF
make -j $(getconf _NPROCESSORS_ONLN)
sudo make install
- name: Test
run: |
QTPFX=qt${{ steps.qt_version.outputs.id }}
set -x
export QT_PATH=/opt/${QTPFX}
export PATH=$QT_PATH/bin:$PATH
export LD_LIBRARY_PATH=$QT_PATH/lib/x86_64-linux-gnu:$QT_PATH/lib:$LD_LIBRARY_PATH
export PKG_CONFIG_PATH=$QT_PATH/lib/pkgconfig:$PKG_CONFIG_PATH
cd build
dbus-run-session -- xvfb-run -a -s "-screen 0 800x600x24" ctest -V
- name: Package
Expand All @@ -118,98 +87,28 @@ jobs:
name: artifacts-${{ matrix.compiler }}-${{ steps.qt_version.outputs.id }}-${{ steps.extract_branch.outputs.branch }}
path: build/artifacts/

# ppa:beineri is built with -no-egl and cannot be used for some repositories like eglfs
neon:
if: "!contains(github.event.head_commit.message, 'ci skip')"
strategy:
matrix:
compiler:
- gcc
- clang
runs-on: ubuntu-18.04
# Build documentation under Ubuntu
docs:
runs-on: ubuntu-latest
steps:
- name: Extract branch name
id: extract_branch
shell: bash
run: |
if [ -n "${{ github.base_ref }}" ]; then
echo "##[set-output name=branch;]${{ github.base_ref }}"
else
github_ref=${{ github.ref }}
echo "##[set-output name=branch;]${github_ref##*/}"
fi
- uses: actions/checkout@v2
with:
submodules: true
- name: Install dependencies
run: |
set -x
wget -qO - 'http://archive.neon.kde.org/public.key' | sudo apt-key add -
sudo apt-add-repository http://archive.neon.kde.org/user
sudo apt-get update
sudo apt-get install -y \
extra-cmake-modules \
dbus-x11 \
xvfb \
libgl1-mesa-dev \
libwayland-dev \
qtbase5-dev \
qtbase5-private-dev \
qtdeclarative5-dev \
qtquickcontrols2-5-dev \
qttools5-dev \
libqt5waylandclient5-dev \
libqt5svg5-dev \
qdoc-qt5 \
qml-module-qtquick2 \
qml-module-qtquick-window2 \
qml-module-qtquick-layouts \
qml-module-qtquick-controls2 \
qml-module-qtquick-templates2 \
qml-module-qtgraphicaleffects \
qml-module-qttest
- name: Fetch cmake-shared artifact
uses: liri-infra/fetch-artifact@master
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
repository: lirios/cmake-shared
workflow_path: .github/workflows/build.yml
artifact_name: artifacts-${{ steps.extract_branch.outputs.branch }}
save_as: cmake-shared.zip
- name: Uncompress artifacts
run: |
set -x
for what in cmake-shared; do
sudo tar xf ${what}.tar.gz -C /
rm -f ${what}.zip ${what}.tar.gz
done
- uses: actions/checkout@v2
sudo apt-get update -y
sudo apt-get install -y qtbase5-dev qtdeclarative5-dev qtquickcontrols2-5-dev qttools5-dev libqt5svg5-dev qdoc-qt5 qt5-doc qtbase5-doc
- name: Build
run: |
set -x
if [ "${{ matrix.compiler }}" == "clang" ]; then
export CC=clang
export CXX=clang++
fi
mkdir -p build
cd build
cmake .. -DCMAKE_INSTALL_PREFIX=/usr
cmake .. -DCMAKE_INSTALL_PREFIX=/usr -DFLUID_WITH_DOCUMENTATION:BOOL=ON -DFLUID_WITH_DEMO:BOOL=OFF -DFLUID_WITH_QML_MODULES:BOOL=OFF -DFLUID_INSTALL_ICONS:BOOL=OFF
make -j $(getconf _NPROCESSORS_ONLN)
sudo make install
- name: Test
run: |
set -x
cd build
dbus-run-session -- xvfb-run -a -s "-screen 0 800x600x24" ctest -V
- name: Package
if: github.event_name == 'push'
run: |
cd build
mkdir -p artifacts
tar czf artifacts/fluid.tar.gz -T install_manifest.txt
- name: Archive result
if: github.event_name == 'push'
uses: actions/upload-artifact@v1
with:
name: artifacts-${{ matrix.compiler }}-${{ steps.extract_branch.outputs.branch }}
path: build/artifacts/
windows:
if: "!contains(github.event.head_commit.message, 'ci skip')"
Expand Down

0 comments on commit 60b8f11

Please sign in to comment.