mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-07-10 12:23:58 -07:00
move job directly to steps
This commit is contained in:
parent
8983f147a5
commit
341eeb5a42
1 changed files with 33 additions and 67 deletions
100
.github/workflows/desktop-build.yml
vendored
100
.github/workflows/desktop-build.yml
vendored
|
|
@ -101,70 +101,6 @@ jobs:
|
|||
--target "$target" --title "$release_name" \
|
||||
--notes-file "$body_path"
|
||||
|
||||
install-qt:
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
include:
|
||||
- soc: Intel
|
||||
os: macos-15-intel
|
||||
- soc: Apple
|
||||
os: macos-15
|
||||
|
||||
name: Install Qt for ${{ matrix.soc }}
|
||||
runs-on: ${{ matrix.os }}
|
||||
env:
|
||||
QT_VERSION: 6.6.3
|
||||
QT_ARCH: clang_64
|
||||
QT_MODULES: "qtimageformats qtmultimedia qtwebsockets"
|
||||
|
||||
steps:
|
||||
- name: Force clean cache
|
||||
if: false
|
||||
env:
|
||||
GH_TOKEN: ${{ github.token }}
|
||||
GH_REPO: ${{ github.repository }}
|
||||
BRANCH: refs/pull/${{ github.event.pull_request.number }}/merge
|
||||
run: gh cache delete qt-macos-${{ matrix.soc }}-${{ env.QT_VERSION }}
|
||||
|
||||
- name: Restore thin Qt libraries
|
||||
id: restore_qt
|
||||
uses: actions/cache/restore@v4
|
||||
with:
|
||||
lookup-only: true
|
||||
path: ${{ github.workspace }}/Qt
|
||||
key: thin-qt-macos-${{ matrix.soc }}-${{ env.QT_VERSION }}
|
||||
|
||||
# Using jurplel/install-qt-action to install Qt without using brew
|
||||
# qt build using vcpkg either just fails or takes too long to build
|
||||
- name: Install Qt ${{env.QT_VERSION}}
|
||||
if: steps.restore_qt.outputs.cache-hit != 'true'
|
||||
uses: jurplel/install-qt-action@v4
|
||||
with:
|
||||
cache: false # caching manually after thinning
|
||||
version: ${{env.QT_VERSION}}
|
||||
arch: ${{env.QT_ARCH}}
|
||||
modules: ${{env.QT_MODULES}}
|
||||
dir: ${{ github.workspace }}
|
||||
|
||||
- name: Thin Qt libraries
|
||||
if: steps.restore_qt.outputs.cache-hit != 'true'
|
||||
run: |
|
||||
export ARCH=$(uname -m)
|
||||
export NPROC=$(sysctl -n hw.ncpu)
|
||||
echo "::group::Thinning Qt libraries to $ARCH using $NPROC cores"
|
||||
find ${{ github.workspace }}/Qt -type f -print0 | \
|
||||
xargs -0 -n1 -P "$NPROC" sh -c \
|
||||
'file -b --mime-type "$0" | grep -q "application/x-mach-binary" && echo "Processing $0" && lipo "$0" -thin "$ARCH" -output "$0" || true'
|
||||
echo "::endgroup::"
|
||||
|
||||
- name: Cache thin Qt libraries
|
||||
if: steps.restore_qt.outputs.cache-hit != 'true'
|
||||
uses: actions/cache/save@v4
|
||||
with:
|
||||
path: ${{ github.workspace }}/Qt
|
||||
key: thin-qt-macos-${{ matrix.soc }}-${{ env.QT_VERSION }}
|
||||
|
||||
build-linux:
|
||||
strategy:
|
||||
fail-fast: false
|
||||
|
|
@ -321,7 +257,7 @@ jobs:
|
|||
qt_version: 6.6.3
|
||||
qt_arch: clang_64
|
||||
qt_modules: qtimageformats qtmultimedia qtwebsockets
|
||||
cache_qt: false # qt caches take too much space for macOS (1.1Gi)
|
||||
cache_qt: false # caching manually after thinning
|
||||
cmake_generator: Ninja
|
||||
use_ccache: 1
|
||||
|
||||
|
|
@ -398,7 +334,7 @@ jobs:
|
|||
cmake_generator_platform: x64
|
||||
|
||||
name: ${{matrix.os}} ${{matrix.target}}${{ matrix.soc == 'Intel' && ' Intel' || '' }}${{ matrix.type == 'Debug' && ' Debug' || '' }}
|
||||
needs: [configure, install-qt]
|
||||
needs: configure
|
||||
runs-on: ${{matrix.runner}}
|
||||
|
||||
steps:
|
||||
|
|
@ -433,7 +369,37 @@ jobs:
|
|||
path: ${{ github.workspace }}/Qt
|
||||
key: thin-qt-macos-${{ matrix.soc }}-${{ matrix.qt_version }}
|
||||
|
||||
- name: Install Qt ${{matrix.qt_version}}
|
||||
# Using jurplel/install-qt-action to install Qt without using brew
|
||||
# qt build using vcpkg either just fails or takes too long to build
|
||||
- name: Install Qt ${{matrix.qt_version}} (macOS)
|
||||
if: matrix.os == 'macOS' && steps.restore_qt.outputs.cache-hit != 'true'
|
||||
uses: jurplel/install-qt-action@v4
|
||||
with:
|
||||
cache: ${{matrix.cache_qt}}
|
||||
version: ${{matrix.qt_version}}
|
||||
arch: ${{matrix.qt_arch}}
|
||||
modules: ${{matrix.qt_modules}}
|
||||
dir: ${{github.workspace}}
|
||||
|
||||
- name: Thin Qt libraries
|
||||
if: matrix.os == 'macOS' && steps.restore_qt.outputs.cache-hit != 'true'
|
||||
run: |
|
||||
export ARCH=$(uname -m)
|
||||
export NPROC=$(sysctl -n hw.ncpu)
|
||||
echo "::group::Thinning Qt libraries to $ARCH using $NPROC cores"
|
||||
find ${{ github.workspace }}/Qt -type f -print0 | \
|
||||
xargs -0 -n1 -P "$NPROC" sh -c \
|
||||
'file -b --mime-type "$0" | grep -q "application/x-mach-binary" && echo "Processing $0" && lipo "$0" -thin "$ARCH" -output "$0" || true'
|
||||
echo "::endgroup::"
|
||||
|
||||
- name: Cache thin Qt libraries
|
||||
if: matrix.os == 'macOS' && steps.restore_qt.outputs.cache-hit != 'true'
|
||||
uses: actions/cache/save@v4
|
||||
with:
|
||||
path: ${{ github.workspace }}/Qt
|
||||
key: thin-qt-macos-${{ matrix.soc }}-${{ matrix.qt_version }}
|
||||
|
||||
- name: Install Qt ${{matrix.qt_version}} (Windows)
|
||||
if: matrix.os == 'Windows'
|
||||
uses: jurplel/install-qt-action@v4
|
||||
with:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue