meshlab/.github/workflows/CompileMacOS.yml
2020-01-27 18:16:12 +01:00

49 lines
1.5 KiB
YAML
Executable File

name: CompileMacOS
on:
[push, pull_request]
jobs:
macos_build:
name: Build MeshLab (MacOS)
runs-on: macos
steps:
- uses: actions/checkout@v2
- name: Checkout submodules
shell: bash
run: |
auth_header="$(git config --local --get http.https://github.com/.extraheader)"
git submodule sync --recursive
git -c "http.extraheader=$auth_header" -c protocol.version=2 submodule update --init --force --recursive --depth=1
- name: Installing dependencies
run: |
brew install llvm libomp qt
npm install -g appdmg
- name: Setting env variables
id: envs
shell: bash
run: |
echo '::set-env name=QTDIR::/usr/local/opt/qt'
echo '::add-path::/usr/local/opt/qt/bin'
echo '::set-env name=LD_LIBRARY_PATH::/usr/local/opt/qt/lib:${{env.LD_LIBRARY_PATH}}'
echo '::set-env name=PKG_CONFIG_PATH::/usr/local/opt/qt/lib:${{env.PKG_CONFIG_PATH}}'
echo ::set-output name=date::"$(date +%Y.%m)"
- name: Compiling MeshLab
run: |
cd src/
qmake
make -j4
- name: Creating DMG
run: |
cd install/macx
./macinstall_latest.sh
cd ../..
ls -la distrib/MeshLab${{steps.envs.outputs.date}}.dmg
mv distrib/MeshLab${{steps.envs.outputs.date}}.dmg distrib/MeshLab${{steps.envs.outputs.date}}-macos.dmg
- name: Uploading DMG
uses: actions/upload-artifact@v1
with:
name: meshlab_macos
path: distrib/MeshLab${{steps.envs.outputs.date}}-macos.dmg