Skip to content

Commit

Permalink
github actions for ubuntu and macos added
Browse files Browse the repository at this point in the history
  • Loading branch information
alemuntoni committed Dec 4, 2019
1 parent 3c6d6bf commit bfa1bbc
Show file tree
Hide file tree
Showing 4 changed files with 214 additions and 40 deletions.
127 changes: 127 additions & 0 deletions .github/workflows/CompileAndDeploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,127 @@
name: CompileAndDeploy

on:
schedule:
- cron: '0 0 1 * *' #every first day of the month at midnight

jobs:
ubuntu_build:
name: Build MeshLab (Ubuntu)
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v1
- name: Installing dependencies
run: |
sudo add-apt-repository ppa:beineri/opt-qt-5.12.0-bionic -y
sudo apt update
sudo apt install -y qt512base qt512script qt512xmlpatterns mesa-common-dev libglu1-mesa-dev
cd ..
git clone --depth=1 --branch=devel https://github.com/cnr-isti-vclab/vcglib.git
cd meshlab
- name: Setting env variables
shell: bash
run: |
echo '::set-env name=QT_BASE_DIR::/opt/qt512'
echo '::set-env name=QTDIR::/opt/qt512'
echo '::add-path::/opt/qt512/bin'
echo '::set-env name=LD_LIBRARY_PATH::/opt/qt512/lib/x86_64-linux-gnu:/opt/qt512/lib:${{env.LD_LIBRARY_PATH}}'
echo '::set-env name=PKG_CONFIG_PATH::/opt/qt512/lib/pkgconfig:${{env.PKG_CONFIG_PATH}}'
- name: Compiling external
run: |
cd src/external
qmake external.pro
make -j8
- name: Compiling meshlab
run: |
cd src/
qmake meshlab_full.pro
make -j8
macos_build:
name: Build MeshLab (MacOS)
runs-on: macos

steps:
- uses: actions/checkout@v1
- name: Installing dependencies
run: |
brew install llvm libomp qt
npm install -g appdmg
export COLUMNS=80
cd ..
git clone --depth=1 --branch=devel https://github.com/cnr-isti-vclab/vcglib.git
cd meshlab
- name: Setting env variables
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}}'
- name: Compiling external
run: |
cd src/external
qmake external.pro
make -j8
- name: Compiling meshlab
run: |
cd src/
qmake meshlab_full.pro
make -j8
- name: Creating DMG
run: |
cd src/install/macx
./macinstall_v2018.sh
echo "------ Completed!!! We should have a dmg here "
cd ../../..
ls -la src/distrib/MeshLab201804.dmg
- name: Upload DMG
uses: actions/upload-artifact@v1
with:
name: meshlab_dmg
path: src/distrib/MeshLab201804.dmg

create_prerelease:
name: Create Prerelease
needs: [ubuntu_build, macos_build]
runs-on: ubuntu-latest
steps:
- name: Setting env variables
id: envs
run: |
echo ::set-output name=date::"$(date +%Y-%m)"
- name: Publish PreRelease
id: create_prerelease
uses: actions/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: Meshlab-${{steps.envs.outputs.date}}-${{github.sha}}
release_name: MeshLab-${{steps.envs.outputs.date}}-beta
draft: false
prerelease: true
- name: Download DMG
uses: actions/download-artifact@v1
with:
name: meshlab_dmg
- name: Upload PreReleaseMacOS
id: upload-prerelease-macos
uses: actions/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_prerelease.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps
asset_path: meshlab_dmg/MeshLab201804.dmg
asset_name: MeshLab201804.dmg
asset_content_type: MeshLab for MacOS
# - name: Upload PreReleaseUbuntu
# id: upload-prerelease-ubuntu
# uses: actions/[email protected]
# env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# with:
# upload_url: ${{ steps.create_prerelease.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps
# asset_path: src/distrib/MeshLab201804.dmg
# asset_name: MeshLab201804.dmg
# asset_content_type: MeshLab for MacOS
49 changes: 49 additions & 0 deletions .github/workflows/CompileMacOS.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
name: CompileMacOS

on:
[push, pull_request]

jobs:
macos_build:
name: Build MeshLab (MacOS)
runs-on: macos

steps:
- uses: actions/checkout@v1
- name: Installing dependencies
run: |
brew install llvm libomp qt
npm install -g appdmg
export COLUMNS=80
cd ..
git clone --depth=1 --branch=devel https://github.com/cnr-isti-vclab/vcglib.git
cd meshlab
- name: Setting env variables
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}}'
- name: Compiling external
run: |
cd src/external
qmake external.pro
make -j8
- name: Compiling meshlab
run: |
cd src/
qmake meshlab_full.pro
make -j8
- name: Creating DMG
run: |
cd src/install/macx
./macinstall_v2018.sh
echo "------ Completed!!! We should have a dmg here "
cd ../../..
ls -la src/distrib/MeshLab201804.dmg
- name: Upload DMG
uses: actions/upload-artifact@v1
with:
name: meshlab_dmg
path: src/distrib/MeshLab201804.dmg
38 changes: 38 additions & 0 deletions .github/workflows/CompileUbuntu.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: CompileUbuntu

on:
[push, pull_request]

jobs:
ubuntu_build:
name: Build MeshLab (Ubuntu)
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v1
- name: Installing dependencies
run: |
sudo add-apt-repository ppa:beineri/opt-qt-5.12.0-bionic -y
sudo apt update
sudo apt install -y qt512base qt512script qt512xmlpatterns mesa-common-dev libglu1-mesa-dev
cd ..
git clone --depth=1 --branch=devel https://github.com/cnr-isti-vclab/vcglib.git
cd meshlab
- name: Setting env variables
shell: bash
run: |
echo '::set-env name=QT_BASE_DIR::/opt/qt512'
echo '::set-env name=QTDIR::/opt/qt512'
echo '::add-path::/opt/qt512/bin'
echo '::set-env name=LD_LIBRARY_PATH::/opt/qt512/lib/x86_64-linux-gnu:/opt/qt512/lib:${{env.LD_LIBRARY_PATH}}'
echo '::set-env name=PKG_CONFIG_PATH::/opt/qt512/lib/pkgconfig:${{env.PKG_CONFIG_PATH}}'
- name: Compiling external
run: |
cd src/external
qmake external.pro
make -j8
- name: Compiling meshlab
run: |
cd src/
qmake meshlab_full.pro
make -j8
40 changes: 0 additions & 40 deletions .github/workflows/ubuntu-latest-gcc.yml

This file was deleted.

0 comments on commit bfa1bbc

Please sign in to comment.