diff --git a/.github/actions/universal-package/action.yml b/.github/actions/universal-package/action.yml index 7aa0620575..f5ec35db8a 100644 --- a/.github/actions/universal-package/action.yml +++ b/.github/actions/universal-package/action.yml @@ -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 diff --git a/.github/workflows/ci-macvim.yaml b/.github/workflows/ci-macvim.yaml index bea40c84d1..01ecdf8cf9 100644 --- a/.github/workflows/ci-macvim.yaml +++ b/.github/workflows/ci-macvim.yaml @@ -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