mirror of
https://github.com/macvim-dev/macvim.git
synced 2026-06-11 15:37:29 +02:00
Merge pull request #1387 from ychin/fix-ci-wrong-xcode-version-packages
Fix CI not handling Xcode version correctly with packages
This commit is contained in:
@@ -11,6 +11,7 @@ runs:
|
||||
using: 'composite'
|
||||
steps:
|
||||
- name: Set up formula
|
||||
id: setup-formula
|
||||
shell: bash
|
||||
run: |
|
||||
echo '::group::Set up formula'
|
||||
@@ -23,6 +24,11 @@ runs:
|
||||
|
||||
# Uninstall the already installed formula because we want to build our own
|
||||
brew uninstall --ignore-dependencies ${formula} || true
|
||||
|
||||
# Extract Xcode version to serve as part of the key for caching
|
||||
xcode_version=$(xcodebuild -version | tail -1 | sed -E 's/Build version (.*)/\1/')
|
||||
echo "xcode_version=$xcode_version" >> $GITHUB_OUTPUT
|
||||
|
||||
echo '::endgroup::'
|
||||
|
||||
- name: Cache keg
|
||||
@@ -30,7 +36,7 @@ runs:
|
||||
uses: actions/cache@v3
|
||||
with:
|
||||
path: /usr/local/Cellar/${{ inputs.formula }}
|
||||
key: ${{ inputs.formula }}-homebrew-cache-patched-unified-${{ hashFiles(format('{0}.rb', inputs.formula)) }}
|
||||
key: ${{ inputs.formula }}-homebrew-cache-patched-unified-xcode${{ steps.setup-formula.outputs.xcode_version }}-${{ hashFiles(format('{0}.rb', inputs.formula)) }}
|
||||
|
||||
- name: Install formula
|
||||
shell: bash
|
||||
|
||||
@@ -62,7 +62,7 @@ jobs:
|
||||
|
||||
# Most up to date OS and Xcode. Used to publish release for the main build.
|
||||
- os: macos-12
|
||||
xcode: '14.1'
|
||||
xcode: '14.2'
|
||||
publish: true
|
||||
|
||||
runs-on: ${{ matrix.os }}
|
||||
@@ -82,6 +82,13 @@ jobs:
|
||||
# Later, we pass the --enable-sparkle_1 flag to configure to set the corresponding ifdef.
|
||||
ln -fhs Sparkle_1.framework src/MacVim/Sparkle.framework
|
||||
|
||||
- name: Set up Xcode
|
||||
if: matrix.xcode != ''
|
||||
run: |
|
||||
sudo xcode-select -s /Applications/Xcode_${{ matrix.xcode }}.app/Contents/Developer
|
||||
xcode-select -p
|
||||
xcodebuild -version
|
||||
|
||||
# Set up, install, and cache gettext library for localization.
|
||||
#
|
||||
# Instead of using the default binary installed by Homebrew, need to build our own because gettext is statically
|
||||
@@ -131,12 +138,6 @@ jobs:
|
||||
brew unlink perl
|
||||
fi
|
||||
|
||||
- name: Set up Xcode
|
||||
if: matrix.xcode != ''
|
||||
run: |
|
||||
sudo xcode-select -s /Applications/Xcode_${{ matrix.xcode }}.app/Contents/Developer
|
||||
xcode-select -p
|
||||
|
||||
# All set up steps are done. Build and test MacVim below.
|
||||
|
||||
- name: Configure
|
||||
|
||||
Reference in New Issue
Block a user