Skip to content

RARC tab: Enable multi-select editing compression and preload #271

RARC tab: Enable multi-select editing compression and preload

RARC tab: Enable multi-select editing compression and preload #271

Workflow file for this run

name: Build
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
workflow_dispatch:
inputs:
version:
description: Version
jobs:
build:
strategy:
matrix:
include:
- name: Windows Build
os: windows-latest
architecture: x64
artifact: windows
upload_path_suffix: '/*'
- name: MacOS Build
os: macos-latest
architecture: x64
artifact: macos
upload_path_suffix: '.zip'
- name: Linux Build
os: ubuntu-latest
architecture: x64
artifact: linux
upload_path_suffix: '/*'
runs-on: ${{ matrix.os }}
defaults:
run:
shell: bash
env:
ACTIONS_ALLOW_UNSECURE_COMMANDS: true
MACOSX_DEPLOYMENT_TARGET: 10.15
steps:
- uses: actions/checkout@v3
with:
submodules: recursive
- name: Set up Python
id: setup-py
uses: actions/setup-python@v4
with:
python-version: '3.12'
architecture: ${{ matrix.architecture }}
cache: 'pip' # Cache all pip dependency downloads
- name: Get PyJ3DUltra submodule status for cache
run: |
git submodule status ./PyJ3DUltra > pyj3dultra_submodule_status.txt
- name: Cache PyJ3DUltra
id: cache-pyj3dultra
uses: actions/cache@v3
with:
path: '${{ github.workspace }}/PyJ3DUltra/build'
key: pyj3dultra-${{ runner.os }}-py${{ steps.setup-py.outputs.python-version }}-${{ hashFiles('pyj3dultra_submodule_status.txt') }}
- name: Setup MSVC for Windows
if: runner.os == 'Windows' && steps.cache-pyj3dultra.outputs.cache-hit != 'true'
uses: ilammy/msvc-dev-cmd@v1
- name: Setup cmake
if: steps.cache-pyj3dultra.outputs.cache-hit != 'true'
uses: lukka/get-cmake@latest
- name: Setup vcpkg
if: runner.os == 'Windows' && steps.cache-pyj3dultra.outputs.cache-hit != 'true'
uses: lukka/[email protected]
with:
vcpkgGitCommitId: 'ad46340bfce415333d6a2139592c22a499fb0df0'
vcpkgDirectory: '${{ github.workspace }}/vcpkg'
vcpkgJsonGlob: '**/PyJ3DUltra/vcpkg.json'
- name: Integrate vcpkg
if: runner.os == 'Windows' && steps.cache-pyj3dultra.outputs.cache-hit != 'true'
run: |
vcpkg integrate install
- name: Run CMake
if: steps.cache-pyj3dultra.outputs.cache-hit != 'true'
uses: lukka/run-cmake@v3
with:
cmakeListsOrSettingsJson: CMakeListsTxtAdvanced
cmakeListsTxtPath: '${{ github.workspace }}/PyJ3DUltra/CMakeLists.txt'
buildDirectory: '${{ github.workspace }}/PyJ3DUltra/build'
useVcpkgToolchainFile: true
cmakeAppendedArgs: '-G Ninja -D CMAKE_BUILD_TYPE=Release'
- name: Install Python dependencies
run: |
python -m pip install --upgrade pip
python -m pip install -r requirements_full.txt
- name: Install any missing Qt dependencies
if: runner.os == 'Linux'
run: |
sudo apt-get update
sudo apt-get install -y qtbase5-dev
sudo apt-get install -y libxcb-cursor0
- name: Set variables
id: vars
run: |
USER_INPUT_VERSION=${{ github.event.inputs.version }}
TXT_VERSION=$(cat version.txt)
GIT_SHA_SHORT=$(git rev-parse --short=7 ${{ github.sha }})
echo "full_version=${USER_INPUT_VERSION:-${TXT_VERSION}_${GIT_SHA_SHORT}}" >> $GITHUB_OUTPUT
- name: Set version
id: version
run: |
echo ${{ steps.vars.outputs.full_version }} > version.txt
- name: Build Python App
run: python -m PyInstaller --log-level=WARN gcft.spec
- name: Bundle Python App
run: python build.py
- name: Upload Python App
uses: actions/upload-artifact@v3
with:
name: gcft-${{ steps.vars.outputs.full_version }}-${{ matrix.artifact }}-${{ matrix.architecture }}
path: dist/release_archive_${{ steps.vars.outputs.full_version }}_${{ matrix.architecture }}${{ matrix.upload_path_suffix }}