Skip to content

Commit 35307f3

Browse files
committed
build: Add GitHub CI/CD for Linux, macOS, Windows (machinekit#299)
Also some small build fixes. Related to machinekit#298.
1 parent 3863795 commit 35307f3

File tree

7 files changed

+141
-67
lines changed

7 files changed

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

4747
**QtQuickVcp direct download links**
4848

appveyor.yml

Lines changed: 38 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,23 @@
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

812
environment:
13+
global:
14+
release_description: |
15+
MachinekitClient_Development and QtQuickVcp_Development modules for
16+
x64 (64-bit Intel/AMD) Linux systems (Portable AppImages)
17+
Windows 32bit and 64bit (x86 zip and x64 zip)
18+
x64 (64-bit Intel/AMD) MacOSX systems
19+
Automated builds of the master development branch. FOR TESTING PURPOSES ONLY!
20+
Extract the contents of the archive to your Qt installation folder to use it
21+
922
matrix:
1023
- QTDIR: C:\Qt\5.9\msvc2015_64
1124
VSVER: 14.0
@@ -18,6 +31,7 @@ configuration:
1831
- release
1932

2033
install:
34+
- ps: $env:release_tag = &git rev-parse --short $env:APPVEYOR_REPO_COMMIT
2135
- '%QTDIR%\bin\qtenv2.bat'
2236
- '"C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat" %ARCH%'
2337
- qmake -v
@@ -36,34 +50,24 @@ artifacts:
3650
name: QtQuickVcp-x64-archive
3751

3852
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
53+
- description: $(release_description)
54+
provider: GitHub
55+
auth_token:
56+
secure: M9qlWKrBp+EjFfJen7YozWiJ1EjVaeLo2qfDKZsSgI4/X6N8HSub1cDTX4N6z/rk
4957
artifact: QtQuickVcp-x64-archive
50-
version: $(appveyor_build_version)
58+
tag: $(release_tag)
59+
force_update: true
5160
on:
5261
branch: master
5362
appveyor_repo_tag: false
5463

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
64+
- description: $(release_description)
65+
provider: GitHub
66+
auth_token:
67+
secure: M9qlWKrBp+EjFfJen7YozWiJ1EjVaeLo2qfDKZsSgI4/X6N8HSub1cDTX4N6z/rk
6568
artifact: MachinekitClient-x64-archive
66-
version: $(appveyor_build_version)
69+
tag: $(release_tag)
70+
force_update: true
6771
on:
6872
branch: master
6973
appveyor_repo_tag: false
@@ -98,34 +102,24 @@ deploy:
98102
on:
99103
appveyor_repo_tag: true
100104

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
105+
- description: $(release_description)
106+
provider: GitHub
107+
auth_token:
108+
secure: M9qlWKrBp+EjFfJen7YozWiJ1EjVaeLo2qfDKZsSgI4/X6N8HSub1cDTX4N6z/rk
111109
artifact: QtQuickVcp-x86-archive
112-
version: $(appveyor_build_version)
110+
tag: $(release_tag)
111+
force_update: true
113112
on:
114113
branch: master
115114
appveyor_repo_tag: false
116115

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
116+
- description: $(release_description)
117+
provider: GitHub
118+
auth_token:
119+
secure: M9qlWKrBp+EjFfJen7YozWiJ1EjVaeLo2qfDKZsSgI4/X6N8HSub1cDTX4N6z/rk
127120
artifact: MachinekitClient-x86-archive
128-
version: $(appveyor_build_version)
121+
tag: $(release_tag)
122+
force_update: true
129123
on:
130124
branch: master
131125
appveyor_repo_tag: false

build/github/release.sh

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
#! /usr/bin/env sh
2+
3+
APP="MachinekitClient_Development"
4+
LIB="QtQuickVcp_Development"
5+
APPNAME=$(find . -name "${APP}$1")
6+
TAGNAME=$(git rev-parse --short "$GITHUB_SHA")
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 (x86 zip and x64 zip)
12+
- x64 (64-bit Intel/AMD) MacOSX systems
13+
Automated builds of the master development branch. FOR TESTING PURPOSES ONLY!
14+
Extract the contents of the archive to your Qt installation folder to use ${LIB}."
15+
16+
gh release create "$TAGNAME" --notes "$DESCRIPTION" --title "$TAGNAME"
17+
gh release upload "$TAGNAME" "${APPNAME}#${APP} ${OS_ARCH}"
18+
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/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)