Skip to content

Commit 49dc10d

Browse files
committed
Switch to GitHub actions
1 parent 869b4dc commit 49dc10d

11 files changed

+168
-78
lines changed

.github/workflows/main.yml

Lines changed: 99 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,99 @@
1+
name: CI
2+
3+
on: [push, pull_request, workflow_dispatch]
4+
5+
jobs:
6+
appimage-x86_64:
7+
name: Build x86_64 AppImage on CentOS 7
8+
runs-on: ubuntu-latest
9+
env:
10+
ARCH: x86_64
11+
BUILD_TYPE: centos7
12+
steps:
13+
- uses: actions/checkout@v2
14+
with:
15+
submodules: recursive
16+
- name: Build AppImage in CentOS 7
17+
run: ci/build-centos7-docker.sh
18+
- name: Archive artifacts
19+
uses: actions/upload-artifact@v2
20+
with:
21+
name: AppImage x86_64
22+
path: linuxdeploy-plugin-qt*.AppImage*
23+
24+
appimage-i386:
25+
name: Build i386 AppImage on CentOS 7
26+
runs-on: ubuntu-latest
27+
env:
28+
ARCH: i386
29+
BUILD_TYPE: centos7
30+
steps:
31+
- uses: actions/checkout@v2
32+
with:
33+
submodules: recursive
34+
- name: Build AppImage in CentOS 7
35+
run: ci/build-centos7-docker.sh
36+
- name: Archive artifacts
37+
uses: actions/upload-artifact@v2
38+
with:
39+
name: AppImage i386
40+
path: linuxdeploy-plugin-qt*.AppImage*
41+
42+
# TODO: build and test on i386 as well!
43+
build-text-xenial-x86_64:
44+
name: Build and test on Ubuntu xenial x86_64 (no binaries uploaded)
45+
runs-on: ubuntu-16.04
46+
env:
47+
ARCH: x86_64
48+
BUILD_TYPE: test
49+
steps:
50+
- uses: actions/checkout@v2
51+
with:
52+
submodules: recursive
53+
- name: Install dependencies
54+
run: bash ci/install-dependencies.sh
55+
- name: Build and install patchelf
56+
run: bash -ex ci/install-patchelf.sh
57+
- name: Build and test AppImage
58+
run: |
59+
bash -ex ci/build.sh
60+
bash -xe ci/test.sh linuxdeploy-plugin-qt-"$ARCH".AppImage
61+
62+
# TODO: build and test on i386 as well!
63+
build-text-bionic-x86_64:
64+
name: Build and test on Ubuntu bionic x86_64 (no binaries uploaded)
65+
runs-on: ubuntu-18.04
66+
env:
67+
ARCH: x86_64
68+
BUILD_TYPE: test
69+
steps:
70+
- uses: actions/checkout@v2
71+
with:
72+
submodules: recursive
73+
- name: Install dependencies
74+
run: bash ci/install-dependencies.sh
75+
- name: Build and install patchelf
76+
run: bash -ex ci/install-patchelf.sh
77+
- name: Build and test AppImage
78+
run: |
79+
bash -ex ci/build.sh
80+
bash -xe ci/test.sh linuxdeploy-plugin-qt-"$ARCH".AppImage
81+
82+
upload:
83+
name: Create release and upload artifacts
84+
needs:
85+
- appimage-x86_64
86+
- appimage-i386
87+
runs-on: ubuntu-latest
88+
steps:
89+
- name: Download artifacts
90+
uses: actions/download-artifact@v2
91+
- name: Inspect directory after downloading artifacts
92+
run: ls -alFR
93+
- name: Create release and upload artifacts
94+
env:
95+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
96+
run: |
97+
wget -q https://github.com/TheAssassin/pyuploadtool/releases/download/continuous/pyuploadtool-x86_64.AppImage
98+
chmod +x pyuploadtool-x86_64.AppImage
99+
./pyuploadtool-x86_64.AppImage **/linuxdeploy-plugin-qt*.AppImage*

.travis.yml

Lines changed: 0 additions & 72 deletions
This file was deleted.

travis/Dockerfile.centos7 renamed to ci/Dockerfile.centos7

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
FROM centos:7
22

33
RUN yum install -y centos-release-scl && \
4-
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++ && \
5-
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
4+
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++ && \
5+
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
66

77
ENV ARCH=x86_64
88
COPY entrypoint.sh /

travis/Dockerfile.centos7-i386 renamed to ci/Dockerfile.centos7-i386

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@ RUN sed -i 's/$basearch/i386/g' /etc/yum.repos.d/CentOS-Base.repo
99
# thanks CloudLinux, you're really helping us poor AppImage creators seeking for maximum compatibility by providing devtoolset i386 builds
1010
RUN yum install -y yum-utils && \
1111
rpm --import https://repo.cloudlinux.com/cloudlinux/security/RPM-GPG-KEY-CloudLinux && \
12-
yum-config-manager --add-repo https://www.repo.cloudlinux.com/cloudlinux/7/sclo/devtoolset-9/i386/ && \
13-
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++
12+
yum-config-manager --add-repo https://www.repo.cloudlinux.com/cloudlinux/7/sclo/devtoolset-8/i386/ && \
13+
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++
1414

1515
# the shell wrapper takes care of enabling devtoolset and running a shell properly
1616
# unfortunately this is the easiest and most solid workaround to the limitations of the scl command
@@ -19,7 +19,7 @@ ENV ARCH=i386
1919
ENTRYPOINT ["/entrypoint.sh"]
2020
SHELL ["/entrypoint.sh", "bash", "-x", "-c"]
2121

22-
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
22+
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
2323

2424
RUN git clone https://github.com/NixOS/patchelf.git && \
2525
pushd patchelf && \

travis/build-centos7-docker.sh renamed to ci/build-centos7-docker.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,4 +15,4 @@ fi
1515

1616
(cd "$here" && docker build -f "$DOCKERFILE" -t "$IMAGE" .)
1717

18-
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"
18+
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"
File renamed without changes.
File renamed without changes.
File renamed without changes.

ci/install-dependencies.sh

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
#! /bin/bash
2+
3+
set -e
4+
set -x
5+
6+
ubuntu_release="$(cat /etc/*release | grep -E '^DISTRIB_CODENAME=' | cut -d= -f2-)"
7+
8+
sudo add-apt-repository -y ppa:beineri/opt-qt-5.14.2-"$ubuntu_release"
9+
sudo apt-get update
10+
11+
packages=(
12+
libmagic-dev libjpeg-dev libpng-dev cimg-dev mesa-common-dev
13+
14+
# dependencies of patchelf
15+
automake gcc g++
16+
17+
# up to date Qt with required plugins
18+
qt514-meta-minimal qt514declarative qt514webengine
19+
)
20+
21+
if [[ "$ubuntu_release" == "xenial" ]]; then
22+
packages+=(libgl1-mesa-dev)
23+
else
24+
packages+=(libglvnd-dev)
25+
fi
26+
27+
sudo apt-get install -y "${packages[@]}"

ci/install-patchelf.sh

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
#! /bin/bash
2+
3+
if [[ "$CI" == "" ]]; then
4+
echo "Error: this script is supposed to be run in a (disposable) CI environment"
5+
exit 2
6+
fi
7+
8+
if [[ "$ARCH" == "" ]]; then
9+
echo "Usage: env ARCH=... bash $0"
10+
exit 3
11+
fi
12+
13+
build_dir="$(mktemp -d /tmp/patchelf-build-XXXXX)"
14+
15+
cleanup() {
16+
rm -rf "$build_dir"
17+
}
18+
trap cleanup EXIT
19+
20+
pushd "$build_dir"
21+
22+
git clone https://github.com/NixOS/patchelf.git -b 0.8 .
23+
24+
./bootstrap.sh
25+
26+
EXTRA_CONFIGURE_ARGS=()
27+
28+
if [ "$ARCH" == "i386" ]; then
29+
export EXTRA_CONFIGURE_ARGS=("--build=i686-pc-linux-gnu" "CFLAGS=-m32" "CXXFLAGS=-m32" "LDFLAGS=-m32")
30+
fi
31+
32+
./configure --prefix=/usr "${EXTRA_CONFIGURE_ARGS[@]}"
33+
34+
make -j$(nproc)
35+
36+
sudo make install
File renamed without changes.

0 commit comments

Comments
 (0)