Skip to content

Commit

Permalink
Revert workflows to normal
Browse files Browse the repository at this point in the history
  • Loading branch information
rhinoella committed Jan 24, 2024
1 parent 827d940 commit 095cd9f
Show file tree
Hide file tree
Showing 4 changed files with 136 additions and 26 deletions.
114 changes: 114 additions & 0 deletions .github/workflows/build/osx-intel/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,114 @@
name: Build
description: Build on OSX

inputs:
threading:
default: true
extraCMakeFlags:
default: ""
cacheOnly:
type: boolean
default: false

runs:
using: "composite"
steps:

#
# Setup / Install Dependencies
#

- name: Setup Python
uses: actions/setup-python@v4
with:
python-version: ${{ env.pythonVersion }}

- name: Install Homebrew Dependencies for Intel
if: ${{ inputs.cacheOnly == 'false' }}
shell: bash
run: |
set -ex
brew update-reset
brew install ftgl ninja
brew install antlr
- name: Install Python Dependencies
shell: bash
run: |
pip3 install --user aqtinstall conan==1.58.0
- name: Retrieve Qt Cache
id: cache-qt
uses: actions/cache@v3
with:
key: osx-qt-${{ env.qtVersion }}
path: ${{ runner.temp }}/qt

- name: Install Qt
if: ${{ steps.cache-qt.outputs.cache-hit != 'true' }}
shell: bash
run: |
export PATH="$(python3 -m site --user-base)/bin:$PATH"
aqt install-qt --outputdir ${{ runner.temp }}/qt mac desktop ${{ env.qtVersion }}
#
# Main Build
#

- name: Retrieve Conan Cache
id: cache-conan
uses: actions/cache@v3
with:
key: osx-intel-conan-${{ env.conanHash }}
path: |
~/.conan
~/.conancache
- name: Install Conan Dependencies
shell: bash
run: |
set -ex
# Setup paths
export PATH="$(python3 -m site --user-base)/bin:$PATH"
mkdir build && cd build
conan config set storage.download_cache="${GITHUB_WORKSPACE}/.conancache"
conan install .. --build missing -s arch=${{ env.OSX_CONAN_TARGET }}

- name: Build
if: ${{ inputs.cacheOnly == 'false' }}
shell: bash
run: |
set -ex
# Setup paths
export PATH="$(python3 -m site --user-base)/bin:$PATH"
Qt6_DIR=${{ runner.temp }}/qt/${{ env.qtVersion }}/macos/lib/cmake/Qt6
QT_BASE_DIR=${{ runner.temp }}/qt/${{ env.qtVersion }}/macos
ANTLR_EXE=/usr/local/Cellar/antlr/${{ env.antlrVersion }}/antlr-${{ env.antlrVersion }}-complete.jar
echo "Detected ANTLR exe as [$ANTLR_EXE]"
echo "JAVA HOME: $JAVA_HOME_21_X64"
# Build
cd build
cmake -G Ninja -DGUI:bool=true -DMULTI_THREADING:bool=${{ inputs.threading }} -DJava_JAVA_EXECUTABLE:path=$JAVA_HOME_21_X64/bin/java -DANTLR_EXECUTABLE:string=$ANTLR_EXE -DCMAKE_OSX_ARCHITECTURES:string="${{ env.OSX_CMAKE_TARGET }}" ${{ inputs.extraCMakeFlags }} -DQT_BASE_DIR=$QT_BASE_DIR ../
cmake --build . --config Release
cd ../
# Deploy Conan dependencies for ease
mkdir deploy && cd deploy
conan install .. -g deploy -s arch=${{ env.OSX_CONAN_TARGET }}
- name: Upload Raw Build Artifacts
if: ${{ inputs.cacheOnly == 'false' }}
uses: actions/upload-artifact@v3
with:
name: osx-build-artifacts
path: |
${{ github.workspace }}/build
${{ github.workspace }}/deploy
retention-days: 1
19 changes: 9 additions & 10 deletions .github/workflows/continuous.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,10 @@ jobs:
- os: macos-latest
cmake_target: arm64
conan_target: armv8
#- os: macos-latest
# cmake_target: x86_64
# conan_target: x86_64
#- os: windows-latest
- os: macos-latest
cmake_target: x86_64
conan_target: x86_64
- os: windows-latest
runs-on: ${{ matrix.os }}
env:
OSX_CMAKE_TARGET: ${{ matrix.osx_cmake_target }}
Expand Down Expand Up @@ -76,19 +76,18 @@ jobs:
target: ${{ matrix.target }}

Package:
#needs: [ Build, BuildLinux ]
needs: [ Build ]
needs: [ Build, BuildLinux ]
strategy:
fail-fast: false
matrix:
include:
- os: macos-latest
cmake_target: arm64
conan_target: armv8
#- os: macos-latest
# cmake_target: x86_64
# conan_target: x86_64
#- os: windows-latest
- os: macos-latest
cmake_target: x86_64
conan_target: x86_64
- os: windows-latest
runs-on: ${{ matrix.os }}
env:
OSX_CMAKE_TARGET: ${{ matrix.osx_cmake_target }}
Expand Down
13 changes: 5 additions & 8 deletions .github/workflows/pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,18 +29,17 @@ jobs:
uses: "./.github/workflows/qc"

Build:
#needs: QC
strategy:
fail-fast: false
matrix:
include:
- os: macos-latest
osx_cmake_target: arm64
osx_conan_target: armv8
#- os: macos-latest
# cmake_target: x86_64
# conan_target: x86_64
#- os: windows-latest
- os: macos-latest
cmake_target: x86_64
conan_target: x86_64
- os: windows-latest
runs-on: ${{ matrix.os }}
env:
OSX_CMAKE_TARGET: ${{ matrix.osx_cmake_target }}
Expand All @@ -57,7 +56,6 @@ jobs:

BuildLinux:
needs: QC
if: false
strategy:
fail-fast: false
matrix:
Expand All @@ -80,8 +78,7 @@ jobs:
strategy:
fail-fast: false
matrix:
os: [ macos-latest]
#os: [ macos-latest, windows-latest ]
os: [ macos-latest, windows-latest ]
runs-on: ${{ matrix.os }}
env:
OSX_CMAKE_TARGET: ${{ matrix.osx_cmake_target }}
Expand Down
16 changes: 8 additions & 8 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,10 @@ jobs:
- os: macos-latest
osx_cmake_target: arm64
osx_conan_target: armv8
#- os: macos-latest
# cmake_target: x86_64
# conan_target: x86_64
#- os: windows-latest
- os: macos-latest
cmake_target: x86_64
conan_target: x86_64
- os: windows-latest
runs-on: ${{ matrix.os }}
env:
OSX_CMAKE_TARGET: ${{ matrix.osx_cmake_target }}
Expand Down Expand Up @@ -81,10 +81,10 @@ jobs:
- os: macos-latest
osx_cmake_target: arm64
osx_conan_target: armv8
#- os: macos-latest
# cmake_target: x86_64
# conan_target: x86_64
#- os: windows-latest
- os: macos-latest
cmake_target: x86_64
conan_target: x86_64
- os: windows-latest
runs-on: ${{ matrix.os }}
env:
OSX_CMAKE_TARGET: ${{ matrix.osx_cmake_target }}
Expand Down

0 comments on commit 095cd9f

Please sign in to comment.