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:
Yee Cheng Chin
2023-03-11 11:26:06 -08:00
committed by GitHub
2 changed files with 15 additions and 8 deletions
+7 -1
View File
@@ -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
+8 -7
View File
@@ -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