Skip to content

Commit adf1eb0

Browse files
Added GitHub Action CI. (#518)
* Added GitHub Action CI. Signed-off-by: RICCIARDI-Adrien <[email protected]> * Removed Travis CI support. Signed-off-by: RICCIARDI-Adrien <[email protected]>
1 parent 570ca2d commit adf1eb0

File tree

3 files changed

+47
-54
lines changed

3 files changed

+47
-54
lines changed

.github/workflows/build.yaml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
name: Build
2+
on: [push, pull_request]
3+
4+
jobs:
5+
build:
6+
name: Build
7+
runs-on: ubuntu-20.04
8+
container: ubuntu:xenial
9+
env:
10+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
11+
TRAVIS_BUILD_NUMBER: ${{ github.run_number }}
12+
VERSION: ${{ github.ref_name }}
13+
steps:
14+
- name: Configure build machine
15+
run: |
16+
apt update
17+
apt install -y -q apt-transport-https curl git kmod software-properties-common sudo wget
18+
# The keyboard-configuration package is needed later and requires the user to input a number via dpkg-reconfigure, so preinstall it without front-end to avoid blocking the later installations
19+
DEBIAN_FRONTEND=noninteractive apt install -y -q keyboard-configuration
20+
- name: Checkout sources
21+
run: |
22+
# Can't use actions/checkout@v2 action here because Ubuntu 16.04 git version is too old, so the action downloads an archive instead of a git repository, and this prevents linuxdeployqt from finding the commit it is built from
23+
git clone --depth=1 https://github.com/${{ github.repository }} --branch=${{ github.ref_name }} .
24+
- name: Environment tests
25+
run: ./tests/tests-environment.sh
26+
- name: CI tests
27+
run: ./tests/tests-ci.sh
28+
- name: Deploy release (only when building from master branch)
29+
if: ${{ github.ref == 'refs/heads/master' }}
30+
run: |
31+
wget -c https://github.com/probonopd/uploadtool/raw/master/upload.sh
32+
bash ./upload.sh ./linuxdeployqt-*.AppImage*

.travis.yml

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

tests/tests-ci.sh

Lines changed: 15 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -4,18 +4,18 @@ set -x
44

55
source /opt/qt*/bin/qt*-env.sh
66
/opt/qt*/bin/qmake CONFIG+=release CONFIG+=force_debug_info linuxdeployqt.pro
7-
# make -j$(nproc) # Not doing here but below with "pvs-tool trace"
7+
make -j$(nproc)
88

9-
# Test
10-
wget -q -O - http://files.viva64.com/etc/pubkey.txt | sudo apt-key add -
11-
sudo wget -O /etc/apt/sources.list.d/viva64.list http://files.viva64.com/etc/viva64.list
12-
sudo apt-get update
13-
sudo apt-get -y install --no-install-recommends pvs-studio
14-
pvs-studio-analyzer credentials [email protected] $PVS_KEY -o ./licence.lic
15-
pvs-studio-analyzer trace -- make -j$(nproc)
16-
pvs-studio-analyzer analyze -e /opt -e /usr -o pvs-studio.log -j $(nproc) -l ./licence.lic
17-
plog-converter -a GA:1,2 -t tasklist -o pvs-studio-report.txt pvs-studio.log
18-
rm ./licence.lic
9+
# Test (it is commented out because current PVS Studio license is expired, it might be re-enabled later if a new license is granted)
10+
#wget -q -O - http://files.viva64.com/etc/pubkey.txt | sudo apt-key add -
11+
#sudo wget -O /etc/apt/sources.list.d/viva64.list http://files.viva64.com/etc/viva64.list
12+
#sudo apt-get update
13+
#sudo apt-get -y install --no-install-recommends pvs-studio
14+
#pvs-studio-analyzer credentials [email protected] $PVS_KEY -o ./licence.lic
15+
#pvs-studio-analyzer trace -- make -j$(nproc)
16+
#pvs-studio-analyzer analyze -e /opt -e /usr -o pvs-studio.log -j $(nproc) -l ./licence.lic
17+
#plog-converter -a GA:1,2 -t tasklist -o pvs-studio-report.txt pvs-studio.log
18+
#rm ./licence.lic
1919

2020
# exit on failure
2121
set -e
@@ -26,8 +26,7 @@ cp ./bin/linuxdeployqt linuxdeployqt.AppDir/usr/bin/
2626
cp -r /usr/local/lib/appimagekit linuxdeployqt.AppDir/usr/lib/
2727
chmod +x linuxdeployqt.AppDir/AppRun
2828
find linuxdeployqt.AppDir/
29-
export VERSION=continuous
30-
if [ ! -z $TRAVIS_TAG ] ; then export VERSION=$TRAVIS_TAG ; fi
29+
if [ -z "$VERSION" ] ; then export VERSION=continuous ; fi
3130
./bin/linuxdeployqt linuxdeployqt.AppDir/linuxdeployqt.desktop -verbose=3 -appimage \
3231
-executable=linuxdeployqt.AppDir/usr/bin/desktop-file-validate
3332
ls -lh
@@ -43,7 +42,7 @@ do
4342
done
4443

4544
# enable core dumps
46-
echo "/tmp/coredump" | sudo tee /proc/sys/kernel/core_pattern
45+
#echo "/tmp/coredump" | sudo tee /proc/sys/kernel/core_pattern
4746

4847
ulimit -c unlimited
4948
ulimit -a -S
@@ -52,8 +51,8 @@ ulimit -a -H
5251
# error handling performed separately
5352
set +e
5453

55-
# print version number
56-
./linuxdeployqt-*-x86_64.AppImage --version
54+
# print version number (need to extract the AppImage because we are running in a container, see https://github.com/AppImage/AppImageKit/wiki/FUSE#docker)
55+
./linuxdeployqt-*-x86_64.AppImage --appimage-extract-and-run --version
5756

5857
# TODO: reactivate tests
5958
#bash -e tests/tests.sh

0 commit comments

Comments
 (0)