Skip to content

Commit 33f23bd

Browse files
committed
build: Add GitHub CI/CD on macOS (machinekit#299)
1 parent c0b25d0 commit 33f23bd

File tree

5 files changed

+54
-20
lines changed

5 files changed

+54
-20
lines changed
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
name: macOS build
2+
3+
on: [push]
4+
5+
jobs:
6+
buildMacOS:
7+
name: macOS
8+
runs-on: macos-10.15
9+
steps:
10+
- name: Check out repository code
11+
uses: actions/checkout@v2
12+
- run: echo "QT_SHORT_VERSION=5.8" >> $GITHUB_ENV
13+
- run: echo "QT_LONG_VERSION=5.8.0" >> $GITHUB_ENV
14+
- run: echo "QT_INSTALLER_ROOT=qt-opensource-mac-x64-clang-${QT_LONG_VERSION}" >> $GITHUB_ENV
15+
- run: echo "QT_INSTALLER_FILENAME=${QT_INSTALLER_ROOT}.dmg" >> $GITHUB_ENV
16+
- run: echo "QT_PATH=$HOME/qt" >> $GITHUB_ENV
17+
- run: echo "QT_MACOS=$QT_PATH/$QT_SHORT_VERSION/clang_64" >> $GITHUB_ENV
18+
- run: echo "$QT_MACOS/bin" >> $GITHUB_PATH
19+
- run: echo "/usr/local/opt/gnu-tar/libexec/gnubin" >> $GITHUB_PATH
20+
- run: ./build/travis/job_macos/install.sh
21+
- run: ./build/travis/job_macos/build.sh
22+
- name: Release
23+
run: |
24+
tagname="$(find . -name "$FILE" | sed -E 's|^[^-]*-(.*)-[^-]*$|\1|')"
25+
gh release create "$tagname" -n "$MESSAGE" -t "MachinekitClient-Development" "$FILE"
26+
env:
27+
MESSAGE: |
28+
MachinekitClient_Development for
29+
x64 (64-bit Intel/AMD) Linux systems (Portable AppImages)
30+
Windows 32bit and 64bit
31+
x64 (64-bit Intel/AMD) MacOSX systems
32+
FOR TESTING PURPOSES ONLY!
33+
FILE: MachinekitClient_Development*x64.dmg
34+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

README.md

Lines changed: 3 additions & 3 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/machinekit/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

build/travis/job_macos/build.sh

Lines changed: 4 additions & 4 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,7 +88,7 @@ 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
@@ -102,15 +102,15 @@ if [ "${upload}" ]; then
102102
target="QtQuickVcp_Development"
103103
fi
104104
mv build.release/QtQuickVcp.tar.gz ${target}-${version}-MacOSX-${platform}.tar.gz
105-
./build/travis/job_macos/bintray_lib.sh ${target}-${version}*.tar.gz
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}

src/pathview/glpathitem.cpp

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -803,58 +803,58 @@ GLPathItem::Position GLPathItem::calculateNewPosition(const machinetalk::Positio
803803
if (newPosition.has_x()) {
804804
position.x = m_activeOffsets.g92Offset.x;
805805
position.x += m_activeOffsets.g5xOffsets.at(m_activeOffsets.g5xOffsetIndex-1).x;
806-
position.x += m_activeOffsets.toolOffset.x;
806+
// position.x += m_activeOffsets.toolOffset.x;
807807
position.x += newPosition.x();
808808
}
809809

810810
if (newPosition.has_y()) {
811811
position.y = m_activeOffsets.g92Offset.y;
812812
position.y += m_activeOffsets.g5xOffsets.at(m_activeOffsets.g5xOffsetIndex-1).y;
813-
position.y += m_activeOffsets.toolOffset.y;
813+
// position.y += m_activeOffsets.toolOffset.y;
814814
position.y += newPosition.y();
815815
}
816816

817817
if (newPosition.has_z()) {
818818
position.z = m_activeOffsets.g92Offset.z;
819819
position.z += m_activeOffsets.g5xOffsets.at(m_activeOffsets.g5xOffsetIndex-1).z;
820-
position.z += m_activeOffsets.toolOffset.z;
820+
// position.z += m_activeOffsets.toolOffset.z;
821821
position.z += newPosition.z();
822822
}
823823

824824
if (newPosition.has_a()) {
825825
position.a = m_activeOffsets.g92Offset.a;
826826
position.a += m_activeOffsets.g5xOffsets.at(m_activeOffsets.g5xOffsetIndex-1).a;
827-
position.a += m_activeOffsets.toolOffset.a;
827+
// position.a += m_activeOffsets.toolOffset.a;
828828
position.a += newPosition.a();
829829
}
830830
if (newPosition.has_b()) {
831831
position.b = m_activeOffsets.g92Offset.b;
832832
position.b += m_activeOffsets.g5xOffsets.at(m_activeOffsets.g5xOffsetIndex-1).b;
833-
position.b += m_activeOffsets.toolOffset.b;
833+
// position.b += m_activeOffsets.toolOffset.b;
834834
position.b += newPosition.b();
835835
}
836836
if (newPosition.has_c()) {
837837
position.c = m_activeOffsets.g92Offset.c;
838838
position.c += m_activeOffsets.g5xOffsets.at(m_activeOffsets.g5xOffsetIndex-1).c;
839-
position.c += m_activeOffsets.toolOffset.c;
839+
// position.c += m_activeOffsets.toolOffset.c;
840840
position.c += newPosition.c();
841841
}
842842
if (newPosition.has_u()) {
843843
position.u = m_activeOffsets.g92Offset.u;
844844
position.u += m_activeOffsets.g5xOffsets.at(m_activeOffsets.g5xOffsetIndex-1).u;
845-
position.u += m_activeOffsets.toolOffset.u;
845+
// position.u += m_activeOffsets.toolOffset.u;
846846
position.u += newPosition.u();
847847
}
848848
if (newPosition.has_v()) {
849849
position.v = m_activeOffsets.g92Offset.v;
850850
position.v += m_activeOffsets.g5xOffsets.at(m_activeOffsets.g5xOffsetIndex-1).v;
851-
position.v += m_activeOffsets.toolOffset.v;
851+
// position.v += m_activeOffsets.toolOffset.v;
852852
position.v += newPosition.v();
853853
}
854854
if (newPosition.has_w()) {
855855
position.w = m_activeOffsets.g92Offset.w;
856856
position.w += m_activeOffsets.g5xOffsets.at(m_activeOffsets.g5xOffsetIndex-1).w;
857-
position.w += m_activeOffsets.toolOffset.w;
857+
// position.w += m_activeOffsets.toolOffset.w;
858858
position.w += newPosition.w();
859859
}
860860

0 commit comments

Comments
 (0)