Skip to content

Commit f6ecc7a

Browse files
committed
build: Add GitHub CI/CD (machinekit#299)
1 parent 3863795 commit f6ecc7a

File tree

9 files changed

+173
-79
lines changed

9 files changed

+173
-79
lines changed
Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
name: macOS build
2+
3+
on: [push]
4+
5+
jobs:
6+
buildTest_x64:
7+
name: Test_x64
8+
runs-on: ubuntu-18.04
9+
steps:
10+
- name: Install extra packages
11+
run: |
12+
sudo apt-get update
13+
sudo apt-get install bsdtar
14+
- run: ./build/travis/job1_Test/build.sh --x86_64
15+
16+
buildAppImage_x64:
17+
name: AppImage_x64
18+
runs-on: ubuntu-18.04
19+
steps:
20+
- name: Install extra packages
21+
run: |
22+
sudo apt-get update
23+
sudo apt-get install bsdtar
24+
- run: ./build/travis/job2_AppImage/build.sh --x86_64
25+
- name: Release
26+
run: ./build/github/release.sh "$APP" "$LIB" "Linux 64bit"
27+
env:
28+
APP: *x64.AppImage
29+
LIB: *x64.zip
30+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
31+
32+
buildAndroid_armv7:
33+
name: Android_armv7
34+
runs-on: ubuntu-18.04
35+
steps:
36+
- name: Install extra packages
37+
run: |
38+
sudo apt-get update
39+
sudo apt-get install bsdtar
40+
- run: ./build/travis/job3_Android/build.sh
41+
- name: Release
42+
run: ./build/github/release.sh "$APP" "$LIB" "Android armv7"
43+
env:
44+
APP: *.apk
45+
LIB: *.tar.gz
46+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
47+
48+
buildMacOS:
49+
name: macOS
50+
runs-on: macos-10.15
51+
steps:
52+
- name: Check out repository code
53+
uses: actions/checkout@v2
54+
- run: echo "QT_SHORT_VERSION=5.8" >> $GITHUB_ENV
55+
- run: echo "QT_LONG_VERSION=5.8.0" >> $GITHUB_ENV
56+
- run: echo "QT_INSTALLER_ROOT=qt-opensource-mac-x64-clang-${QT_LONG_VERSION}" >> $GITHUB_ENV
57+
- run: echo "QT_INSTALLER_FILENAME=${QT_INSTALLER_ROOT}.dmg" >> $GITHUB_ENV
58+
- run: echo "QT_PATH=$HOME/qt" >> $GITHUB_ENV
59+
- run: echo "QT_MACOS=$QT_PATH/$QT_SHORT_VERSION/clang_64" >> $GITHUB_ENV
60+
- run: echo "$QT_MACOS/bin" >> $GITHUB_PATH
61+
- run: echo "/usr/local/opt/gnu-tar/libexec/gnubin" >> $GITHUB_PATH
62+
- run: ./build/travis/job_macos/install.sh
63+
- run: ./build/travis/job_macos/build.sh
64+
- name: Release
65+
run: ./build/github/release.sh "$APP" "$LIB" "macOS 64bit"
66+
env:
67+
APP: *x64.dmg
68+
LIB: *x64.zip
69+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

README.md

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22

33
A remote UI implementation for [Machinekit](https://github.com/machinekit/machinekit) written in Qt/C++/QML. <a href="#contents">More info...</a>
44

5-
| | Travis CI | AppVeyor |
6-
|----------|:----:|:----:|
7-
| Build Status | [![Build Status](https://api.travis-ci.org/machinekit/QtQuickVcp.svg?branch=master)](http://travis-ci.org/machinekit/QtQuickVcp) | [![Build Status](https://ci.appveyor.com/api/projects/status/h8pi1hm0gj15nmgm?svg=true)](https://ci.appveyor.com/project/machinekoder/qtquickvcp) |
5+
| | Travis CI | AppVeyor | Github Actions |
6+
|----------|:----:|:----:|:----:|
7+
| Build Status | [![Build Status](https://api.travis-ci.org/machinekit/QtQuickVcp.svg?branch=master)](http://travis-ci.org/machinekit/QtQuickVcp) | [![Build Status](https://ci.appveyor.com/api/projects/status/h8pi1hm0gj15nmgm?svg=true)](https://ci.appveyor.com/project/machinekoder/qtquickvcp) | [![Build Status](https://github.com/gb-g/QtQuickVcp/actions/workflows/builder-workflow.yaml/badge.svg)](https://github.com/gb-g/QtQuickVcp/actions) |
88

99
[![Coverity Scan Build Status](https://scan.coverity.com/projects/10524/badge.svg)](https://scan.coverity.com/projects/qtquickvcp-qtquickvcp)
1010

@@ -36,13 +36,13 @@ The MachinekitClient is available in following app stores:
3636
### Rolling releases
3737
You can find rolling releases of the MachinekitClient and the QtQuickVcp library below. Stable releases have been dropped in favor of continuous deployment to decrease maintenance effort.
3838

39-
| Operating System | MachinekitClient | QtQuickVcp |
40-
|----------|:-------------:|:----:|
41-
| Windows 64bit | [ ![Download](https://api.bintray.com/packages/machinekoder/MachinekitClient-Development/MachinekitClient_Development-Windows-master-x64-signed/images/download.svg) ](https://bintray.com/machinekoder/MachinekitClient-Development/MachinekitClient_Development-Windows-master-x64-signed/_latestVersion#files) | [ ![Download](https://api.bintray.com/packages/machinekoder/QtQuickVcp-Development/QtQuickVcp_Development-Windows-master-x64/images/download.svg) ](https://bintray.com/machinekoder/QtQuickVcp-Development/QtQuickVcp_Development-Windows-master-x64/_latestVersion#files) |
42-
| Windows 32bit | [ ![Download](https://api.bintray.com/packages/machinekoder/MachinekitClient-Development/MachinekitClient_Development-Windows-master-x86-signed/images/download.svg) ](https://bintray.com/machinekoder/MachinekitClient-Development/MachinekitClient_Development-Windows-master-x86-signed/_latestVersion#files) | [ ![Download](https://api.bintray.com/packages/machinekoder/QtQuickVcp-Development/QtQuickVcp_Development-Windows-master-x86/images/download.svg) ](https://bintray.com/machinekoder/QtQuickVcp-Development/QtQuickVcp_Development-Windows-master-x86/_latestVersion#files) |
43-
| Linux 64bit | [ ![Download](https://api.bintray.com/packages/machinekoder/MachinekitClient-Development/MachinekitClient_Development-Linux-master-x64/images/download.svg) ](https://bintray.com/machinekoder/MachinekitClient-Development/MachinekitClient_Development-Linux-master-x64/_latestVersion#files) | [ ![Download](https://api.bintray.com/packages/machinekoder/QtQuickVcp-Development/QtQuickVcp_Development-Linux-master-x64/images/download.svg) ](https://bintray.com/machinekoder/QtQuickVcp-Development/QtQuickVcp_Development-Linux-master-x64/_latestVersion#files) |
44-
| Mac OS X 64bit | [ ![Download](https://api.bintray.com/packages/machinekoder/MachinekitClient-Development/MachinekitClient_Development-MacOSX-master-x64/images/download.svg) ](https://bintray.com/machinekoder/MachinekitClient-Development/MachinekitClient_Development-MacOSX-master-x64/_latestVersion#files) | [ ![Download](https://api.bintray.com/packages/machinekoder/QtQuickVcp-Development/QtQuickVcp_Development-MacOSX-master-x64/images/download.svg) ](https://bintray.com/machinekoder/QtQuickVcp-Development/QtQuickVcp_Development-MacOSX-master-x64/_latestVersion#files) |
45-
| Android armv7 | [ ![Download](https://api.bintray.com/packages/machinekoder/MachinekitClient-Development/MachinekitClient_Development-Android-master-armv7/images/download.svg) ](https://bintray.com/machinekoder/MachinekitClient-Development/MachinekitClient_Development-Android-master-armv7/_latestVersion#files) | [ ![Download](https://api.bintray.com/packages/machinekoder/QtQuickVcp-Development/QtQuickVcp_Development-Android-master-armv7/images/download.svg) ](https://bintray.com/machinekoder/QtQuickVcp-Development/QtQuickVcp_Development-Android-master-armv7/_latestVersion#files) |
39+
| Operating System | MachinekitClient and QtQuickVcp |
40+
|----------|:-----------------:|
41+
| Windows 64bit | [ ![GitHub release (latest by date)](https://img.shields.io/github/v/release/gb-g/QtQuickVcp?label=x64%20zip&logo=github&style=for-the-badge) ](https://github.com/gb-g/QtQuickVcp/releases/latest) |
42+
| Windows 32bit | [ ![GitHub release (latest by date)](https://img.shields.io/github/v/release/gb-g/QtQuickVcp?label=x86%20zip&logo=github&style=for-the-badge) ](https://github.com/gb-g/QtQuickVcp/releases/latest) |
43+
| Linux 64bit | [ ![GitHub release (latest by date)](https://img.shields.io/github/v/release/gb-g/QtQuickVcp?label=AppImage&logo=github&style=for-the-badge) ](https://github.com/gb-g/QtQuickVcp/releases/latest) |
44+
| macOS 64bit | [ ![GitHub release (latest by date)](https://img.shields.io/github/v/release/gb-g/QtQuickVcp?label=dmg&logo=github&style=for-the-badge) ](https://github.com/gb-g/QtQuickVcp/releases/latest) |
45+
| Android arm7 | [ ![GitHub release (latest by date)](https://img.shields.io/github/v/release/gb-g/QtQuickVcp?label=APK&logo=github&style=for-the-badge) ](https://github.com/gb-g/QtQuickVcp/releases/latest) |
4646

4747
**QtQuickVcp direct download links**
4848

appveyor.yml

Lines changed: 50 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@
22
# http://www.appveyor.com/docs/build-configuration
33
version: build{build}
44

5+
skip_tags: true
6+
7+
image: Visual Studio 2015
8+
59
platform:
610
- Win64
711

@@ -36,34 +40,35 @@ artifacts:
3640
name: QtQuickVcp-x64-archive
3741

3842
deploy:
39-
- provider: BinTray
40-
username: machinekoder
41-
api_key:
42-
secure: W+r/AcwTE6+ZntNkPg4ulGEWL9A51GF0UkCqT7OqS1OSLZZHrn9MUQdoODQulAaZ
43-
subject: machinekoder
44-
repo: QtQuickVcp-Development
45-
package: QtQuickVcp_Development-Windows-master-x64
46-
publish: true
47-
override: true
48-
explode: false
43+
- description: |
44+
QtQuickVcp_Development modules for
45+
x64 (64-bit Intel/AMD) Linux systems (Portable AppImages)
46+
Windows 32bit and 64bit
47+
x64 (64-bit Intel/AMD) MacOSX systems
48+
Automated builds of the master development branch. FOR TESTING PURPOSES ONLY!
49+
Extract the contents of the archive to your Qt installation folder to use it
50+
provider: GitHub
51+
auth_token:
52+
secure: M9qlWKrBp+EjFfJen7YozWiJ1EjVaeLo2qfDKZsSgI4/X6N8HSub1cDTX4N6z/rk
4953
artifact: QtQuickVcp-x64-archive
50-
version: $(appveyor_build_version)
54+
tag: $(appveyor_build_version)
55+
force_update: true
5156
on:
5257
branch: master
5358
appveyor_repo_tag: false
5459

55-
- provider: BinTray
56-
username: machinekoder
57-
api_key:
58-
secure: W+r/AcwTE6+ZntNkPg4ulGEWL9A51GF0UkCqT7OqS1OSLZZHrn9MUQdoODQulAaZ
59-
subject: machinekoder
60-
repo: MachinekitClient-Development
61-
package: MachinekitClient_Development-Windows-master-x64
62-
publish: true
63-
override: true
64-
explode: false
60+
- description: |
61+
MachinekitClient_Development for
62+
x64 (64-bit Intel/AMD) Linux systems (Portable AppImages)
63+
Windows 32bit and 64bit
64+
x64 (64-bit Intel/AMD) MacOSX systems
65+
Automated builds of the master development branch. FOR TESTING PURPOSES ONLY!
66+
provider: GitHub
67+
auth_token:
68+
secure: M9qlWKrBp+EjFfJen7YozWiJ1EjVaeLo2qfDKZsSgI4/X6N8HSub1cDTX4N6z/rk
6569
artifact: MachinekitClient-x64-archive
66-
version: $(appveyor_build_version)
70+
tag: $(appveyor_build_version)
71+
force_update: true
6772
on:
6873
branch: master
6974
appveyor_repo_tag: false
@@ -98,34 +103,35 @@ deploy:
98103
on:
99104
appveyor_repo_tag: true
100105

101-
- provider: BinTray
102-
username: machinekoder
103-
api_key:
104-
secure: W+r/AcwTE6+ZntNkPg4ulGEWL9A51GF0UkCqT7OqS1OSLZZHrn9MUQdoODQulAaZ
105-
subject: machinekoder
106-
repo: QtQuickVcp-Development
107-
package: QtQuickVcp_Development-Windows-master-x86
108-
publish: true
109-
override: true
110-
explode: false
106+
- description: |
107+
QtQuickVcp_Development modules for
108+
x64 (64-bit Intel/AMD) Linux systems (Portable AppImages)
109+
Windows 32bit and 64bit
110+
x64 (64-bit Intel/AMD) MacOSX systems
111+
Automated builds of the master development branch. FOR TESTING PURPOSES ONLY!
112+
Extract the contents of the archive to your Qt installation folder to use it
113+
provider: GitHub
114+
auth_token:
115+
secure: M9qlWKrBp+EjFfJen7YozWiJ1EjVaeLo2qfDKZsSgI4/X6N8HSub1cDTX4N6z/rk
111116
artifact: QtQuickVcp-x86-archive
112-
version: $(appveyor_build_version)
117+
tag: $(appveyor_build_version)
118+
force_update: true
113119
on:
114120
branch: master
115121
appveyor_repo_tag: false
116122

117-
- provider: BinTray
118-
username: machinekoder
119-
api_key:
120-
secure: W+r/AcwTE6+ZntNkPg4ulGEWL9A51GF0UkCqT7OqS1OSLZZHrn9MUQdoODQulAaZ
121-
subject: machinekoder
122-
repo: MachinekitClient-Development
123-
package: MachinekitClient_Development-Windows-master-x86
124-
publish: true
125-
override: true
126-
explode: false
123+
- description: |
124+
MachinekitClient_Development for
125+
x64 (64-bit Intel/AMD) Linux systems (Portable AppImages)
126+
Windows 32bit and 64bit
127+
x64 (64-bit Intel/AMD) MacOSX systems
128+
Automated builds of the master development branch. FOR TESTING PURPOSES ONLY!
129+
provider: GitHub
130+
auth_token:
131+
secure: M9qlWKrBp+EjFfJen7YozWiJ1EjVaeLo2qfDKZsSgI4/X6N8HSub1cDTX4N6z/rk
127132
artifact: MachinekitClient-x86-archive
128-
version: $(appveyor_build_version)
133+
tag: $(appveyor_build_version)
134+
force_update: true
129135
on:
130136
branch: master
131137
appveyor_repo_tag: false

build/github/release.sh

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
#! /usr/bin/env sh
2+
3+
APP="MachinekitClient_Development"
4+
LIB="QtQuickVcp_Development"
5+
APPNAME=$(find . -name "${APP}$1")
6+
TAGNAME=$(echo "$APPNAME" | sed -E 's|^[^-]*-(.*)-[^-]*$|\1|')
7+
LIBNAME=$(find . -name "${LIB}$2")
8+
OS_ARCH=$3
9+
DESCRIPTION="${APP} and ${LIB} modules for:
10+
- x64 (64-bit Intel/AMD) Linux systems (Portable AppImages)
11+
- Windows 32bit and 64bit
12+
- x64 (64-bit Intel/AMD) MacOSX systems
13+
- armv7 (new 32-bit ARM) Android systems
14+
Automated builds of the master development branch. FOR TESTING PURPOSES ONLY!
15+
Extract the contents of the archive to your Qt installation folder to use ${LIB}."
16+
17+
gh release create "$TAGNAME" --notes "$DESCRIPTION" --title "$TAGNAME"
18+
gh release upload "$TAGNAME" "${APPNAME}#${APP} ${OS_ARCH}"
19+
gh release upload "$TAGNAME" "${LIBNAME}#${LIB} ${OS_ARCH}"

build/travis/job2_AppImage/build.sh

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -80,29 +80,29 @@ if [ "${upload}" != "true" ]; then
8080
upload=true
8181
fi
8282
# skip pull requests
83-
if [ "${TRAVIS_PULL_REQUEST}" != "false" ]; then
83+
if [ ! -z "${TRAVIS_PULL_REQUEST}" ] && [ "${TRAVIS_PULL_REQUEST}" != "false" ]; then
8484
upload=
8585
fi
8686
fi
8787

8888
if [ "${upload}" ]; then
8989
# rename binaries
90-
# and upload AppImage to Bintray
9190
if [ $release -eq 1 ]; then
9291
target="QtQuickVcp"
9392
else
9493
target="QtQuickVcp_Development"
9594
fi
9695
mv build.release/QtQuickVcp.tar.gz ${target}-${version}-Linux-${platform}.tar.gz
97-
./build/travis/job2_AppImage/bintray_lib.sh ${target}-${version}*.tar.gz
96+
# and upload AppImage to Bintray
97+
# ./build/travis/job2_AppImage/bintray_lib.sh ${target}-${version}*.tar.gz
9898

9999
if [ $release -eq 1 ]; then
100100
target="MachinekitClient"
101101
else
102102
target="MachinekitClient_Development"
103103
fi
104104
mv build.release/MachinekitClient.AppImage ${target}-${version}-${platform}.AppImage
105-
./build/travis/job2_AppImage/bintray_app.sh ${target}*.AppImage
105+
# ./build/travis/job2_AppImage/bintray_app.sh ${target}*.AppImage
106106
else
107107
echo "On branch '$branch' so AppImage will not be uploaded." >&2
108108
fi

build/travis/job3_Android/build.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ if [ "${upload}" != "true" ]; then
5858
upload=true
5959
fi
6060
# skip pull requests
61-
if [ "${TRAVIS_PULL_REQUEST}" != "false" ]; then
61+
if [ ! -z "${TRAVIS_PULL_REQUEST}" ] && [ "${TRAVIS_PULL_REQUEST}" != "false" ]; then
6262
upload=
6363
fi
6464
fi
@@ -87,8 +87,8 @@ docker run --env-file ./env.list -i -v "${PWD}:/QtQuickVcp" \
8787

8888
if [ "${upload}" ]; then
8989
# Upload apk to Bintray
90-
./build/travis/job3_Android/bintray_lib.sh QtQuickVcp*-${version}*.tar.gz
91-
./build/travis/job3_Android/bintray_android.sh MachinekitClient*.apk
90+
# ./build/travis/job3_Android/bintray_lib.sh QtQuickVcp*-${version}*.tar.gz
91+
# ./build/travis/job3_Android/bintray_android.sh MachinekitClient*.apk
9292
else
9393
echo "On branch '$branch' so Package will not be uploaded." >&2
9494
fi

build/travis/job_macos/build.sh

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ set -e
44
set -x
55

66
# do not build mac for PR
7-
if [ "${TRAVIS_PULL_REQUEST}" != "false" ]; then
7+
if [ ! -z "${TRAVIS_PULL_REQUEST}" ] && [ "${TRAVIS_PULL_REQUEST}" != "false" ]; then
88
exit 0
99
fi
1010

@@ -88,29 +88,29 @@ if [ "${upload}" != "true" ]; then
8888
fi
8989
platform=x64
9090
# skip pull requests
91-
if [ "${TRAVIS_PULL_REQUEST}" != "false" ]; then
91+
if [ ! -z "${TRAVIS_PULL_REQUEST}" ] && [ "${TRAVIS_PULL_REQUEST}" != "false" ]; then
9292
upload=
9393
fi
9494
fi
9595

9696
if [ "${upload}" ]; then
9797
# rename binaries
98-
# and upload dmg to Bintray
9998
if [ $release -eq 1 ]; then
10099
target="QtQuickVcp"
101100
else
102101
target="QtQuickVcp_Development"
103102
fi
104103
mv build.release/QtQuickVcp.tar.gz ${target}-${version}-MacOSX-${platform}.tar.gz
105-
./build/travis/job_macos/bintray_lib.sh ${target}-${version}*.tar.gz
104+
# and upload dmg to Bintray
105+
# ./build/travis/job_macos/bintray_lib.sh ${target}-${version}*.tar.gz
106106

107107
if [ $release -eq 1 ]; then
108108
target="MachinekitClient"
109109
else
110110
target="MachinekitClient_Development"
111111
fi
112112
mv build.release/MachinekitClient.dmg ${target}-${version}-${platform}.dmg
113-
./build/travis/job_macos/bintray_app.sh ${target}*.dmg
113+
# ./build/travis/job_macos/bintray_app.sh ${target}*.dmg
114114
else
115115
echo "On branch '$branch' so dmg will not be uploaded." >&2
116116
fi

build/travis/job_macos/install.sh

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
set -x
44

55
# do not build mac for PR
6-
if [ "${TRAVIS_PULL_REQUEST}" != "false" ]; then
6+
if [ ! -z "${TRAVIS_PULL_REQUEST}" ] && [ "${TRAVIS_PULL_REQUEST}" != "false" ]; then
77
exit 0
88
fi
99

@@ -21,14 +21,14 @@ fi
2121

2222
brew update
2323
brew install libtool automake autoconf pkg-config bash coreutils
24-
brew install gnu-sed --with-default-names
24+
brew install gnu-sed
2525

2626
# install zeromq
2727
git clone https://github.com/zeromq/zeromq4-x.git
2828
cd zeromq4-x
2929
git checkout v4.0.8
3030
sh autogen.sh
31-
./configure --disable-static --enable-shared --prefix=/opt/local CC=clang CXX=clang++ CFLAGS="-arch x86_64" CXXFLAGS="-std=c++11 -stdlib=libstdc++ -O3 -arch x86_64" LDFLAGS="-stdlib=libstdc++"
31+
./configure --disable-static --enable-shared --prefix=/opt/local CC=clang CXX=clang CFLAGS="-arch x86_64" CXXFLAGS="-std=c++11 -stdlib=libc++ -O3 -arch x86_64" LDFLAGS="-stdlib=libc++"
3232
make
3333
sudo make install
3434
cd ..
@@ -76,7 +76,7 @@ echo "QT_LONG_VERSION QT_LONG_VERSION"
7676
if [[ "$QMAKE_VERSION" != "${QT_LONG_VERSION}" ]]; then
7777
rm -rf $QT_PATH
7878
echo "Downloading Qt"
79-
wget -c --no-check-certificate -nv https://download.qt.io/archive/qt/${QT_SHORT_VERSION}/${QT_LONG_VERSION}/${QT_INSTALLER_FILENAME}
79+
wget -c --no-check-certificate -nv https://download.qt.io/new_archive/qt/${QT_SHORT_VERSION}/${QT_LONG_VERSION}/${QT_INSTALLER_FILENAME}
8080
hdiutil mount ${QT_INSTALLER_FILENAME}
8181
cp -rf /Volumes/${QT_INSTALLER_ROOT}/${QT_INSTALLER_ROOT}.app $HOME/${QT_INSTALLER_ROOT}.app
8282
QT_INSTALLER_EXE=$HOME/${QT_INSTALLER_ROOT}.app/Contents/MacOS/${QT_INSTALLER_ROOT}

0 commit comments

Comments
 (0)