-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
102 additions
and
22 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
|
||
name: BUILD-RELEASE | ||
|
||
# Controls when the action will run. Triggers the workflow on push or pull request | ||
on: | ||
push: | ||
push: | ||
branches: [ release ] | ||
pull_request: | ||
branches: [ release ] | ||
|
||
# A workflow run is made up of one or more jobs that can run sequentially or in parallel | ||
jobs: | ||
# This workflow contains a single job called "build" | ||
build: | ||
|
||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
os: [windows-latest, macos-latest, ubuntu-latest] | ||
|
||
steps: | ||
|
||
- name : Setup Environment Variables | ||
shell: python | ||
run: | | ||
import os | ||
from os import path | ||
main_dir = path.join(os.getcwd(),'..') | ||
main_dir = path.abspath(main_dir) | ||
print("::set-env name=_MAIN_DIR::{}".format(main_dir)) | ||
- name: Cache build environment | ||
uses: actions/cache@v2 | ||
env: | ||
cache-name: ${{ github.ref }}-${{ runner.os }} | ||
with: | ||
path: ${{ env._MAIN_DIR }} | ||
key: build-cache-${{ env.cache-name }} | ||
|
||
- uses: actions/checkout@v2 | ||
|
||
- name: Build.py | ||
run: python build.py | ||
|
||
- name: Upload Build | ||
uses: actions/upload-artifact@v2 | ||
with: | ||
name: Blender-Release-${{ runner.os }} | ||
path: ${{ env._MAIN_DIR }}/build_release/bin/ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -46,3 +46,5 @@ Desktop.ini | |
|
||
# smoke simulation noise tile (generated) | ||
waveletNoiseTile.bin | ||
|
||
!.github |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
import sys | ||
import os | ||
from os import path | ||
import subprocess | ||
|
||
print("Checkout submodules") | ||
subprocess.check_call(['git','submodule','update','--init','--recursive']) | ||
|
||
print("Get binary dependencies") | ||
if sys.platform.startswith('linux'): | ||
#Assumes apt-get | ||
subprocess.check_call(['sudo','apt-get','update']) | ||
subprocess.check_call(['sudo','apt-get','install','build-essential', | ||
'git','subversion','cmake','libx11-dev','libxxf86vm-dev','libxcursor-dev', | ||
'libxi-dev','libxrandr-dev','libxinerama-dev','libglew-dev']) | ||
|
||
SVN_DIR= None | ||
platform_dir = { | ||
'win32' : 'win64_vc15', | ||
'darwin' : 'darwin', | ||
'linux' : 'linux_centos7_x86_64' | ||
} | ||
for key, value in platform_dir.items(): | ||
if sys.platform.startswith(key): | ||
SVN_DIR = value | ||
|
||
SVN = 'https://svn.blender.org/svnroot/bf-blender/tags/blender-2.83.1-release/lib/' + SVN_DIR | ||
binaries_path = path.join('..','lib',SVN_DIR) | ||
try: | ||
subprocess.check_call(['svn','checkout',SVN,binaries_path]) | ||
except: | ||
subprocess.check_call(['svn','switch',SVN,binaries_path]) | ||
|
||
BUILD_DIR = path.join('..','build_release') | ||
|
||
print("Make sure the build directory exists") | ||
if path.exists(BUILD_DIR) == False: | ||
os.mkdir(BUILD_DIR) | ||
|
||
print("Configure Blender project") | ||
if sys.platform == 'win32': | ||
#Specify 64 bits architecture on Windows | ||
subprocess.check_call(['cmake','-A','x64','-S','.','-B',BUILD_DIR]) | ||
else: | ||
subprocess.check_call(['cmake','-S','.','-B',BUILD_DIR]) | ||
|
||
print("Build Blender project") | ||
subprocess.check_call(['cmake','--build',BUILD_DIR,'--target','install','--config','Release']) |