Skip to content

build m1 binary

build m1 binary #153

Workflow file for this run

name: CD
on:
- push
- pull_request
env:
OSX_QT_VERSION: 6.7.0
jobs:
build-win:
name: win build (msys2)
if: github.event_name == 'push'
runs-on: windows-latest
defaults:
run:
shell: msys2 {0}
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- uses: msys2/setup-msys2@v2
with:
msystem: MINGW64
update: true
install: git mingw-w64-x86_64-cmake make mingw-w64-x86_64-ninja mingw-w64-x86_64-toolchain mingw-w64-x86_64-qt6-base mingw-w64-x86_64-qt6-charts mingw-w64-x86_64-qt6-svg mingw-w64-x86_64-qt6-tools mingw-w64-x86_64-nsis zip unzip
- name: Fetch tag annotations
run: git fetch --tags --force
- name: Configure
run: |
mkdir build
cd build
cmake ..
- name: Build
run: |
cd build
cmake --build .
- name: Package
id: package
run: |
cd build
VERSION_NAME=`git describe`
../.github/scripts/package_msys.sh
echo "VERSION_NAME=${VERSION_NAME}">> $GITHUB_OUTPUT
- name: Upload zip to GitHub Artifacts
if: github.event_name == 'push'
uses: actions/upload-artifact@v3
with:
name: dataexplorer-win-qt6-zip
path: ./build/package-zip/DataExplorer-win-qt6-${{ steps.package.outputs.VERSION_NAME }}.zip
- name: Upload to GitHub Artifacts
if: github.event_name == 'push'
uses: actions/upload-artifact@v3
with:
name: dataexplorer-win-qt6-exe
path: ./build/DataExplorer-win-qt6-${{ steps.package.outputs.VERSION_NAME }}.exe
- name: Release exe
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
with:
prerelease: ${{ contains(github.ref, 'alpha') || contains(github.ref, 'beta') || contains(github.ref, 'rc') }}
files: |
./build/DataExplorer-win-qt6-${{ steps.package.outputs.VERSION_NAME }}.exe
./build/package-zip/DataExplorer-win-qt6-${{ steps.package.outputs.VERSION_NAME }}.zip
env:
GITHUB_TOKEN: ${{ secrets.GITHUBTOKEN }}
###################################
build-linux-release:
name: linux appimage
if: false
runs-on: ubuntu-18.04
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Fetch tag annotations
run: git fetch --tags --force
- name: Updates
run: sudo apt-get update
- name: Dependencies
run: sudo apt-get install qtbase5-dev libqt5charts5-dev qt5-default cmake
- name: Configure
run: |
mkdir build
cd build
cmake -DCMAKE_INSTALL_PREFIX=appdir/usr ..
- name: Build
run: |
cd build
cmake --build .
- name: Package
id: package
run: |
cd build
VERSION_NAME=`git describe`
. ../.github/scripts/package_linux.sh
echo "VERSION_NAME=${VERSION_NAME}">> $GITHUB_OUTPUT
- name: Upload to Github Artifacts
if: github.event_name == 'push'
uses: actions/upload-artifact@v3
with:
name: dataexplorer-linux
path: DataExplorer-linux-${{ steps.package.outputs.VERSION_NAME }}-x86_64.AppImage
- name: Release
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
with:
prerelease: ${{ contains(github.ref, 'alpha') || contains(github.ref, 'beta') || contains(github.ref, 'rc') }}
files: DataExplorer-linux-${{ steps.package.outputs.VERSION_NAME }}-x86_64.AppImage
env:
GITHUB_TOKEN: ${{ secrets.GITHUBTOKEN }}
############################
macosx:
name: Mac OS X
runs-on: macos-12
if: true
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Fetch tag annotations
run: git fetch --tags --force
- name: Install Dependencies
run: |
wget https://github.com/sunderme/homebrew-qt6-modules/releases/download/${{ env.OSX_QT_VERSION }}/QtBase-${{ env.OSX_QT_VERSION }}-Darwin.tar.xz
sudo tar xvf ./QtBase-${{ env.OSX_QT_VERSION }}-Darwin.tar.xz -C /usr/local
rm QtBase-${{ env.OSX_QT_VERSION }}-Darwin.tar.xz
wget https://github.com/sunderme/homebrew-qt6-modules/releases/download/${{ env.OSX_QT_VERSION }}/QtSvg-${{ env.OSX_QT_VERSION }}-Darwin.tar.xz
sudo tar xvf ./QtSvg-${{ env.OSX_QT_VERSION }}-Darwin.tar.xz -C /usr/local/QtBase-${{ env.OSX_QT_VERSION }}-Darwin --strip-components=1
rm QtSvg-${{ env.OSX_QT_VERSION }}-Darwin.tar.xz
wget https://github.com/sunderme/homebrew-qt6-modules/releases/download/${{ env.OSX_QT_VERSION }}/QtCharts-${{ env.OSX_QT_VERSION }}-Darwin.tar.xz
sudo tar xvf ./QtCharts-${{ env.OSX_QT_VERSION }}-Darwin.tar.xz -C /usr/local/QtBase-${{ env.OSX_QT_VERSION }}-Darwin --strip-components=1
rm QtCharts-${{ env.OSX_QT_VERSION }}-Darwin.tar.xz
- name: Configure
run: |
mkdir build
cd build
/usr/local/QtBase-${{ env.OSX_QT_VERSION }}-Darwin/bin/qt-cmake ..
- name: Build
run: cmake --build build
- name: Workarounds
run: |
mkdir -p texstudio.app/Contents/Frameworks
cp /usr/local/lib/libbrotlicommon.1.dylib texstudio.app/Contents/Frameworks
- name: Package
id: package
run: |
cd build
/usr/local/QtBase-${{ env.OSX_QT_VERSION }}-Darwin/bin/macdeployqt dataexplorer.app -dmg
VERSION_NAME=`git describe`
cp dataexplorer.dmg dataexplorer-osx-${VERSION_NAME}.dmg
echo "VERSION_NAME=${VERSION_NAME}">> $GITHUB_OUTPUT
- name: Upload to Github artifacts
if: github.event_name == 'push'
uses: actions/upload-artifact@v3
with:
name: dataexplorer-osx
path: build/dataexplorer-osx-${{ steps.package.outputs.VERSION_NAME }}.dmg
- name: Release
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
with:
prerelease: ${{ contains(github.ref, 'alpha') || contains(github.ref, 'beta') || contains(github.ref, 'rc') }}
files: build/dataexplorer-osx-${{ steps.package.outputs.VERSION_NAME }}.dmg
env:
GITHUB_TOKEN: ${{ secrets.GITHUBTOKEN }}
macosxM1:
name: Mac OS X (M1)
runs-on: macos-14
if: true
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Fetch tag annotations
run: git fetch --tags --force
- name: Install Dependencies
run: |
wget https://github.com/sunderme/homebrew-qt6-modules/releases/download/${{ env.OSX_QT_VERSION }}/QtBase-${{ env.OSX_QT_VERSION }}-Darwin-M1.tar.xz
sudo tar xvf ./QtBase-${{ env.OSX_QT_VERSION }}-Darwin-M1.tar.xz -C /usr/local
rm QtBase-${{ env.OSX_QT_VERSION }}-Darwin.tar.xz
wget https://github.com/sunderme/homebrew-qt6-modules/releases/download/${{ env.OSX_QT_VERSION }}/QtSvg-${{ env.OSX_QT_VERSION }}-Darwin-M1.tar.xz
sudo tar xvf ./QtSvg-${{ env.OSX_QT_VERSION }}-Darwin-M1.tar.xz -C /usr/local/QtBase-${{ env.OSX_QT_VERSION }}-Darwin --strip-components=1
rm QtSvg-${{ env.OSX_QT_VERSION }}-Darwin.tar.xz
wget https://github.com/sunderme/homebrew-qt6-modules/releases/download/${{ env.OSX_QT_VERSION }}/QtCharts-${{ env.OSX_QT_VERSION }}-Darwin-M1.tar.xz
sudo tar xvf ./QtCharts-${{ env.OSX_QT_VERSION }}-Darwin-M1.tar.xz -C /usr/local/QtBase-${{ env.OSX_QT_VERSION }}-Darwin --strip-components=1
rm QtCharts-${{ env.OSX_QT_VERSION }}-Darwin-M1.tar.xz
- name: Configure
run: |
mkdir build
cd build
/usr/local/QtBase-${{ env.OSX_QT_VERSION }}-Darwin/bin/qt-cmake ..
- name: Build
run: cmake --build build
- name: Workarounds
run: |
mkdir -p texstudio.app/Contents/Frameworks
cp /usr/local/lib/libbrotlicommon.1.dylib texstudio.app/Contents/Frameworks
- name: Package
id: package
run: |
cd build
# /usr/local/QtBase-${{ env.OSX_QT_VERSION }}-Darwin/bin/macdeployqt dataexplorer.app -dmg
/usr/local/QtBase-${{ env.OSX_QT_VERSION }}-Darwin/bin/macdeployqt dataexplorer.app
codesign --force --deep --sign - dataexplorer.app
. ../.github/scripts/get-version.sh
cp -r dataexplorer.app ../dataexplorer-${GIT_VERSION}-osx-m1.app
mkdir ../app
mv dataexplorer.app ../app/dataexplorer-osx-m1-${VERSION_NAME}.app
cd ..
zip -r dataexplorer-${GIT_VERSION}-osx-m1.zip dataexplorer-${GIT_VERSION}-osx-m1.app
echo "VERSION_NAME=${VERSION_NAME}" >> $GITHUB_OUTPUT
- name: Upload to Github artifacts
if: github.event_name == 'push'
uses: actions/upload-artifact@v3
with:
name: dataexplorer-osx-m1
path: app
- name: Release
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
with:
prerelease: ${{ contains(github.ref, 'alpha') || contains(github.ref, 'beta') || contains(github.ref, 'rc') }}
files: app/dataexplorer-osx-m1-${{ steps.package.outputs.VERSION_NAME }}.dmg
env:
GITHUB_TOKEN: ${{ secrets.GITHUBTOKEN }}