mirror of
https://github.com/encounter/linuxdeploy-plugin-qt.git
synced 2026-07-10 12:18:45 -07:00
Switch to GitHub actions
This commit is contained in:
@@ -0,0 +1,99 @@
|
||||
name: CI
|
||||
|
||||
on: [push, pull_request, workflow_dispatch]
|
||||
|
||||
jobs:
|
||||
appimage-x86_64:
|
||||
name: Build x86_64 AppImage on CentOS 7
|
||||
runs-on: ubuntu-latest
|
||||
env:
|
||||
ARCH: x86_64
|
||||
BUILD_TYPE: centos7
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
with:
|
||||
submodules: recursive
|
||||
- name: Build AppImage in CentOS 7
|
||||
run: ci/build-centos7-docker.sh
|
||||
- name: Archive artifacts
|
||||
uses: actions/upload-artifact@v2
|
||||
with:
|
||||
name: AppImage x86_64
|
||||
path: linuxdeploy-plugin-qt*.AppImage*
|
||||
|
||||
appimage-i386:
|
||||
name: Build i386 AppImage on CentOS 7
|
||||
runs-on: ubuntu-latest
|
||||
env:
|
||||
ARCH: i386
|
||||
BUILD_TYPE: centos7
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
with:
|
||||
submodules: recursive
|
||||
- name: Build AppImage in CentOS 7
|
||||
run: ci/build-centos7-docker.sh
|
||||
- name: Archive artifacts
|
||||
uses: actions/upload-artifact@v2
|
||||
with:
|
||||
name: AppImage i386
|
||||
path: linuxdeploy-plugin-qt*.AppImage*
|
||||
|
||||
# TODO: build and test on i386 as well!
|
||||
build-text-xenial-x86_64:
|
||||
name: Build and test on Ubuntu xenial x86_64 (no binaries uploaded)
|
||||
runs-on: ubuntu-16.04
|
||||
env:
|
||||
ARCH: x86_64
|
||||
BUILD_TYPE: test
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
with:
|
||||
submodules: recursive
|
||||
- name: Install dependencies
|
||||
run: bash ci/install-dependencies.sh
|
||||
- name: Build and install patchelf
|
||||
run: bash -ex ci/install-patchelf.sh
|
||||
- name: Build and test AppImage
|
||||
run: |
|
||||
bash -ex ci/build.sh
|
||||
bash -xe ci/test.sh linuxdeploy-plugin-qt-"$ARCH".AppImage
|
||||
|
||||
# TODO: build and test on i386 as well!
|
||||
build-text-bionic-x86_64:
|
||||
name: Build and test on Ubuntu bionic x86_64 (no binaries uploaded)
|
||||
runs-on: ubuntu-18.04
|
||||
env:
|
||||
ARCH: x86_64
|
||||
BUILD_TYPE: test
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
with:
|
||||
submodules: recursive
|
||||
- name: Install dependencies
|
||||
run: bash ci/install-dependencies.sh
|
||||
- name: Build and install patchelf
|
||||
run: bash -ex ci/install-patchelf.sh
|
||||
- name: Build and test AppImage
|
||||
run: |
|
||||
bash -ex ci/build.sh
|
||||
bash -xe ci/test.sh linuxdeploy-plugin-qt-"$ARCH".AppImage
|
||||
|
||||
upload:
|
||||
name: Create release and upload artifacts
|
||||
needs:
|
||||
- appimage-x86_64
|
||||
- appimage-i386
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Download artifacts
|
||||
uses: actions/download-artifact@v2
|
||||
- name: Inspect directory after downloading artifacts
|
||||
run: ls -alFR
|
||||
- name: Create release and upload artifacts
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
run: |
|
||||
wget -q https://github.com/TheAssassin/pyuploadtool/releases/download/continuous/pyuploadtool-x86_64.AppImage
|
||||
chmod +x pyuploadtool-x86_64.AppImage
|
||||
./pyuploadtool-x86_64.AppImage **/linuxdeploy-plugin-qt*.AppImage*
|
||||
-72
@@ -1,72 +0,0 @@
|
||||
language: cpp
|
||||
dist: xenial
|
||||
|
||||
matrix:
|
||||
include:
|
||||
- name: Build x86_64 AppImage on CentOS 7
|
||||
services:
|
||||
- docker
|
||||
env: ARCH=x86_64 BUILD_TYPE=centos7
|
||||
script: travis/build-centos7-docker.sh
|
||||
after_success:
|
||||
- ls -lh
|
||||
# make sure only pushes to rewrite create a new release, otherwise pretend PR and upload to transfer.sh
|
||||
- if [ "$TRAVIS_TAG" != "$TRAVIS_BRANCH" ] && [ "$TRAVIS_BRANCH" != "master" ]; then export TRAVIS_EVENT_TYPE=pull_request; fi
|
||||
- wget -c https://github.com/probonopd/uploadtool/raw/master/upload.sh
|
||||
- bash upload.sh linuxdeploy*.AppImage*
|
||||
|
||||
- name: Build i386 AppImage on CentOS 7
|
||||
services:
|
||||
- docker
|
||||
env: ARCH=i386 BUILD_TYPE=centos7
|
||||
script: travis/build-centos7-docker.sh
|
||||
after_success:
|
||||
- ls -lh
|
||||
# make sure only pushes to rewrite create a new release, otherwise pretend PR and upload to transfer.sh
|
||||
- if [ "$TRAVIS_TAG" != "$TRAVIS_BRANCH" ] && [ "$TRAVIS_BRANCH" != "master" ]; then export TRAVIS_EVENT_TYPE=pull_request; fi
|
||||
- wget -c https://github.com/probonopd/uploadtool/raw/master/upload.sh
|
||||
- bash upload.sh linuxdeploy*.AppImage*
|
||||
|
||||
# TODO: build and test on i386 as well!
|
||||
- name: Build and test on Ubuntu xenial (no binaries uploaded)
|
||||
dist: xenial
|
||||
sudo: required
|
||||
env: ARCH=x86_64 BUILD_TYPE=test
|
||||
addons:
|
||||
apt:
|
||||
update: true
|
||||
sources:
|
||||
- sourceline: 'ppa:beineri/opt-qt-5.12.3-xenial'
|
||||
packages:
|
||||
- libmagic-dev
|
||||
- libjpeg-dev
|
||||
- libpng-dev
|
||||
- cimg-dev
|
||||
- automake # required for patchelf
|
||||
- gcc
|
||||
- g++
|
||||
# Packages below are only required by the test srcipt
|
||||
- qt512-meta-minimal
|
||||
- qt512declarative
|
||||
- qt512webengine
|
||||
- mesa-common-dev
|
||||
- libgl1-mesa-dev # <-- that's for xenial to provide the x86_64-linux-gnu/libGL.so symlink
|
||||
- # libglvnd-dev # <-- that's for bionic to provide aforementioned symlink
|
||||
install:
|
||||
- git clone https://github.com/NixOS/patchelf.git -b 0.8
|
||||
- cd patchelf
|
||||
- ./bootstrap.sh
|
||||
- if [ "$ARCH" == "i386" ]; then export EXTRA_CONFIGURE_ARGS=("--build=i686-pc-linux-gnu" "CFLAGS=-m32" "CXXFLAGS=-m32" "LDFLAGS=-m32"); fi
|
||||
- ./configure --prefix=/usr "${EXTRA_CONFIGURE_ARGS[@]}"
|
||||
- make -j$(nproc)
|
||||
- sudo make install
|
||||
- cd ..
|
||||
- rm -rf patchelf
|
||||
script:
|
||||
- bash -xe travis/build.sh
|
||||
- bash -xe travis/test.sh linuxdeploy-plugin-qt-"$ARCH".AppImage
|
||||
|
||||
branches:
|
||||
except:
|
||||
- # Do not build tags that we create when we upload to GitHub Releases
|
||||
- /^(?i:continuous)$/
|
||||
@@ -1,8 +1,8 @@
|
||||
FROM centos:7
|
||||
|
||||
RUN yum install -y centos-release-scl && \
|
||||
yum install -y devtoolset-9 wget curl patchelf vim-common fuse libfuse2 libtool autoconf automake zlib-devel libjpeg-devel libpng-devel nano git file gcc-c++ && \
|
||||
wget https://artifacts.assassinate-you.net/artifactory/cmake-centos6/cmake-v3.15.3-x86_64.tar.gz -O- | tar xz --strip-components=1 -C/usr/local
|
||||
yum install -y devtoolset-8 wget curl patchelf vim-common fuse libfuse2 libtool autoconf automake zlib-devel libjpeg-devel libpng-devel nano git file gcc-c++ && \
|
||||
wget https://artifacts.assassinate-you.net/prebuilt-cmake/continuous/cmake-v3.19.1-centos7-x86_64.tar.gz -O- | tar xz --strip-components=1 -C/usr/local
|
||||
|
||||
ENV ARCH=x86_64
|
||||
COPY entrypoint.sh /
|
||||
@@ -9,8 +9,8 @@ RUN sed -i 's/$basearch/i386/g' /etc/yum.repos.d/CentOS-Base.repo
|
||||
# thanks CloudLinux, you're really helping us poor AppImage creators seeking for maximum compatibility by providing devtoolset i386 builds
|
||||
RUN yum install -y yum-utils && \
|
||||
rpm --import https://repo.cloudlinux.com/cloudlinux/security/RPM-GPG-KEY-CloudLinux && \
|
||||
yum-config-manager --add-repo https://www.repo.cloudlinux.com/cloudlinux/7/sclo/devtoolset-9/i386/ && \
|
||||
yum install -y devtoolset-9 wget curl patchelf vim-common fuse libfuse2 libtool autoconf automake zlib-evel libjpeg-devel libpng-devel nano git make file gcc-c++
|
||||
yum-config-manager --add-repo https://www.repo.cloudlinux.com/cloudlinux/7/sclo/devtoolset-8/i386/ && \
|
||||
yum install -y devtoolset-8 wget curl patchelf vim-common fuse libfuse2 libtool autoconf automake zlib-evel libjpeg-devel libpng-devel nano git make file gcc-c++
|
||||
|
||||
# the shell wrapper takes care of enabling devtoolset and running a shell properly
|
||||
# unfortunately this is the easiest and most solid workaround to the limitations of the scl command
|
||||
@@ -19,7 +19,7 @@ ENV ARCH=i386
|
||||
ENTRYPOINT ["/entrypoint.sh"]
|
||||
SHELL ["/entrypoint.sh", "bash", "-x", "-c"]
|
||||
|
||||
RUN wget https://artifacts.assassinate-you.net/artifactory/cmake-centos6/cmake-v3.15.3-i386.tar.gz -O- | tar xz --strip-components=1 -C/usr/local
|
||||
RUN https://artifacts.assassinate-you.net/prebuilt-cmake/continuous/cmake-v3.19.1-centos7-i386.tar.gz -O- | tar xz --strip-components=1 -C/usr/local
|
||||
|
||||
RUN git clone https://github.com/NixOS/patchelf.git && \
|
||||
pushd patchelf && \
|
||||
@@ -15,4 +15,4 @@ fi
|
||||
|
||||
(cd "$here" && docker build -f "$DOCKERFILE" -t "$IMAGE" .)
|
||||
|
||||
docker run --rm -it -v "$here"/..:/ws:ro -v "$old_cwd":/out -e CI=1 -e OUTDIR_OWNER=$(id -u) "$IMAGE" /bin/bash -xe -c "cd /out && /ws/travis/build-centos7.sh"
|
||||
docker run --rm -i -v "$here"/..:/ws:ro -v "$old_cwd":/out -e CI=1 -e OUTDIR_OWNER=$(id -u) "$IMAGE" /bin/bash -xe -c "cd /out && /ws/ci/build-centos7.sh"
|
||||
@@ -0,0 +1,27 @@
|
||||
#! /bin/bash
|
||||
|
||||
set -e
|
||||
set -x
|
||||
|
||||
ubuntu_release="$(cat /etc/*release | grep -E '^DISTRIB_CODENAME=' | cut -d= -f2-)"
|
||||
|
||||
sudo add-apt-repository -y ppa:beineri/opt-qt-5.14.2-"$ubuntu_release"
|
||||
sudo apt-get update
|
||||
|
||||
packages=(
|
||||
libmagic-dev libjpeg-dev libpng-dev cimg-dev mesa-common-dev
|
||||
|
||||
# dependencies of patchelf
|
||||
automake gcc g++
|
||||
|
||||
# up to date Qt with required plugins
|
||||
qt514-meta-minimal qt514declarative qt514webengine
|
||||
)
|
||||
|
||||
if [[ "$ubuntu_release" == "xenial" ]]; then
|
||||
packages+=(libgl1-mesa-dev)
|
||||
else
|
||||
packages+=(libglvnd-dev)
|
||||
fi
|
||||
|
||||
sudo apt-get install -y "${packages[@]}"
|
||||
@@ -0,0 +1,36 @@
|
||||
#! /bin/bash
|
||||
|
||||
if [[ "$CI" == "" ]]; then
|
||||
echo "Error: this script is supposed to be run in a (disposable) CI environment"
|
||||
exit 2
|
||||
fi
|
||||
|
||||
if [[ "$ARCH" == "" ]]; then
|
||||
echo "Usage: env ARCH=... bash $0"
|
||||
exit 3
|
||||
fi
|
||||
|
||||
build_dir="$(mktemp -d /tmp/patchelf-build-XXXXX)"
|
||||
|
||||
cleanup() {
|
||||
rm -rf "$build_dir"
|
||||
}
|
||||
trap cleanup EXIT
|
||||
|
||||
pushd "$build_dir"
|
||||
|
||||
git clone https://github.com/NixOS/patchelf.git -b 0.8 .
|
||||
|
||||
./bootstrap.sh
|
||||
|
||||
EXTRA_CONFIGURE_ARGS=()
|
||||
|
||||
if [ "$ARCH" == "i386" ]; then
|
||||
export EXTRA_CONFIGURE_ARGS=("--build=i686-pc-linux-gnu" "CFLAGS=-m32" "CXXFLAGS=-m32" "LDFLAGS=-m32")
|
||||
fi
|
||||
|
||||
./configure --prefix=/usr "${EXTRA_CONFIGURE_ARGS[@]}"
|
||||
|
||||
make -j$(nproc)
|
||||
|
||||
sudo make install
|
||||
Reference in New Issue
Block a user